From f871920dbb43a60e8508670a1de4524f59ce1667 Mon Sep 17 00:00:00 2001 From: Reini Urban Date: Wed, 8 May 2013 21:24:56 -0500 Subject: [PATCH] sig-default jit: use f->protos[0] not op.a idx fixes nested functions, but still looks unstable. fixes default.pn --- core/vm-x86.c | 6 +++--- test/runtests.sh | 2 +- test/testccs.sh | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/vm-x86.c b/core/vm-x86.c index 6d62f9c5..da7a1eaa 100644 --- a/core/vm-x86.c +++ b/core/vm-x86.c @@ -728,9 +728,9 @@ void potion_x86_call(Potion *P, struct PNProto * volatile f, PNAsm * volatile *a DBG_t("%d[%d] ", op.a + i - 1, i); X86_ARGO(op.a + i - 1, i); // mov regn, i(%esp) } - // fill in defaults, arity from protos[op.a], not f - if (!PN_IS_EMPTY(f->protos) && op.a < PN_TUPLE_LEN(f->protos)) { - vPN(Proto) c = (vPN(Proto)) PN_TUPLE_AT(f->protos, op.a); + // fill in defaults, arity from protos[0], not f + if (!PN_IS_EMPTY(f->protos)) { + vPN(Proto) c = (vPN(Proto)) PN_TUPLE_AT(f->protos, 0); if ((argc-1 < c->arity) && c->arity) { for (i = argc+1; i <= c->arity+1; i++) { //2: [0,1],2,3 PN sig = potion_sig_at(P, c->sig, i-2); diff --git a/test/runtests.sh b/test/runtests.sh index 89b924de..222d725a 100755 --- a/test/runtests.sh +++ b/test/runtests.sh @@ -2,7 +2,7 @@ # usage: test/runtests.sh [testfile] # cmd="valgrind ./potion" test/runtests.sh -cmd=${cmd:-bin/potion} +cmd=${cmd:-bin/potion-s} ECHO=/bin/echo SED=sed EXPR=expr diff --git a/test/testccs.sh b/test/testccs.sh index ccf5d599..4055d98b 100755 --- a/test/testccs.sh +++ b/test/testccs.sh @@ -1,6 +1,6 @@ #!/bin/sh # test some compiler configurations on this platform (linux, darwin, win) -CCS="clang clang2 clang3 gcc gcc-4.4 gcc-4.8" +CCS="clang clang-mp-3.3 gcc gcc-mp-4.3 gcc-mp-4.8 gcc-mp-4.9" testdebug() { make -s realclean