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 | 2b03d9ef5ce730f19780c370899d23fb78be9be7 (patch) | |
tree | f2eb550bd8b30bb32a05e7689aec56ba5f4867e1 | |
parent | 2d0246738d70c88aed410689df356f443838d5c2 (diff) | |
download | txr-2b03d9ef5ce730f19780c370899d23fb78be9be7.tar.gz txr-2b03d9ef5ce730f19780c370899d23fb78be9be7.tar.bz2 txr-2b03d9ef5ce730f19780c370899d23fb78be9be7.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) |