diff options
author | alon@honor <none@none> | 2010-10-27 22:12:02 -0700 |
---|---|---|
committer | alon@honor <none@none> | 2010-10-27 22:12:02 -0700 |
commit | 4b48a792ec61ce5b99c6eabf3b7b9f1e7f4afd8f (patch) | |
tree | 4b88210e14069791b83cd8c9a8a80cc86e936654 /src/runtime.js | |
parent | 027d1d7ca694ef5128c03a1535235ec65cc87fac (diff) |
modularize generated code
Diffstat (limited to 'src/runtime.js')
-rw-r--r-- | src/runtime.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/runtime.js b/src/runtime.js index dad0d0d5..cdd85ab3 100644 --- a/src/runtime.js +++ b/src/runtime.js @@ -70,10 +70,11 @@ Runtime = { staticAlloc: unInline('staticAlloc', ['size']), alignMemory: unInline('alignMemory', ['size', 'quantum']), - getFunctionIndex: function getFunctionIndex(func) { + getFunctionIndex: function getFunctionIndex(func, ident) { var key = FUNCTION_TABLE.length; FUNCTION_TABLE[key] = func; FUNCTION_TABLE[key+1] = null; // Need to have keys be even numbers, see |polymorph| test + Module[ident] = func; // Export using full name, for Closure Compiler return key; }, @@ -124,7 +125,7 @@ Runtime = { } else if (Runtime.dedup(diffs).length == 1) { type.flatFactor = diffs[0]; } - type.needsFlattening = (this.flatFactor != 1); + type.needsFlattening = (type.flatFactor != 1); return type.flatIndexes; } |