From 0f5f2ac75b3b0b2ee6d9d38a40af8e4cf219c87a Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 28 Mar 2018 06:41:54 -0700 Subject: 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. --- share/txr/stdlib/compiler.tl | 12 +++++++----- 1 file 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))) -- cgit v1.2.3