diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-03-16 06:59:23 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-03-16 06:59:23 -0700 |
commit | 9cafad653dbb6b09c6ee283fb105d000e0c8c0c2 (patch) | |
tree | f2eb550bd8b30bb32a05e7689aec56ba5f4867e1 | |
parent | 5e6871023c4eac56dfec7fc2b4ea56e41af72e0c (diff) | |
download | txr-9cafad653dbb6b09c6ee283fb105d000e0c8c0c2.tar.gz txr-9cafad653dbb6b09c6ee283fb105d000e0c8c0c2.tar.bz2 txr-9cafad653dbb6b09c6ee283fb105d000e0c8c0c2.zip |
compiler: trim unused accumulation from var-spy.
The var-spy structure is only being used for detecting
captured variables, not assigned or accessed variables.
So the information about accessed and assigned is being
wastefully accumulated, never used.
* share/txr/stdlib/compiler.tl (struct var-spy): Remove slots
acc-vars and set-vars.
(var-spy accessed, var-spy assigned): Methods become no-ops.
-rw-r--r-- | share/txr/stdlib/compiler.tl | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl index c3e11d94..622ac476 100644 --- a/share/txr/stdlib/compiler.tl +++ b/share/txr/stdlib/compiler.tl @@ -140,17 +140,11 @@ (defstruct var-spy () env - acc-vars - set-vars cap-vars - (:method accessed (me vbin sym) - (when (eq vbin.env me.env) - (pushnew sym me.acc-vars))) + (:method accessed (me vbin sym)) - (:method assigned (me vbin sym) - (when (eq vbin.env me.env) - (pushnew sym me.set-vars))) + (:method assigned (me vbin sym)) (:method captured (me vbin sym) (when (eq vbin.env me.env) |