mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 20:00:19 +02:00
rename "closure-ref" to "free-ref"; s/vars/variables/ in some names
* libguile/programs.h: * libguile/programs.c: (SCM_PROGRAM_FREE_VARIABLES): Rename from SCM_PROGRAM_FREE_VARS. Callers changed. * libguile/programs.c (scm_make_program): Rename arg to "free_variables". (scm_program_free_variables): Rename from program-free-vars. * libguile/vm-engine.h: * libguile/vm-engine.c (VM_CHECK_FREE_VARIABLES): Rename from VM_CHECK_CLOSURE. (vm_engine, CACHE_PROGRAM): Rename closure and closure_count to free_vars and free_vars_vount. * libguile/vm-i-system.c (FREE_VARIABLE_REF): Rename from CLOSURE_REF. (free-ref, free-boxed-ref, free-boxed-set): Rename from closure-ref, closure-boxed-ref, closure-boxed-set. (make-closure): Renamed from make-closure2. * module/language/glil/compile-assembly.scm (glil->assembly): Hack to never write out the the old "make-closure" instruction. Will fix better later. Change to emit free-ref etc instead of closure-ref. * module/language/tree-il/compile-glil.scm (flatten): Emit make-closure instead of make-closure2, now that the old make-closure is gone. * module/system/vm/program.scm (system): Rename program-free-vars to program-free-variables. * test-suite/tests/tree-il.test ("lambda"): Update for make-closure.
This commit is contained in:
parent
20d47c3915
commit
57ab0671d7
9 changed files with 49 additions and 49 deletions
|
@ -152,16 +152,16 @@
|
|||
} \
|
||||
} \
|
||||
{ \
|
||||
SCM c = SCM_PROGRAM_FREE_VARS (program); \
|
||||
SCM c = SCM_PROGRAM_FREE_VARIABLES (program); \
|
||||
if (SCM_I_IS_VECTOR (c)) \
|
||||
{ \
|
||||
closure = SCM_I_VECTOR_WELTS (c); \
|
||||
closure_count = SCM_I_VECTOR_LENGTH (c); \
|
||||
free_vars = SCM_I_VECTOR_WELTS (c); \
|
||||
free_vars_count = SCM_I_VECTOR_LENGTH (c); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
closure = NULL; \
|
||||
closure_count = 0; \
|
||||
free_vars = NULL; \
|
||||
free_vars_count = 0; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
@ -189,11 +189,11 @@
|
|||
#define CHECK_OBJECT(_num)
|
||||
#endif
|
||||
|
||||
#if VM_CHECK_CLOSURE
|
||||
#define CHECK_CLOSURE(_num) \
|
||||
do { if (SCM_UNLIKELY ((_num) >= closure_count)) goto vm_error_closure; } while (0)
|
||||
#if VM_CHECK_FREE_VARIABLES
|
||||
#define CHECK_FREE_VARIABLE(_num) \
|
||||
do { if (SCM_UNLIKELY ((_num) >= free_vars_count)) goto vm_error_free_variable; } while (0)
|
||||
#else
|
||||
#define CHECK_CLOSURE(_num)
|
||||
#define CHECK_FREE_VARIABLE(_num)
|
||||
#endif
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue