mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-23 21:13:18 -08:00
interpreter: don't create closures for null lexenv
We have created empty closure for instance when flet was in null lexenv. Check for Null in close_over and create t_bclosure only for non-null lexical environments.
This commit is contained in:
parent
67e9c5bef0
commit
857ea3d928
1 changed files with 3 additions and 1 deletions
|
|
@ -206,9 +206,11 @@ _ecl_bclosure_dispatch_vararg(cl_narg narg, ...)
|
|||
|
||||
static cl_object
|
||||
close_around(cl_object fun, cl_object lex) {
|
||||
cl_object v = ecl_alloc_object(t_bclosure);
|
||||
cl_object v;
|
||||
if (Null(lex)) return fun;
|
||||
if (ecl_t_of(fun) != t_bytecodes)
|
||||
FEerror("!!!", 0);
|
||||
v = ecl_alloc_object(t_bclosure);
|
||||
v->bclosure.code = fun;
|
||||
v->bclosure.lex = lex;
|
||||
v->bclosure.entry = _ecl_bclosure_dispatch_vararg;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue