aboutsummaryrefslogtreecommitdiff
path: root/src/jsifier.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-01-12 11:59:50 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-01-12 11:59:50 -0800
commite02762158e8f105fae65583fe9cfe331494b11c7 (patch)
tree21c776705d2557ddbd4762ef133201f682c7458b /src/jsifier.js
parent76b5adaf554a0d636ba5eeb9bd1d25659f45167f (diff)
parentddd3820c79562079e58c7717c5f88c81aac6a379 (diff)
Merge pull request #170 from FishingCactus/class_exception
Catching specific exception type now works
Diffstat (limited to 'src/jsifier.js')
-rw-r--r--src/jsifier.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index 501ed3f9..b14c213f 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -926,7 +926,8 @@ function JSify(data, functionsOnly, givenFunctions) {
return ret + ';';
});
makeFuncLineActor('resume', function(item) {
- return (EXCEPTION_DEBUG ? 'print("Resuming exception");' : '') + 'throw [0,0];';
+ return (EXCEPTION_DEBUG ? 'print("Resuming exception");' : '') +
+ 'throw ' + makeGetValue('_llvm_eh_exception.buf', '0', 'void*') + ';';
});
makeFuncLineActor('invoke', function(item) {
// Wrapping in a function lets us easily return values if we are
@@ -945,7 +946,8 @@ function JSify(data, functionsOnly, givenFunctions) {
});
makeFuncLineActor('landingpad', function(item) {
// Just a stub
- return '{ f0: 0, f1: 0 }';
+ return '{ f0: ' + makeGetValue('_llvm_eh_exception.buf', '0', 'void*') +
+ ', f1:' + makeGetValue('_llvm_eh_exception.buf', QUANTUM_SIZE, 'void*') + ' }';
});
makeFuncLineActor('load', function(item) {
var value = finalizeLLVMParameter(item.pointer);