diff options
-rw-r--r-- | src/jsifier.js | 8 | ||||
-rw-r--r-- | src/library.js | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index 58c050aa..ff1f5e0e 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -77,7 +77,7 @@ function JSify(data, functionsOnly, givenFunctions) { assert(!BUILD_AS_SHARED_LIB, 'Cannot have both INCLUDE_FULL_LIBRARY and BUILD_AS_SHARED_LIB set.') libFuncsToInclude = []; for (var key in LibraryManager.library) { - if (!key.match(/__(deps|postset|inline|asm)$/)) { + if (!key.match(/__(deps|postset|inline|asm|sig)$/)) { libFuncsToInclude.push(key); } } @@ -481,10 +481,10 @@ function JSify(data, functionsOnly, givenFunctions) { // redirected idents just need a var, but no value assigned to them - it would be unused var contentText = isFunction ? snippet : ('var ' + ident + (redirectedIdent ? '' : '=' + snippet) + ';'); if (ASM_JS) { - var asmSig = LibraryManager.library[ident.substr(1) + '__asm']; - if (isFunction && asmSig) { + var sig = LibraryManager.library[ident.substr(1) + '__sig']; + if (isFunction && sig && LibraryManager.library[ident.substr(1) + '__asm']) { // asm library function, add it as generated code alongside the generated code - Functions.implementedFunctions[ident] = asmSig; + Functions.implementedFunctions[ident] = sig; asmLibraryFunctions.push(contentText); contentText = ' '; EXPORTED_FUNCTIONS[ident] = 1; diff --git a/src/library.js b/src/library.js index 9268edd5..22901d05 100644 --- a/src/library.js +++ b/src/library.js @@ -4290,7 +4290,8 @@ LibraryManager.library = { wmemset: function() { throw 'wmemset not implemented' }, - strlen__asm: 'ii', + strlen__sig: 'ii', + strlen__asm: true, strlen: function(ptr) { ptr = ptr|0; var curr = 0; |