diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-03-28 06:41:54 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-03-28 06:41:54 -0700 |
commit | cc26fcea4cf2f5ee3f85809e1a373a7e39a7ea2f (patch) | |
tree | f7897c2bf84596d5dd47f3994ccee597447fb391 | |
parent | c2b3237bea99b43d0a68d4117d42ca0bfb7ef81e (diff) | |
download | txr-cc26fcea4cf2f5ee3f85809e1a373a7e39a7ea2f.tar.gz txr-cc26fcea4cf2f5ee3f85809e1a373a7e39a7ea2f.tar.bz2 txr-cc26fcea4cf2f5ee3f85809e1a373a7e39a7ea2f.zip |
compiler: move some lookup tables out of compiler struct.
* share/txr/stdlib/compiler.tl (compiler): Remove gcallop and
callop static members.
(%gcall-op%, %call-op%): New global variables.
(compiler comp-fun-form): Use new globals instead of old
static members.
-rw-r--r-- | share/txr/stdlib/compiler.tl | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl index 1e089402..65d66a24 100644 --- a/share/txr/stdlib/compiler.tl +++ b/share/txr/stdlib/compiler.tl @@ -116,9 +116,11 @@ (data (hash :eql-based)) (fidx (hash :eql-based)) (ftab (hash :eql-based)) - last-form - (:static gcallop (relate '(apply usr:apply call) '(gapply gapply gcall))) - (:static callop (relate '(apply usr:apply call) '(apply apply call)))) + last-form) + +(defvarl %gcall-op% (relate '(apply usr:apply call) '(gapply gapply gcall))) + +(defvarl %call-op% (relate '(apply usr:apply call) '(apply apply call))) (defmeth compiler get-dreg (me atom) (condlet @@ -806,8 +808,8 @@ (defmeth compiler comp-fun-form (me oreg env sym args) (caseql sym ((call apply usr:apply) - (let ((gopcode [me.gcallop sym]) - (opcode [me.callop sym])) + (let ((gopcode [%gcall-op% sym]) + (opcode [%call-op% sym])) (tree-case (car args) ((op arg) (if (and (eq op 'fun) (bindable arg)) (let ((fbind env.(lookup-fun arg))) |