diff options
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/interp/Makefile.in | 4 | ||||
-rw-r--r-- | src/interp/Makefile.pamphlet | 4 | ||||
-rw-r--r-- | src/interp/c-util.boot | 14 | ||||
-rw-r--r-- | src/interp/g-opt.boot | 2 | ||||
-rw-r--r-- | src/interp/g-util.boot | 20 | ||||
-rw-r--r-- | src/interp/nruncomp.boot | 3 |
7 files changed, 30 insertions, 22 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 8c439650..7c5e2ac4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2010-07-24 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/c-util.boot (usedSymbol?): Move to g-util.boot. + * interp/nruncomp.boot (NRTsetVector4a): Tidy. + +2010-07-24 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/cattable.boot: Use %true for truth value in VM expressions. * interp/clam.boot: Likewise. * interp/define.boot: Likewise. diff --git a/src/interp/Makefile.in b/src/interp/Makefile.in index fcc44219..bf46316f 100644 --- a/src/interp/Makefile.in +++ b/src/interp/Makefile.in @@ -397,11 +397,11 @@ info.$(FASLEXT): g-util.$(FASLEXT) slam.$(FASLEXT): g-timer.$(FASLEXT) clammed.$(FASLEXT): g-timer.$(FASLEXT) clam.$(FASLEXT): g-timer.$(FASLEXT) -g-opt.$(FASLEXT): macros.$(FASLEXT) +g-opt.$(FASLEXT): g-util.$(FASLEXT) g-timer.$(FASLEXT): macros.$(FASLEXT) g-util.$(FASLEXT) msgdb.$(FASLEXT): g-util.$(FASLEXT) g-error.$(FASLEXT): diagnostics.$(FASLEXT) g-util.$(FASLEXT) -c-util.$(FASLEXT): g-util.$(FASLEXT) g-opt.$(FASLEXT) +c-util.$(FASLEXT): g-opt.$(FASLEXT) pathname.$(FASLEXT): nlib.$(FASLEXT) hashcode.$(FASLEXT): g-util.$(FASLEXT) pspad2.$(FASLEXT): pspad1.$(FASLEXT) diff --git a/src/interp/Makefile.pamphlet b/src/interp/Makefile.pamphlet index 8f92fc07..c3714e72 100644 --- a/src/interp/Makefile.pamphlet +++ b/src/interp/Makefile.pamphlet @@ -636,11 +636,11 @@ info.$(FASLEXT): g-util.$(FASLEXT) slam.$(FASLEXT): g-timer.$(FASLEXT) clammed.$(FASLEXT): g-timer.$(FASLEXT) clam.$(FASLEXT): g-timer.$(FASLEXT) -g-opt.$(FASLEXT): macros.$(FASLEXT) +g-opt.$(FASLEXT): g-util.$(FASLEXT) g-timer.$(FASLEXT): macros.$(FASLEXT) g-util.$(FASLEXT) msgdb.$(FASLEXT): g-util.$(FASLEXT) g-error.$(FASLEXT): diagnostics.$(FASLEXT) g-util.$(FASLEXT) -c-util.$(FASLEXT): g-util.$(FASLEXT) g-opt.$(FASLEXT) +c-util.$(FASLEXT): g-opt.$(FASLEXT) pathname.$(FASLEXT): nlib.$(FASLEXT) hashcode.$(FASLEXT): g-util.$(FASLEXT) pspad2.$(FASLEXT): pspad1.$(FASLEXT) diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot index aa70575f..ca04d4fa 100644 --- a/src/interp/c-util.boot +++ b/src/interp/c-util.boot @@ -162,20 +162,6 @@ wantArgumentsAsTuple: (%List,%Signature) -> %Boolean wantArgumentsAsTuple(args,sig) == isHomoegenousVarargSignature sig and #args ~= #sig -$AbstractionOperator == - '(LAM ILAM SLAM SPADSLAM LAMBDA) - -++ Return true if the symbol 's' is used in the form 'x'. -usedSymbol?(s,x) == - symbol? x => s = x - atom x => false - x is ['QUOTE,:.] => false - x is [op,parms,:body] and op in $AbstractionOperator => - x in parms => false - usedSymbol?(x,body) - or/[usedSymbol?(s,x') for x' in x] - - ++ We are about to seal the (Lisp) definition of a function. ++ Augment the body of any function definition in the form `x' ++ with declarations for unused parameters. diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot index 2bc01ca1..8224b450 100644 --- a/src/interp/g-opt.boot +++ b/src/interp/g-opt.boot @@ -32,7 +32,7 @@ -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -import macros +import g_-util namespace BOOT --% diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot index 13acbdc6..5d6cd5a9 100644 --- a/src/interp/g-util.boot +++ b/src/interp/g-util.boot @@ -44,8 +44,24 @@ module g_-util where mkList: %List -> %List isSubDomain: (%Mode,%Mode) -> %Form expandToVMForm: %Thing -> %Thing - - + usedSymbol?: (%Symbol,%Code) -> %Boolean + +--% + +$AbstractionOperator == + '(LAM ILAM SLAM SPADSLAM LAMBDA) + +++ Return true if the symbol 's' is used in the form 'x'. +usedSymbol?(s,x) == + symbol? x => s = x + atom x => false + x is ['QUOTE,:.] => false + x is [op,parms,:body] and op in $AbstractionOperator => + s in parms => false + usedSymbol?(s,body) + or/[usedSymbol?(s,x') for x' in x] + + --% VM forms ++ Make the assumption named `prop' for all symbols diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot index 965c851f..ffe06c58 100644 --- a/src/interp/nruncomp.boot +++ b/src/interp/nruncomp.boot @@ -557,7 +557,8 @@ reverseCondlist cl == NRTsetVector4a(sig,form,cond) == sig = '$ => domainList := - [optimize COPY KAR comp(d,$EmptyMode,$e) or d for d in $domainShell.4.0] + [optimize COPY comp(d,$EmptyMode,$e).expr or d + for d in $domainShell.4.0] $uncondList := append(domainList,$uncondList) if isCategoryForm(form,$e) then $uncondList := [form,:$uncondList] $uncondList |