diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-05-15 08:04:34 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-05-15 08:04:34 -0700 |
commit | 3afb3d53d70c6d9a3e84e488cfa986b8cd7b2733 (patch) | |
tree | afbc41358a13cfe329ddeae93f6ab4f6f7c57ef2 /src/parseTools.js | |
parent | f66293c6affe4e4c4ddb5ec40dff802dee989094 (diff) |
indexize necessary library functions
Diffstat (limited to 'src/parseTools.js')
-rw-r--r-- | src/parseTools.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index 60ebf309..19aaa63d 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -634,9 +634,15 @@ function makeGetValue(ptr, pos, type, noNeedFirst) { } } -function indexizeFunctions(value) { // TODO: Also check for other functions (externals, library, etc.) +function indexizeFunctions(value) { // TODO: Also check for externals if (value in Functions.currFunctions) { - value = Functions.getIndex(value); // Store integer value + return Functions.getIndex(value); + } + if (value && value[0] == '_') { + var rootIdent = LibraryManager.getRootIdent(value.slice(1)); + if (rootIdent && typeof Library[rootIdent] === 'function') { + return Functions.getIndex('_' + rootIdent); + } } return value; } |