aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/library.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/library.js b/src/library.js
index 2578fda4..a24ce3ca 100644
--- a/src/library.js
+++ b/src/library.js
@@ -6374,11 +6374,11 @@ LibraryManager.library = {
setjmpId = (setjmpId+1)|0;
{{{ makeSetValueAsm('env', '0', 'setjmpId', 'i32') }}};
while ((i|0) < {{{ 2*MAX_SETJMPS }}}) {
- if ({{{ makeGetValueAsm('table', 'i*4', 'i32') }}} == 0) {
- {{{ makeSetValueAsm('table', 'i*4', 'setjmpId', 'i32') }}};
- {{{ makeSetValueAsm('table', 'i*4+4', 'label', 'i32') }}};
+ if ({{{ makeGetValueAsm('table', '(i<<2)', 'i32') }}} == 0) {
+ {{{ makeSetValueAsm('table', '(i<<2)', 'setjmpId', 'i32') }}};
+ {{{ makeSetValueAsm('table', '(i<<2)+4', 'label', 'i32') }}};
// prepare next slot
- {{{ makeSetValueAsm('table', 'i*4+8', '0', 'i32') }}};
+ {{{ makeSetValueAsm('table', '(i<<2)+8', '0', 'i32') }}};
return 0;
}
i = (i+2)|0;
@@ -6395,10 +6395,10 @@ LibraryManager.library = {
table = table|0;
var i = 0, curr = 0;
while ((i|0) < {{{ MAX_SETJMPS }}}) {
- curr = {{{ makeGetValueAsm('table', 'i*4', 'i32') }}};
+ curr = {{{ makeGetValueAsm('table', '(i<<2)', 'i32') }}};
if ((curr|0) == 0) break;
if ((curr|0) == (id|0)) {
- return {{{ makeGetValueAsm('table', 'i*4+4', 'i32') }}};
+ return {{{ makeGetValueAsm('table', '(i<<2)+4', 'i32') }}};
}
i = (i+2)|0;
}