aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-03-11 15:38:26 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-03-11 15:38:26 -0700
commitb793e04cf56b778dd1fda0631e02aa5a8a1932f0 (patch)
treec84eb00a4d86c8936b49a0ec27face883a7edf60 /src
parent65e27e800765954fded8ebc4a74f6b4c9fa06e1e (diff)
make pgo output work in asm.js
Diffstat (limited to 'src')
-rw-r--r--src/jsifier.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index 1662d249..ee54f17c 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -1316,6 +1316,7 @@ function JSify(data, functionsOnly, givenFunctions) {
} else {
callIdent = ident;
}
+
var args = [];
var argsTypes = [];
var varargs = [];
@@ -1418,6 +1419,12 @@ function JSify(data, functionsOnly, givenFunctions) {
returnType = getReturnType(type);
}
+ if (callIdent in DEAD_FUNCTIONS) {
+ var ret = 'abort(7)';
+ if (ASM_JS) ret = asmCoercion(ret, returnType);
+ return ret;
+ }
+
if (byPointer) {
var sig = Functions.getSignature(returnType, argsTypes, hasVarArgs);
if (ASM_JS) {