diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-05-02 15:36:38 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-05-02 15:36:38 -0700 |
commit | d415b4145dd771c937b7295c22d01716428cb3dc (patch) | |
tree | 267af40747b033eff687fc9e604e521a49fbc7d9 | |
parent | 6b5e7e290190ea604d9f3761d8f7e13781cea36a (diff) |
ensure floats in varargs
-rw-r--r-- | src/jsifier.js | 1 | ||||
-rwxr-xr-x | tests/runner.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index cdfc024e..24fded72 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -1404,6 +1404,7 @@ function JSify(data, functionsOnly, givenFunctions) { varargs.map(function(arg, i) { var type = varargsTypes[i]; if (type == 0) return null; + arg = asmEnsureFloat(arg, type); var ret; assert(offset % Runtime.STACK_ALIGN == 0); // varargs must be aligned if (!varargsByVals[i]) { diff --git a/tests/runner.py b/tests/runner.py index 073075e3..86a2da0c 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -4157,7 +4157,7 @@ def process(filename): int maxxi = getMaxi(6, 2, 5, 21, 4, -10, 19); printf("maxxi:%d*\\n", maxxi); - double maxxD = getMaxD(6, (double)2.1, (double)5.1, (double)22.1, (double)4.1, (double)-10.1, (double)19.1); + double maxxD = getMaxD(6, (double)2.1, (double)5.1, (double)22.1, (double)4.1, (double)-10.1, (double)19.1, (double)2); printf("maxxD:%.2f*\\n", (float)maxxD); // And, as a function pointer |