mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-15 18:20:42 +02:00
* eval.c (SCM_CEVAL): Allow structs implanted in code.
Previously, structs implanted in code were interpreted as forms the operator of which was a gloc. We solve this by checking for the zero in the emulated vcell in the struct vtable. Since implanted structs always will look like forms with a gloc operator, execution will only be slowed down by maximally one extra test-and-branch per application.
This commit is contained in:
parent
dc61592f84
commit
aa00bd1e54
2 changed files with 17 additions and 0 deletions
|
@ -1,3 +1,17 @@
|
|||
1998-11-21 Mikael Djurfeldt <mdj@kenneth>
|
||||
|
||||
* eval.c (SCM_CEVAL): Allow structs implanted in code.
|
||||
Previously, structs implanted in code were interpreted as forms
|
||||
the operator of which was a gloc. We solve this by checking for
|
||||
the zero in the emulated vcell in the struct vtable. Since
|
||||
implanted structs always will look like forms with a gloc
|
||||
operator, execution will only be slowed down by maximally one
|
||||
extra test-and-branch per application.
|
||||
|
||||
* evalext.c (scm_definedp): Removed check for isyms; Added a
|
||||
second optional argument: It is now possible to supply an
|
||||
evaluation environment in which to look for the symbol.
|
||||
|
||||
1998-11-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
|
||||
|
||||
* readline.c (scm_init_readline): Set
|
||||
|
|
|
@ -1995,6 +1995,9 @@ dispatch:
|
|||
|
||||
case scm_tcs_cons_gloc:
|
||||
proc = SCM_GLOC_VAL (SCM_CAR (x));
|
||||
if (proc == 0)
|
||||
/* This is a struct implanted in the code, not a gloc. */
|
||||
RETURN (x);
|
||||
SCM_ASRTGO (SCM_NIMP (proc), badfun);
|
||||
#ifndef SCM_RECKLESS
|
||||
#ifdef SCM_CAUTIOUS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue