From fdffee8492600045e35fc54c3379e559c66f8d19 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Thu, 24 Nov 2011 14:21:24 +0000 Subject: * interp/nruncomp.boot (changeDirectoryInSlot1,sigloc): Add first parameter as a DB. Adjust caller. (NRTsubstDelta): Tidy. --- src/ChangeLog | 6 ++++++ src/interp/nruncomp.boot | 26 ++++++++++++++------------ 2 files changed, 20 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 9b0cc8cc..acb9f170 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-11-24 Gabriel Dos Reis + + * interp/nruncomp.boot (changeDirectoryInSlot1,sigloc): Add first + parameter as a DB. Adjust caller. + (NRTsubstDelta): Tidy. + 2011-11-23 Gabriel Dos Reis * interp/functor.boot (findOperatorImplementations): Rename from diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot index 319c5f23..b1724d82 100644 --- a/src/interp/nruncomp.boot +++ b/src/interp/nruncomp.boot @@ -619,14 +619,14 @@ changeDirectoryInSlot1 db == --called by buildFunctor -- if called inside buildFunctor, $NRTdeltaLength gives different locs -- otherwise called from compFunctorBody (all lookups are forwarded): -- $NRTdeltaList = nil ===> all slot numbers become nil - $lisplibOperationAlist := [sigloc entry for entry in categoryExports $domainShell] where - sigloc [opsig,pred,fnsel] == + $lisplibOperationAlist := [sigloc(db,entry) for entry in categoryExports $domainShell] where + sigloc(db,[opsig,pred,fnsel]) == if pred isnt 'T then pred := simpBool pred $NRTslot1PredicateList := insert(pred,$NRTslot1PredicateList) - fnsel is [op,a,:.] and (op is 'ELT or op is 'CONST) => + fnsel is [op,a,:.] and op in '(ELT CONST) => if $insideCategoryPackageIfTrue then - opsig := substitute('$,second($functorForm),opsig) + opsig := substitute('$,first dbParameters db,opsig) [opsig,pred,[op,a,vectorLocation(first opsig,second opsig)]] [opsig,pred,fnsel] sortedOplist := listSort(function GLESSEQP, @@ -662,19 +662,21 @@ vectorLocation(op,sig) == u => $NRTdeltaLength - u + $NRTbase nil -- this signals that calls should be forwarded -NRTsubstDelta(initSig) == - sig := [replaceSlotTypes s for s in initSig] where - replaceSlotTypes(t) == +NRTsubstDelta sig == + [replaceSlotTypes t for t in sig] where + replaceSlotTypes t == t isnt [.,:.] => not integer? t => t - t = 0 => '$ - t = 2 => '_$_$ + t = 0 => "$" + t = 2 => "$$" t = 5 => $NRTaddForm - u:= $NRTdeltaList.($NRTdeltaLength+5-t) + u := $NRTdeltaList.($NRTdeltaLength+5-t) first u = "%domain" => second u error "bad $NRTdeltaList entry" - first t in '(Mapping Union Record _:) => - [first t,:[replaceSlotTypes(x) for x in rest t]] + t is [":",x,t'] => [t.op,x,replaceSlotTypes t'] + first t in '(Enumeration EnumerationCategory) => t + ident? first t and builtinConstructor? first t => + [t.op,:[replaceSlotTypes(x) for x in t.args]] t -----------------------------SLOT1 DATABASE------------------------------------ -- cgit v1.2.3