aboutsummaryrefslogtreecommitdiff
path: root/src/jsifier.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-04-12 11:34:53 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-04-12 11:34:53 -0700
commit2d9dd53139cfa452d4eaa4c2df7ac70ddac640c9 (patch)
treeae08d03d7ecdd54277fc8d1eb2694f472cb6afaf /src/jsifier.js
parent835c1e426ab0967d65bd41303c646c8e904a82d3 (diff)
move exception resuming into a dedicated function
Diffstat (limited to 'src/jsifier.js')
-rw-r--r--src/jsifier.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index 8a3ac25e..08126e45 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -1149,9 +1149,7 @@ function JSify(data, functionsOnly, givenFunctions) {
}
// If there is no current exception, set this one as it (during a resume, the current exception can be wiped out)
var ptr = makeStructuralAccess(item.ident, 0);
- return (EXCEPTION_DEBUG ? 'Module.print("Resuming exception");' : '') +
- 'if (' + makeGetValue('_llvm_eh_exception.buf', 0, 'void*') + ' == 0) { ' + makeSetValue('_llvm_eh_exception.buf', 0, ptr, 'void*') + ' } ' +
- makeThrow(ptr) + ';';
+ return '___resumeException(' + asmCoercion(ptr, 'i32') + ')';
});
makeFuncLineActor('invoke', function(item) {
// Wrapping in a function lets us easily return values if we are