diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-03-24 18:02:53 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-03-24 18:02:53 -0700 |
commit | ac9173dd4bc7c93c057839badde2b116ee720fb8 (patch) | |
tree | dbd389fd45bd057e1eae35421bd0084cf5b88416 | |
parent | 391e452d897e272a70b81c784398d30f64d1d5a4 (diff) | |
download | txr-ac9173dd4bc7c93c057839badde2b116ee720fb8.tar.gz txr-ac9173dd4bc7c93c057839badde2b116ee720fb8.tar.bz2 txr-ac9173dd4bc7c93c057839badde2b116ee720fb8.zip |
compiler: fix wrong frame level in lexical functions.
* share/txr/stdlib/compiler.tl (sys:env extend-fun): The
v register's level is two less than the frame level.
Add missing ppred call; extend-var has it already.
-rw-r--r-- | share/txr/stdlib/compiler.tl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl index f7f23039..d9c89bea 100644 --- a/share/txr/stdlib/compiler.tl +++ b/share/txr/stdlib/compiler.tl @@ -79,7 +79,7 @@ (:method extend-fun (me sym) (when (assoc sym me.fb) (compile-error me.co.last-form "duplicate function ~s" sym)) - (let* ((loc ^(v ,me.lev ,(pinc me.v-cntr))) + (let* ((loc ^(v ,(ppred me.lev) ,(pinc me.v-cntr))) (bn (new binding sym sym loc loc env me))) (set me.fb (acons sym bn me.fb)))) |