diff options
Diffstat (limited to 'src/modules.js')
-rw-r--r-- | src/modules.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/modules.js b/src/modules.js index d21fe599..54b92755 100644 --- a/src/modules.js +++ b/src/modules.js @@ -111,6 +111,13 @@ var Debugging = { var Types = { types: {}, + fatTypes: {}, // With QUANTUM_SIZE=1, we store the full-size type data here + flipTypes: function() { + var temp = this.fatTypes; + this.fatTypes = this.types; + this.types = temp; + }, + needAnalysis: {} // Types noticed during parsing, that need analysis }; @@ -137,3 +144,18 @@ var Functions = { } }; +var LibraryManager = { + // Given an ident, see if it is an alias for something, and so forth, returning + // the earliest ancestor (the root) + getRootIdent: function(ident) { + var ret = Library[ident]; + if (!ret) return null; + var last = ident; + while (typeof ret === 'string') { + last = ret; + ret = Library[ret]; + } + return last; + } +}; + |