Skip to content

Commit

Permalink
sig-default jit: use f->protos[0] not op.a idx
Browse files Browse the repository at this point in the history
fixes nested functions, but still looks unstable. fixes default.pn
  • Loading branch information
Reini Urban committed May 9, 2013
1 parent 53c586f commit f871920
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions core/vm-x86.c
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.sh
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down

0 comments on commit f871920

Please sign in to comment.