aboutsummaryrefslogtreecommitdiff
path: root/src/postamble.js
diff options
context:
space:
mode:
authorAlon Zakai <azakai@mozilla.com>2010-11-14 21:23:48 -0800
committerAlon Zakai <azakai@mozilla.com>2010-11-14 21:23:48 -0800
commitee0166c83cd91a469bbe2d1da3c27f180da7b582 (patch)
treeca61137046a01c43e3579c93ef9bc5a0cee4a7a3 /src/postamble.js
parent1a9c1c95c6552f835f53493299e90a9f6743c6f7 (diff)
handle global constants that are llvm function calls +test
Diffstat (limited to 'src/postamble.js')
-rw-r--r--src/postamble.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/postamble.js b/src/postamble.js
index 066b83e3..010e6e66 100644
--- a/src/postamble.js
+++ b/src/postamble.js
@@ -13,13 +13,14 @@ function run(args) {
counter--;
var func = globalFuncs.pop();
try {
- func();
+ var x = func();
+ if (x == undefined) throw 'undefined';
} catch (e) {
globalFuncs.unshift(func);
// We will try again later. The global vars we depend on should be resolved by then
- // XXX: We leak here, as we malloc, then fail and catch...
}
}
+ assert(counter > 0);
var argc = args.length+1;
function pad() {