mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 01:00:20 +02:00
Add opcodes for struct?',
struct-vtable', and `make-struct'.
* libguile/vm-engine.c (VM_NAME)[vm_error_not_a_struct]: New label. * libguile/vm-i-scheme.c (VM_VALIDATE_STRUCT): New macro. (struct_p, struct_vtable, make_struct): New instructions. * module/language/tree-il/compile-glil.scm (*primcall-ops*): Add `struct?', `struct-vtable', and `make-struct'. * module/language/tree-il/primitives.scm (*interesting-primitive-names*, *effect-free-primitives*): Likewise.
This commit is contained in:
parent
6c20a0b34b
commit
bd91ecce14
4 changed files with 46 additions and 0 deletions
|
@ -206,6 +206,12 @@ VM_NAME (struct scm_vm *vp, SCM program, SCM *argv, int nargs)
|
|||
/* shouldn't get here */
|
||||
goto vm_error;
|
||||
|
||||
vm_error_not_a_struct:
|
||||
SYNC_ALL ();
|
||||
scm_wrong_type_arg_msg (FUNC_NAME, 1, finish_args, "struct");
|
||||
/* shouldn't get here */
|
||||
goto vm_error;
|
||||
|
||||
vm_error_no_values:
|
||||
err_msg = scm_from_locale_string ("Zero values returned to single-valued continuation");
|
||||
finish_args = SCM_EOL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue