aboutsummaryrefslogtreecommitdiff
path: root/src/interp/nruncomp.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2007-12-12 07:44:36 +0000
committerdos-reis <gdr@axiomatics.org>2007-12-12 07:44:36 +0000
commit6d7d09414b6a40d3005b591ed05f2f466a4494f0 (patch)
tree3caaf1c274428eecaad29cf876f983f9b510e40f /src/interp/nruncomp.boot
parent59c74f79255a713a633fc6b7ca3e18ff89d018b7 (diff)
downloadopen-axiom-6d7d09414b6a40d3005b591ed05f2f466a4494f0.tar.gz
* compiler.boot (comp3): Use isQuasiquote.
(compSymbol): Use condition type view for non Union objects. (getUniqueCaseView): New. Subroutine of compSymbol. (compForm2): Don't infer type for flag parameter through unique compilcation. (checkCallingConvention): New. (compileQuasiquote): coerce, don't convert. (compCase1): Handle non Union type object through modemap selection. (maybeSpliceMode): New. Subroutine of compCase1. Register special form compiler with their names, not pointers. * define.boot (candidateSignatures): New. (hasSigInTargetCategory): Use it. Tidy. (checkAndDeclare): Use isQuasiquote. (spadCompileorSetq): Rename non atomic parameters before calling LISP compiler. * g-util.boot (quasiquote): New. (isQuasiquote): Likewise. * i-intern.boot (flagArguments): New. (signatureFromModemap): Likewise. (mkAtree3): Use them. Handle functions taking flag arguments. * i-object.boot (getFlagArgsPos): New. * i-spec1.boot (userDefinedCase): Now prepare form and hands back to bottomUp. (upcase): Adjust call to userDefinedCase. * modemap.boot (addDomain): Don't add flag domains to the environment. * nruncomp.boot (NRTencode): Handle flag values. (NRTgetLocalIndex1): Likewise. * nrunfast.boot (lazyMatch): Likewise. (newExpandLocalTypeForm): Likewise. * sys-constants.boot ($DummyFunctorNames): Include quasiquote constructor. * template.boot (NRTaddInner): Handle flag values.
Diffstat (limited to 'src/interp/nruncomp.boot')
-rw-r--r--src/interp/nruncomp.boot14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot
index 15468369..b732ece8 100644
--- a/src/interp/nruncomp.boot
+++ b/src/interp/nruncomp.boot
@@ -106,6 +106,7 @@ NRTencode(x,y) == encode(x,y,true) where encode(x,compForm,firstTime) ==
QCAR x='Record or x is ['Union,['_:,a,b],:.] =>
[QCAR x,:[['_:,a,encode(b,c,false)]
for [.,a,b] in QCDR x for [.,=a,c] in CDR compForm]]
+ isQuasiquote x => x
constructor? QCAR x or MEMQ(QCAR x,'(Union Mapping)) =>
[QCAR x,:[encode(y,z,false) for y in QCDR x for z in CDR compForm]]
['NRTEVAL,NRTreplaceAllLocalReferences COPY_-TREE lispize compForm]
@@ -244,11 +245,20 @@ NRTgetLocalIndex1(item,killBindingIfTrue) ==
$NRTdeltaListComp:=[item,:$NRTdeltaListComp]
$NRTdeltaLength := $NRTdeltaLength+1
$NRTbase + $NRTdeltaLength - 1
- $NRTdeltaList:= [['domain,NRTaddInner item,:value],:$NRTdeltaList]
+ -- when assigning slot to flag values, we don't really want to
+ -- compile them. Rather, we want to record them as if they were atoms.
+ flag := isQuasiquote item
+ $NRTdeltaList:= [['domain,(flag => item; NRTaddInner item),:value],
+ :$NRTdeltaList]
saveNRTdeltaListComp:= $NRTdeltaListComp:=[nil,:$NRTdeltaListComp]
saveIndex := $NRTbase + $NRTdeltaLength
$NRTdeltaLength := $NRTdeltaLength+1
- compEntry:= (compOrCroak(item,$EmptyMode,$e)).expr
+ compEntry:=
+ -- we don't need to compile the flag again.
+ -- ??? In fact we should not be compiling again at this phase.
+ -- ??? That we do is likely a bug.
+ flag => item
+ (compOrCroak(item,$EmptyMode,$e)).expr
-- item
RPLACA(saveNRTdeltaListComp,compEntry)
saveIndex