aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabriel Dos Reis <gdr@axiomatics.org>2016-02-06 18:04:05 -0800
committerGabriel Dos Reis <gdr@axiomatics.org>2016-02-06 18:04:05 -0800
commit5cf787319081158829aa7641884b340bacf7b783 (patch)
tree5d5f5e08a9591900e18b4cc4f82a580da7417283 /src
parent7ad1bbdc6aa9780b9a7063299bf3b2d049106eed (diff)
downloadopen-axiom-5cf787319081158829aa7641884b340bacf7b783.tar.gz
Move $lookupDefaults out of newLookupInTable
Move $lookupDefaults to he callers of newLookupInTable to surface variabilities in the control flow.
Diffstat (limited to 'src')
-rw-r--r--src/interp/buildom.boot3
-rw-r--r--src/interp/nrunfast.boot10
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,