1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-14 07:30:32 +02:00

Update error-wrong-num-args intrinsic prototype

* libguile/intrinsics.h (SCM_FOR_ALL_VM_INTRINSICS):
* libguile/intrinsics.c (error_wrong_num_args): Take the thread as an
  arg, instead of the ostensible callee.
* libguile/vm-engine.c: Update callers of wrong-num-args intrinsic to
  pass a thread instead.
This commit is contained in:
Andy Wingo 2018-08-13 10:59:09 +02:00
parent 5df43b60a9
commit 11940f4c72
3 changed files with 15 additions and 6 deletions

View file

@ -885,7 +885,7 @@ VM_NAME (scm_thread *thread)
uint32_t expected;
UNPACK_24 (op, expected);
VM_ASSERT (FRAME_LOCALS_COUNT () == expected,
CALL_INTRINSIC (error_wrong_num_args, (FP_REF (0))));
CALL_INTRINSIC (error_wrong_num_args, (thread)));
NEXT (1);
}
VM_DEFINE_OP (22, assert_nargs_ge, "assert-nargs-ge", OP1 (X8_C24))
@ -893,7 +893,7 @@ VM_NAME (scm_thread *thread)
uint32_t expected;
UNPACK_24 (op, expected);
VM_ASSERT (FRAME_LOCALS_COUNT () >= expected,
CALL_INTRINSIC (error_wrong_num_args, (FP_REF (0))));
CALL_INTRINSIC (error_wrong_num_args, (thread)));
NEXT (1);
}
VM_DEFINE_OP (23, assert_nargs_le, "assert-nargs-le", OP1 (X8_C24))
@ -901,7 +901,7 @@ VM_NAME (scm_thread *thread)
uint32_t expected;
UNPACK_24 (op, expected);
VM_ASSERT (FRAME_LOCALS_COUNT () <= expected,
CALL_INTRINSIC (error_wrong_num_args, (FP_REF (0))));
CALL_INTRINSIC (error_wrong_num_args, (thread)));
NEXT (1);
}
@ -1001,7 +1001,7 @@ VM_NAME (scm_thread *thread)
uint16_t expected, nlocals;
UNPACK_12_12 (op, expected, nlocals);
VM_ASSERT (FRAME_LOCALS_COUNT () == expected,
CALL_INTRINSIC (error_wrong_num_args, (FP_REF (0))));
CALL_INTRINSIC (error_wrong_num_args, (thread)));
ALLOC_FRAME (expected + nlocals);
while (nlocals--)
SP_SET (nlocals, SCM_UNDEFINED);