diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-07-07 16:48:12 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-07-07 16:48:12 -0700 |
commit | 272e961c063ad4fdb44e61babdfbb0bee200752b (patch) | |
tree | cb5f090f03833247edca5e6b26152c4f0fe1c97b /src/runtime.js | |
parent | 6dff9374e3cb873968f9a58f80b625e7f256d6d9 (diff) |
rename __stackbase__ to sp
Diffstat (limited to 'src/runtime.js')
-rw-r--r-- | src/runtime.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/runtime.js b/src/runtime.js index e6d5f962..684f11e7 100644 --- a/src/runtime.js +++ b/src/runtime.js @@ -32,7 +32,7 @@ var RuntimeGenerator = { stackEnter: function(initial, force) { if (initial === 0 && SKIP_STACK_IN_SMALL && !force) return ''; - var ret = 'var __stackBase__ = ' + (ASM_JS ? '0; __stackBase__ = ' : '') + 'STACKTOP'; + var ret = 'var sp = ' + (ASM_JS ? '0; sp = ' : '') + 'STACKTOP'; if (initial > 0) ret += '; STACKTOP = (STACKTOP + ' + initial + ')|0'; if (USE_TYPED_ARRAYS == 2) { assert(initial % Runtime.STACK_ALIGN == 0); @@ -44,7 +44,7 @@ var RuntimeGenerator = { ret += '; (assert(' + asmCoercion('(STACKTOP|0) < (STACK_MAX|0)', 'i32') + ')|0)'; } if (false) { - ret += '; _memset(' + asmCoercion('__stackBase__', 'i32') + ', 0, ' + initial + ')'; + ret += '; _memset(' + asmCoercion('sp', 'i32') + ', 0, ' + initial + ')'; } return ret; }, @@ -53,9 +53,9 @@ var RuntimeGenerator = { if (initial === 0 && SKIP_STACK_IN_SMALL && !force) return ''; var ret = ''; if (SAFE_HEAP) { - ret += 'var i = __stackBase__; while ((i|0) < (STACKTOP|0)) { SAFE_HEAP_CLEAR(i|0); i = (i+1)|0 }'; + ret += 'var i = sp; while ((i|0) < (STACKTOP|0)) { SAFE_HEAP_CLEAR(i|0); i = (i+1)|0 }'; } - return ret += 'STACKTOP = __stackBase__'; + return ret += 'STACKTOP = sp'; }, // An allocation that cannot normally be free'd (except through sbrk, which once |