From 67662ec6afcd7450d73a1481e676ca5007f8720d Mon Sep 17 00:00:00 2001 From: Gabriel Dos Reis Date: Sat, 26 Dec 2015 22:54:33 -0800 Subject: Remove dead and bogus code for constant assginments. --- src/ChangeLog | 8 ++++++++ src/interp/functor.boot | 13 +------------ src/interp/nruncomp.boot | 5 +---- 3 files changed, 10 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 3b124755..08edbd6d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2015-12-26 Gabriel Dos Reis + + * interp/nruncomp.boot (buildFunctor): Remove use of + $ConstantAssignments. + * interp/functor.boot (DescendCode): Remove dead and bogus code + for constant creation. + (ConstantCreator): Remove. + 2015-12-26 Gabriel Dos Reis * interp/functor.boot (addConditionToGuard): New. Split out of diff --git a/src/interp/functor.boot b/src/interp/functor.boot index b068f9e2..d58357b7 100644 --- a/src/interp/functor.boot +++ b/src/interp/functor.boot @@ -481,12 +481,7 @@ DescendCode(db,code,flag,viewAssoc,e) == u := symbolTarget('$,viewAssoc) => ['getDomainView,'$,u] '$ body:= ['CONS,implem,dom] - u := SetFunctionSlots(sig,body,flag,'original) - ConstantCreator u => - if flag ~= true then u:= ['%when,[ProcessCond(db,flag,e),u]] - $ConstantAssignments:= [u,:$ConstantAssignments] - nil - u + SetFunctionSlots(sig,body,flag,'original) code is ['_:,:.] => (code.first := '%list; code.rest := nil) --Yes, I know that's a hack, but how else do you kill a line? code is ['%list,:.] => nil @@ -497,12 +492,6 @@ DescendCode(db,code,flag,viewAssoc,e) == stackWarning('"unknown Functor code: %1 ",[code]) code -ConstantCreator u == - null u => false - u is ['%store,['%tref,.,.],u'] => ConstantCreator u' - u is ['CONS,:.] => false - true - ProcessCond(db,cond,e) == ncond := dbSubstituteFormals(db,cond) valuePosition(ncond,$NRTslot1PredicateList) => predicateBitRef(db,ncond,e) diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot index 761dd2a7..1e413c64 100644 --- a/src/interp/nruncomp.boot +++ b/src/interp/nruncomp.boot @@ -449,7 +449,6 @@ buildFunctor(db,sig,code,$locals,$e) == $GENNO: local:= 0 --bound in compDefineFunctor1, then as parameter here $hasCategoryAlist: local := nil --list of GENSYMs bound to (HasCategory ..) items $SetFunctions: local := nil --copy of p view with preds telling when fnct defined - $ConstantAssignments: local := nil --code for creation of constants $epilogue: local := nil --code to set slot 5, things to be done last $HackSlot4: local := nil --Invention of JHD 13/July/86-set in InvestigateConditions $extraParms:local := nil --Set in DomainSubstitutionFunction @@ -515,9 +514,7 @@ buildFunctor(db,sig,code,$locals,$e) == [addToSlam($definition,"$")] --CODE: part 3 - $ConstantAssignments := - [NRTputInLocalReferences(db,code) for code in $ConstantAssignments] - codePart3 := [:$ConstantAssignments,:$epilogue] + codePart3 := $epilogue ans := ["%bind",bindings, ['%seq,:washFunctorBody optFunctorBody [:codePart1,:codePart2,:codePart3],"$"]] -- cgit v1.2.3