diff --git a/eval.c b/eval.c index 7c45ddf0..3647b5fb 100644 --- a/eval.c +++ b/eval.c @@ -1311,14 +1311,14 @@ sexp sexp_make_foreign (sexp ctx, const char *name, int num_args, int flags, sexp_proc1 f, sexp data) { sexp res; #if ! SEXP_USE_EXTENDED_FCALL - if (num_args > 6) + if (num_args > 4) return sexp_user_exception(ctx, NULL, "make-foreign: exceeded foreign arg limit", sexp_make_fixnum(num_args)); #endif res = sexp_alloc_type(ctx, opcode, SEXP_OPCODE); sexp_opcode_class(res) = SEXP_OPC_FOREIGN; #if SEXP_USE_EXTENDED_FCALL - if (num_args > 6) + if (num_args > 4) sexp_opcode_code(res) = SEXP_OP_FCALLN; else #endif diff --git a/include/chibi/eval.h b/include/chibi/eval.h index b21e3825..e1a82378 100644 --- a/include/chibi/eval.h +++ b/include/chibi/eval.h @@ -60,8 +60,6 @@ enum sexp_opcode_names { SEXP_OP_FCALL2, SEXP_OP_FCALL3, SEXP_OP_FCALL4, - SEXP_OP_FCALL5, - SEXP_OP_FCALL6, SEXP_OP_FCALLN, SEXP_OP_JUMP_UNLESS, SEXP_OP_JUMP, diff --git a/opcodes.c b/opcodes.c index 085238f1..cf40794f 100644 --- a/opcodes.c +++ b/opcodes.c @@ -10,8 +10,6 @@ #define _FN2OPTP(t, u, s, d, f) _FN(SEXP_OP_FCALL2, 1, 3, t, u, s, d, f) #define _FN3(t, u, s, d, f) _FN(SEXP_OP_FCALL3, 3, 0, t, u, s, d, f) #define _FN4(t, u, s, d, f) _FN(SEXP_OP_FCALL4, 4, 0, t, u, s, d, f) -#define _FN5(t, u, s, d, f) _FN(SEXP_OP_FCALL5, 5, 0, t, u, s, d, f) -#define _FN6(t, u, s, d, f) _FN(SEXP_OP_FCALL6, 6, 0, t, u, s, d, f) #define _PARAM(n, a, t) _OP(SEXP_OPC_PARAMETER, SEXP_OP_NOOP, 0, 3, t, 0, 0, n, a, 0) static struct sexp_opcode_struct opcodes[] = { diff --git a/opt/opcode_names.h b/opt/opcode_names.h index 52c639f9..88bc4387 100644 --- a/opt/opcode_names.h +++ b/opt/opcode_names.h @@ -1,8 +1,7 @@ static const char* reverse_opcode_names[] = - {"NOOP", "RAISE", "RESUMECC", "CALLCC", "APPLY1", - "TAIL-CALL", "CALL", "FCALL0", "FCALL1", "FCALL2", - "FCALL3", "FCALL4", "FCALL5", "FCALL6", "FCALLN", + {"NOOP", "RAISE", "RESUMECC", "CALLCC", "APPLY1", "TAIL-CALL", "CALL", + "FCALL0", "FCALL1", "FCALL2", "FCALL3", "FCALL4", "FCALLN", "JUMP-UNLESS", "JUMP", "PUSH", "DROP", "GLOBAL-REF", "GLOBAL-KNOWN-REF", "STACK-REF", "LOCAL-REF", "LOCAL-SET", "CLOSURE-REF", diff --git a/tools/genstubs.scm b/tools/genstubs.scm index cea7e543..ed187884 100755 --- a/tools/genstubs.scm +++ b/tools/genstubs.scm @@ -272,8 +272,6 @@ (s-args '())) (cond ((null? ls) - ;;(if (> i 6) - ;; (error "FFI currently only supports up to 6 scheme args" func)) (vector scheme-name c-name stub-name ret-type (reverse results) (reverse c-args) (reverse s-args))) (else diff --git a/vm.c b/vm.c index 88f0d728..d292aaab 100644 --- a/vm.c +++ b/vm.c @@ -722,22 +722,6 @@ sexp sexp_vm (sexp ctx, sexp proc) { ip += sizeof(sexp); sexp_check_exception(); break; - case SEXP_OP_FCALL5: - _ALIGN_IP(); - sexp_context_top(ctx) = top; - _ARG5 = ((sexp_proc6)sexp_opcode_func(_WORD0))(ctx sexp_api_pass(_WORD0, 5), _ARG1, _ARG2, _ARG3, _ARG4, _ARG5); - top -= 4; - ip += sizeof(sexp); - sexp_check_exception(); - break; - case SEXP_OP_FCALL6: - _ALIGN_IP(); - sexp_context_top(ctx) = top; - _ARG6 = ((sexp_proc7)sexp_opcode_func(_WORD0))(ctx sexp_api_pass(_WORD0, 6), _ARG1, _ARG2, _ARG3, _ARG4, _ARG5, _ARG6); - top -= 5; - ip += sizeof(sexp); - sexp_check_exception(); - break; #if SEXP_USE_EXTENDED_FCALL case SEXP_OP_FCALLN: _ALIGN_IP();