diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-10-30 21:11:06 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-10-30 21:11:06 -0700 |
commit | 819c105c234a89e2d0936c1d7218612db43dd56c (patch) | |
tree | 926ea1c8d6323097fc07f8d7b35b27db473c1b2f | |
parent | 5dfe077ac92295cae2396fa06866b366defa8b23 (diff) |
remove finalizeParam and properly use finalizeLLVMParameter everywhere
-rw-r--r-- | src/jsifier.js | 2 | ||||
-rw-r--r-- | src/parseTools.js | 19 | ||||
-rw-r--r-- | tests/test_core.py | 2 |
3 files changed, 2 insertions, 21 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index adcb38ee..0da48a8c 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -1491,7 +1491,7 @@ function JSify(data, functionsOnly, givenFunctions) { } params.forEach(function(param, i) { - var val = finalizeParam(param); + var val = finalizeLLVMParameter(param); if (!hasVarArgs || useJSArgs || i < normalArgs) { args.push(val); argsTypes.push(param.type); diff --git a/src/parseTools.js b/src/parseTools.js index fb3b9652..75ba6fd2 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -563,25 +563,6 @@ function sortGlobals(globals) { }); } -function finalizeParam(param) { - if (param.intertype in PARSABLE_LLVM_FUNCTIONS) { - return finalizeLLVMFunctionCall(param); - } else if (param.intertype === 'blockaddress') { - return finalizeBlockAddress(param); - } else if (param.intertype === 'jsvalue') { - return param.ident; - } else { - if (param.type == 'i64' && USE_TYPED_ARRAYS == 2) { - return parseI64Constant(param.ident); - } - var ret = toNiceIdent(param.ident); - if (ret in Variables.globals) { - ret = makeGlobalUse(ret); - } - return ret; - } -} - // Segment ==> Parameter function parseLLVMSegment(segment) { var type; diff --git a/tests/test_core.py b/tests/test_core.py index 6857d803..68f5bef7 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -8705,7 +8705,7 @@ int main(int argc, char **argv) { c = _mm_set_ps(9.0, 4.0, 0, -9.0); d = _mm_set_ps(10.0, 14.0, -12, -2.0); printf("6floats! %d, %d, %d, %d %d, %d, %d, %d\n", (int)c[0], (int)c[1], (int)c[2], (int)c[3], (int)d[0], (int)d[1], (int)d[2], (int)d[3]); - //printf("7calcs: %d\n", emscripten_float32x4_signmask(c)); + printf("7calcs: %d\n", emscripten_float32x4_signmask(c)); // TODO: just not just compilation but output as well } return 0; |