aboutsummaryrefslogtreecommitdiff
path: root/src/jsifier.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-04-19 10:07:30 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-04-19 10:07:30 -0700
commit95e3ccbcb7bd802e1b4287d3fc964deda75dd73c (patch)
treef248c25e18553a03a130fac8a0db0e97a4133630 /src/jsifier.js
parent5986269bda083c99b3c684048e5d0834918a1a2d (diff)
properly clear __THREW__ in asm exceptions
Diffstat (limited to 'src/jsifier.js')
-rw-r--r--src/jsifier.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index ea1289c6..a01b2655 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -1200,7 +1200,7 @@ function JSify(data, functionsOnly, givenFunctions) {
}
item.reloopingJS = ret; // everything but the actual branching (which the relooper will do for us)
item.toLabelJS = getPhiSetsForLabel(phiSets, item.toLabel);
- item.unwindLabelJS = getPhiSetsForLabel(phiSets, item.unwindLabel);
+ item.unwindLabelJS = (ASM_JS ? '__THREW__ = 0;' : '') + getPhiSetsForLabel(phiSets, item.unwindLabel);
ret += 'if (!__THREW__) { ' + item.toLabelJS + makeBranch(item.toLabel, item.currLabelId)
+ ' } else { ' + item.unwindLabelJS + makeBranch(item.unwindLabel, item.currLabelId) + ' }';
return ret;