diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-09-04 13:59:07 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-09-04 13:59:07 -0700 |
commit | 2aa41b3c30beed986f76027acbe87a38effce61b (patch) | |
tree | 532a9ecf1393e362f9eab6a43e0b77c782aa64e5 /src/jsifier.js | |
parent | 5c70758542da772e66037ab2715a8f21dc5f8cf3 (diff) |
fix bug with stub functions and implemented library functions
Diffstat (limited to 'src/jsifier.js')
-rw-r--r-- | src/jsifier.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index 8dac45e5..be9360af 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -26,6 +26,8 @@ function JSify(data, functionsOnly, givenFunctions, givenGlobalVariables) { ident: '_' + ident }); }); + + Functions.implementedFunctions = set(data.unparsedFunctions.map(function(func) { return func.ident })); } // Does simple 'macro' substitution, using Django-like syntax, @@ -262,8 +264,6 @@ function JSify(data, functionsOnly, givenFunctions, givenGlobalVariables) { } }); - var moduleFunctions = set(data.unparsedFunctions.map(function(func) { return func.ident })); - var addedLibraryItems = {}; // functionStub @@ -279,7 +279,7 @@ function JSify(data, functionsOnly, givenFunctions, givenGlobalVariables) { if (ident in addedLibraryItems) return ''; // Don't replace implemented functions with library ones (which can happen when we add dependencies). // Note: We don't return the dependencies here. Be careful not to end up where this matters - if (('_' + ident) in moduleFunctions) return ''; + if (('_' + ident) in Functions.implementedFunctions) return ''; addedLibraryItems[ident] = true; var snippet = LibraryManager.library[ident]; |