diff options
| author | dos-reis <gdr@axiomatics.org> | 2008-07-11 05:50:50 +0000 | 
|---|---|---|
| committer | dos-reis <gdr@axiomatics.org> | 2008-07-11 05:50:50 +0000 | 
| commit | 399987a5a7145d813097cc0ed4552700bf39e2f4 (patch) | |
| tree | 68997709f4c960cce336ef692d7959b03a757641 /src | |
| parent | 419a88b7d6a8c0248c17c47a9a46b0aab0b5936f (diff) | |
| download | open-axiom-399987a5a7145d813097cc0ed4552700bf39e2f4.tar.gz | |
	* interp/nruncomp.boot (NRTencode): Don't encode enumerations.
	(listofBoundVars): Enumerations don't bind any varaible.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/interp/nruncomp.boot | 12 | 
2 files changed, 13 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index aaf4c0cb..e5565cb3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-07-11  Gabriel Dos Reis  <gdr@cs.tamu.edu> + +	* interp/nruncomp.boot (NRTencode): Don't encode enumerations. +	(listofBoundVars): Enumerations don't bind any varaible. +  2008-07-10  Gabriel Dos Reis  <gdr@cs.tamu.edu>  	* interp/compiler.boot (compQuote): Restrict quoting to literal diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot index e70f1855..ca5f4025 100644 --- a/src/interp/nruncomp.boot +++ b/src/interp/nruncomp.boot @@ -122,8 +122,11 @@ NRTencode(x,y) == encode(x,y,true) where encode(x,compForm,firstTime) ==          for [.,a,b] in rest x for [.,=a,c] in rest compForm]]      (x' := isQuasiquote x) =>        quasiquote encode(x',isQuasiquote compForm,false) -    IDENTP op and (constructor? op or MEMQ(op,'(Union Mapping Enumeration))) => +    IDENTP op and (constructor? op or MEMQ(op,'(Union Mapping))) =>        [op,:[encode(y,z,false) for y in rest x for z in rest compForm]] +    -- enumeration constants are like field names, they do not need +    -- to be encoded. +    op = "Enumeration" => x      ["NRTEVAL",NRTreplaceAllLocalReferences COPY_-TREE lispize compForm]    MEMQ(x,$formalArgList) =>      v := $FormalMapVariableList.(POSN1(x,$formalArgList)) @@ -142,9 +145,10 @@ listOfBoundVars form ==      MEMQ(KAR u,'(Union Record)) => listOfBoundVars u      [form]    atom form => [] -  CAR form = 'QUOTE => [] -  EQ(CAR form,":") => listOfBoundVars third form +  first form = 'QUOTE => []    -- We don't want to pick up the tag, only the domain +  first form = ":" => listOfBoundVars third form +  first form = "Enumeration" => []    "union"/[listOfBoundVars x for x in rest form]  optDeltaEntry(op,sig,dc,eltOrConst) == @@ -687,7 +691,7 @@ NRTsubstDelta(initSig) ==            t = 2 => '_$_$            t = 5 => $NRTaddForm            u:= $NRTdeltaList.($NRTdeltaLength+5-t) -          CAR u = 'domain => CADR u +          first u = 'domain => second u            error "bad $NRTdeltaList entry"          MEMQ(CAR t,'(Mapping Union Record _:)) =>             [CAR t,:[replaceSlotTypes(x) for x in rest t]]  | 
