diff options
author | alon@honor <none@none> | 2010-10-06 20:02:30 -0700 |
---|---|---|
committer | alon@honor <none@none> | 2010-10-06 20:02:30 -0700 |
commit | 99f96653a706fc61d4be31ce8b45cd6d74c06c6a (patch) | |
tree | 8a997d03444ba0ee55d6ec8e68dbeb799be68915 /src/jsifier.js | |
parent | 0390eea0b6d157be7d7e2ae0e388e16a3db92581 (diff) |
Runtime system, and inlining of stackEnter/Exit
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 b4b0952f..10f3851f 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -241,7 +241,7 @@ function JSify(data) { }).filter(function(param) { return param != null });; func.JS = '\nfunction ' + func.ident + '(' + params.join(', ') + ') {\n'; - func.JS += ' stackEnter();\n'; + func.JS += ' ' + RuntimeGenerator.stackEnter() + '\n'; if (LABEL_DEBUG) func.JS += " print(INDENT + ' Entering: " + func.ident + "'); INDENT += ' ';\n"; if (true) { // TODO: optimize away when not needed @@ -511,7 +511,7 @@ function JSify(data) { return ret; }); makeFuncLineZyme('return', function(item) { - var ret = 'stackExit();\n'; + var ret = RuntimeGenerator.stackExit() + '\n'; if (LABEL_DEBUG) ret += "INDENT = INDENT.substr(0, INDENT.length-2);\n"; ret += 'return'; if (item.value) { @@ -766,6 +766,6 @@ function JSify(data) { substrate.addItems(data.functionStubs, 'FunctionStub'); var params = { 'QUANTUM_SIZE': QUANTUM_SIZE }; - return preprocess(read('preamble.js') + finalCombiner(substrate.solve()) + read('postamble.js'), params); + return preprocess(read('preamble.js') + getRuntime() + finalCombiner(substrate.solve()) + read('postamble.js'), params); } |