From dcc3ba9f9929cfc3047bd2738ee8fa4d88804ca4 Mon Sep 17 00:00:00 2001 From: Gabriel Dos Reis Date: Sun, 7 Feb 2016 02:58:48 -0800 Subject: Various cleanups Use `domainDirectory dom` instead of `domainRef(dom,1)`. --- src/interp/buildom.boot | 4 ++-- src/interp/nruncomp.boot | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/interp/buildom.boot b/src/interp/buildom.boot index 20ae27a2..e6c7c97d 100644 --- a/src/interp/buildom.boot +++ b/src/interp/buildom.boot @@ -157,7 +157,7 @@ compiledLookup(op,sig,dollar) == basicLookup(op,sig,dollar,dollar) lookupInDomainVector(op,sig,domain,dollar) == - SPADCALL(op,sig,dollar,domainRef(domain,1)) + SPADCALL(op,sig,dollar,domainDirectory domain) lookupInDomain(op,sig,addFormDomain,dollar,index) == addFormCell := vectorRef(addFormDomain,index) => @@ -304,7 +304,7 @@ lookupInTable(op,sig,dollar,[domain,table]) == slot success isnt 'failed and success ~= nil => success subsumptionSig ~= nil and - (u := SPADCALL(op,subsumptionSig,dollar,domainRef(domain,1))) => u + (u := lookupInDomainVector(op,subsumptionSig,domain,dollar)) => u someMatch => lookupInAddChain(op,sig,domain,dollar) nil diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot index c8c692a2..f982e494 100644 --- a/src/interp/nruncomp.boot +++ b/src/interp/nruncomp.boot @@ -393,15 +393,15 @@ stuffDomainSlots dollar == domname := devaluate dollar infovec := property(opOf domname,'infovec) lookupFunction := symbolFunction getLookupFun infovec - template := infovec.0 + template := first infovec if vectorRef(template,$AddChainIndex) then stuffSlot(dollar,$AddChainIndex,vectorRef(template,$AddChainIndex)) - for i in ($NRTbase + # rest domname)..maxIndex template + for i in ($NRTbase + # domname.args)..maxIndex template | item := vectorRef(template,i) repeat stuffSlot(dollar,i,item) - domainDirectory(dollar) := [lookupFunction,dollar,infovec.1] - domainAttributes(dollar) := infovec.2 - proto4 := infovec.3 + domainDirectory(dollar) := [lookupFunction,dollar,second infovec] + domainAttributes(dollar) := third infovec + proto4 := fourth infovec domainData(dollar) := vector? CDDR proto4 => [COPY_-SEQ first proto4,:rest proto4] --old style bitVector := domainPredicates dollar -- cgit v1.2.3