aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-01-20 13:54:01 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-01-20 13:54:01 -0800
commitc3dc146079be90808407f29fc924354169b6ab9d (patch)
tree298f6f8200f85dbca0d5db9e0f44d9ff265c5374 /src
parent656826b47680557cca7fda1361a8fa5a0dc97b7b (diff)
__asm and __sig in library, separately
Diffstat (limited to 'src')
-rw-r--r--src/jsifier.js8
-rw-r--r--src/library.js3
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;