aboutsummaryrefslogtreecommitdiff
path: root/emscripten.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-03-08 16:17:52 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-03-08 16:17:52 -0800
commitb31addd3ab55af8dddb703580ebf5d2a90660c61 (patch)
tree8fa41ceb8447eb1ed7f19eae120a25d2993b7c73 /emscripten.py
parent50c7f9f00e4666860bf1f39181cc6f9133ef46bb (diff)
split out asm shell in js optimizer, in preparation for minification of globals
Diffstat (limited to 'emscripten.py')
-rwxr-xr-xemscripten.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/emscripten.py b/emscripten.py
index 2291a65a..09a57e37 100755
--- a/emscripten.py
+++ b/emscripten.py
@@ -433,6 +433,7 @@ var asm = (function(global, env, buffer) {
var tempInt = 0, tempBigInt = 0, tempBigIntP = 0, tempBigIntS = 0, tempBigIntR = 0.0, tempBigIntI = 0, tempBigIntD = 0, tempValue = 0, tempDouble = 0.0;
''' + ''.join(['''
var tempRet%d = 0;''' % i for i in range(10)]) + '\n' + asm_global_funcs + '''
+// EMSCRIPTEN_START_FUNCS
function stackAlloc(size) {
size = size|0;
var ret = 0;
@@ -457,9 +458,7 @@ var asm = (function(global, env, buffer) {
value = value|0;
tempRet%d = value;
}
-''' % (i, i) for i in range(10)]) + '''
-// EMSCRIPTEN_START_FUNCS
-''' + funcs_js + '''
+''' % (i, i) for i in range(10)]) + funcs_js + '''
%s
return %s;