From 5cf787319081158829aa7641884b340bacf7b783 Mon Sep 17 00:00:00 2001 From: Gabriel Dos Reis Date: Sat, 6 Feb 2016 18:04:05 -0800 Subject: Move $lookupDefaults out of newLookupInTable Move $lookupDefaults to he callers of newLookupInTable to surface variabilities in the control flow. --- src/interp/buildom.boot | 3 +-- src/interp/nrunfast.boot | 10 ++++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/interp/buildom.boot b/src/interp/buildom.boot index 3201ee43..20ae27a2 100644 --- a/src/interp/buildom.boot +++ b/src/interp/buildom.boot @@ -178,8 +178,7 @@ lookupInDomainAndDefaults(op,sig,domain,dollar,useDefaults) == basicLookup(op,sig,domain,dollar) == item := domainDirectory domain - cons? item and first item in '(lookupInDomain lookupInTable) => - lookupInDomainVector(op,sig,domain,dollar) + item is ['lookupInTable,:.] => lookupInDomainVector(op,sig,domain,dollar) ----------new world code follows------------ u := lookupInDomainAndDefaults(op,sig,domain,dollar,false) => u lookupInDomainAndDefaults(op,sig,domain,dollar,true) diff --git a/src/interp/nrunfast.boot b/src/interp/nrunfast.boot index c160002f..4d0316f6 100644 --- a/src/interp/nrunfast.boot +++ b/src/interp/nrunfast.boot @@ -153,17 +153,19 @@ replaceGoGetSlot env == --======================================================= lookupComplete(op,sig,dollar,env) == + $lookupDefaults => + newLookupInCategories(op,sig,first env,dollar) --lookup first in my cats + or newLookupInAddChain(op,sig,first env,dollar) newLookupInTable(op,sig,dollar,env,false) lookupIncomplete(op,sig,dollar,env) == + $lookupDefaults => + newLookupInCategories(op,sig,first env,dollar) --lookup first in my cats + or newLookupInAddChain(op,sig,first env,dollar) newLookupInTable(op,sig,dollar,env,true) newLookupInTable(op,sig,dollar,[domain,opvec],flag) == dollar = nil => systemError() - $lookupDefaults => - newLookupInCategories(op,sig,domain,dollar) --lookup first in my cats - or newLookupInAddChain(op,sig,domain,dollar) - --fast path when called from newGoGet success := false if $monitorNewWorld then sayLooking(concat('"---->",form2String devaluate domain, -- cgit v1.2.3