aboutsummaryrefslogtreecommitdiff
path: root/src/library.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-11-22 20:12:04 +0100
committerAlon Zakai <alonzakai@gmail.com>2012-11-22 20:12:04 +0100
commite7491225c9ab4104342bb3d1079dbbc4f1b326d6 (patch)
treecdc396e8ae743a4007a6b3784c2ce6c450c80252 /src/library.js
parent23a27e95809a8437ed553c20eb4b1d6237ddd849 (diff)
fix setjmp/longjmp to notice if we actually setjmped in the invocation of the function on the stack, so recursive functions can use setjmp/longjmp
Diffstat (limited to 'src/library.js')
-rw-r--r--src/library.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library.js b/src/library.js
index 4b6cb460..12ac0ed0 100644
--- a/src/library.js
+++ b/src/library.js
@@ -5938,7 +5938,7 @@ LibraryManager.library = {
setjmp__inline: function(env) {
// Save the label
- return '(' + makeSetValue(env, '0', 'label', 'i32') + ', 0)';
+ return '(setjmped = true, ' + makeSetValue(env, '0', 'label', 'i32') + ', 0)';
},
longjmp: function(env, value) {