mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-19 18:20:22 +02:00
sundries: side effects in interpreted repl, wrong-num-args in vm, self-checks
* libguile/vm-engine.c (vm_error_wrong_num_args): Sync the registers before calling scm_wrong_num_args. (The other cases are handled more uniformly.) * libguile/vm.c (vm_heapify_frames_1): Add a FIXME: I don't think we should be modifying the stack. (scm_vm_save_stack): If stack nulling is enabled, verify the stack here before reifying it. * module/language/scheme/spec.scm (scheme): Use primitive-eval here instead of eval, because at the repl we do want to allow evaluations to have side effects like setting the current module.
This commit is contained in:
parent
1bb6b839ec
commit
0570c3f197
3 changed files with 10 additions and 1 deletions
|
@ -152,6 +152,9 @@ vm_run (SCM vm, SCM program, SCM args)
|
|||
|
||||
vm_error_wrong_num_args:
|
||||
/* nargs and program are valid */
|
||||
SYNC_ALL ();
|
||||
if (objects)
|
||||
scm_array_handle_release (&objects_handle);
|
||||
scm_wrong_num_args (program);
|
||||
/* shouldn't get here */
|
||||
goto vm_error;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue