diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-08-21 11:29:11 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-08-21 11:29:11 -0700 |
commit | bd05b4d4f8c805c45630977547b0b01c04b1ce18 (patch) | |
tree | 8a64573c20cdb8955930e0ec2d070950f80283d8 | |
parent | 6f2c31d4c86d168967e019bc6e731f6c454de91c (diff) |
remove some function indentation in asm.js block
-rwxr-xr-x | emscripten.py | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/emscripten.py b/emscripten.py index a156ca73..c5e235d8 100755 --- a/emscripten.py +++ b/emscripten.py @@ -552,52 +552,52 @@ var asm = (function(global, env, buffer) { ''' + ''.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; - ret = STACKTOP; - STACKTOP = (STACKTOP + size)|0; +function stackAlloc(size) { + size = size|0; + var ret = 0; + ret = STACKTOP; + STACKTOP = (STACKTOP + size)|0; ''' + ('STACKTOP = ((STACKTOP + 3)>>2)<<2;' if settings['TARGET_X86'] else 'STACKTOP = ((STACKTOP + 7)>>3)<<3;') + ''' - return ret|0; - } - function stackSave() { - return STACKTOP|0; - } - function stackRestore(top) { - top = top|0; - STACKTOP = top; - } - function setThrew(threw, value) { - threw = threw|0; - value = value|0; - if ((__THREW__|0) == 0) { - __THREW__ = threw; - threwValue = value; - } - } - function copyTempFloat(ptr) { - ptr = ptr|0; - HEAP8[tempDoublePtr] = HEAP8[ptr]; - HEAP8[tempDoublePtr+1|0] = HEAP8[ptr+1|0]; - HEAP8[tempDoublePtr+2|0] = HEAP8[ptr+2|0]; - HEAP8[tempDoublePtr+3|0] = HEAP8[ptr+3|0]; - } - function copyTempDouble(ptr) { - ptr = ptr|0; - HEAP8[tempDoublePtr] = HEAP8[ptr]; - HEAP8[tempDoublePtr+1|0] = HEAP8[ptr+1|0]; - HEAP8[tempDoublePtr+2|0] = HEAP8[ptr+2|0]; - HEAP8[tempDoublePtr+3|0] = HEAP8[ptr+3|0]; - HEAP8[tempDoublePtr+4|0] = HEAP8[ptr+4|0]; - HEAP8[tempDoublePtr+5|0] = HEAP8[ptr+5|0]; - HEAP8[tempDoublePtr+6|0] = HEAP8[ptr+6|0]; - HEAP8[tempDoublePtr+7|0] = HEAP8[ptr+7|0]; + return ret|0; +} +function stackSave() { + return STACKTOP|0; +} +function stackRestore(top) { + top = top|0; + STACKTOP = top; +} +function setThrew(threw, value) { + threw = threw|0; + value = value|0; + if ((__THREW__|0) == 0) { + __THREW__ = threw; + threwValue = value; } +} +function copyTempFloat(ptr) { + ptr = ptr|0; + HEAP8[tempDoublePtr] = HEAP8[ptr]; + HEAP8[tempDoublePtr+1|0] = HEAP8[ptr+1|0]; + HEAP8[tempDoublePtr+2|0] = HEAP8[ptr+2|0]; + HEAP8[tempDoublePtr+3|0] = HEAP8[ptr+3|0]; +} +function copyTempDouble(ptr) { + ptr = ptr|0; + HEAP8[tempDoublePtr] = HEAP8[ptr]; + HEAP8[tempDoublePtr+1|0] = HEAP8[ptr+1|0]; + HEAP8[tempDoublePtr+2|0] = HEAP8[ptr+2|0]; + HEAP8[tempDoublePtr+3|0] = HEAP8[ptr+3|0]; + HEAP8[tempDoublePtr+4|0] = HEAP8[ptr+4|0]; + HEAP8[tempDoublePtr+5|0] = HEAP8[ptr+5|0]; + HEAP8[tempDoublePtr+6|0] = HEAP8[ptr+6|0]; + HEAP8[tempDoublePtr+7|0] = HEAP8[ptr+7|0]; +} ''' + ''.join([''' - function setTempRet%d(value) { - value = value|0; - tempRet%d = value; - } +function setTempRet%d(value) { + value = value|0; + tempRet%d = value; +} ''' % (i, i) for i in range(10)])] + [PostSets.js + '\n'] + funcs_js + [''' %s |