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/modules.js | |
parent | 5c70758542da772e66037ab2715a8f21dc5f8cf3 (diff) |
fix bug with stub functions and implemented library functions
Diffstat (limited to 'src/modules.js')
-rw-r--r-- | src/modules.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules.js b/src/modules.js index 70499bcc..8205e9ff 100644 --- a/src/modules.js +++ b/src/modules.js @@ -221,6 +221,9 @@ var Functions = { // The list of function datas which are being processed in the jsifier, currently currFunctions: [], + // All functions that will be implemented in this file + implementedFunctions: null, + indexedFunctions: [0, 0], // Start at a non-0 (even, see below) value // Mark a function as needing indexing, and returns the index @@ -273,7 +276,8 @@ var LibraryManager = { isStubFunction: function(ident) { var libCall = LibraryManager.library[ident.substr(1)]; - return typeof libCall === 'function' && libCall.toString().replace(/\s/g, '') === 'function(){}'; + return typeof libCall === 'function' && libCall.toString().replace(/\s/g, '') === 'function(){}' + && !(ident in Functions.implementedFunctions); } }; |