From 9736d99286e94d7ed77109268ab141949c9c9037 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Wed, 12 Dec 2007 21:03:50 +0000 Subject: * buildom.boot: Use $OutputForm instead of $Expression throughout. * compiler.boot (compAtom): Use $OutputForm instead of $Expression. (compSymbol): Likewise. (outputComp): Likewise. --- src/interp/ChangeLog | 8 ++++++++ src/interp/buildom.boot | 18 +++++++++--------- src/interp/compiler.boot | 12 ++++++------ 3 files changed, 23 insertions(+), 15 deletions(-) (limited to 'src/interp') diff --git a/src/interp/ChangeLog b/src/interp/ChangeLog index e2e1d25e..04457b46 100644 --- a/src/interp/ChangeLog +++ b/src/interp/ChangeLog @@ -1,3 +1,11 @@ +2007-12-12 Gabriel Dos Reis + + * buildom.boot: Use $OutputForm instead of $Expression + throughout. + * compiler.boot (compAtom): Use $OutputForm instead of $Expression. + (compSymbol): Likewise. + (outputComp): Likewise. + 2007-12-12 Gabriel Dos Reis * compiler.boot (comp3): Use isQuasiquote. diff --git a/src/interp/buildom.boot b/src/interp/buildom.boot index 11e96b24..586251b2 100644 --- a/src/interp/buildom.boot +++ b/src/interp/buildom.boot @@ -62,7 +62,7 @@ Record0 args == dom.1 := [function lookupInTable,dom, [["_=",[[["Boolean"],"_$","_$"],:12]], - ["coerce",[[$Expression,"_$"],:14]]]] + ["coerce",[[$OutputForm,"_$"],:14]]]] dom.2 := NIL dom.3 := ["RecordCategory",:QCDR dom.0] dom.4 := @@ -95,7 +95,7 @@ RecordEqual(x,y,dom) == RecordPrint(x,dom) == coerceRe2E(x,dom.3) coerceVal2E(x,m) == - objValUnwrap coerceByFunction(objNewWrap(x,m),$Expression) + objValUnwrap coerceByFunction(objNewWrap(x,m),$OutputForm) findEqualFun(dom) == compiledLookup("_=",[$Boolean,"$","$"],dom) @@ -126,7 +126,7 @@ Union(:args) == dom.1 := [function lookupInTable,dom, [["_=",[[["Boolean"],"_$","_$"],:12]], - ["coerce",[[$Expression,"_$"],:14]]]] + ["coerce",[[$OutputForm,"_$"],:14]]]] dom.2 := NIL dom.3 := '(SetCategory) @@ -178,7 +178,7 @@ Mapping(:args) == dom.1 := [function lookupInTable,dom, [["_=",[[["Boolean"],"_$","_$"],:12]], - ["coerce",[[$Expression,"_$"],:14]]]] + ["coerce",[[$OutputForm,"_$"],:14]]]] dom.2 := NIL dom.3 := '(SetCategory) @@ -209,7 +209,7 @@ Enumeration(:"args") == dom.1 := [function lookupInTable,dom, [["_=",[[["Boolean"],"_$","_$"],:12]], - ["coerce",[[$Expression,"_$"],:14], [["_$", $Symbol], :16]] + ["coerce",[[$OutputForm,"_$"],:14], [["_$", $Symbol], :16]] ]] dom.2 := NIL dom.3 := ["EnumerationCategory",:QCDR dom.0] @@ -260,7 +260,7 @@ mkMappingFunList(nam,mapForm,e) == dc := GENSYM() sigFunAlist:= [["_=",[["Boolean"],nam ,nam],["ELT",dc,6]], - ["coerce",[$Expression,nam],["ELT",dc,7]]] + ["coerce",[$OutputForm,nam],["ELT",dc,7]]] [substitute(nam,dc,substitute("$",'Rep,sigFunAlist)),e] mkRecordFunList(nam,["Record",:Alist],e) == @@ -277,7 +277,7 @@ mkRecordFunList(nam,["Record",:Alist],e) == [["construct",[nam,:[A for [.,a,A] in Alist]],"mkRecord"], ["_=",[["Boolean"],nam ,nam],["ELT",dc,6]], - ["coerce",[$Expression,nam],["ELT",dc,7]],: + ["coerce",[$OutputForm,nam],["ELT",dc,7]],: [["elt",[A,nam,PNAME a],["XLAM",["$1","$2"],["RECORDELT","$1",i,len]]] for i in 0.. for [.,a,A] in Alist],: [["setelt",[A,nam,PNAME a,A],["XLAM",["$1","$2","$3"], @@ -293,7 +293,7 @@ mkNewUnionFunList(name,form is ["Union",:listOfEntries],e) == --2. create coercions from subtypes to subUnion cList:= [["_=",[["Boolean"],name ,name],["ELT",dc,6]], - ["coerce",[$Expression,name],["ELT",dc,7]],: + ["coerce",[$OutputForm,name],["ELT",dc,7]],: ("append"/ [[["construct",[name,type],["XLAM",["#1"],["CONS",i,"#1"]]], ["elt",[type,name,tag],cdownFun], @@ -330,7 +330,7 @@ mkUnionFunList(op,form is ["Union",:listOfEntries],e) == --2. create coercions from subtypes to subUnion cList:= [["_=",[["Boolean"],g ,g],["ELT",op,6]], - ["coerce",[$Expression,g],["ELT",op,7]],: + ["coerce",[$OutputForm,g],["ELT",op,7]],: ("append"/ [[["autoCoerce",[g,t],upFun], ["coerce",[t,g],cdownFun], diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot index 5a8ecd27..b6c72840 100644 --- a/src/interp/compiler.boot +++ b/src/interp/compiler.boot @@ -281,7 +281,7 @@ compAtom(x,m,e) == t:= isSymbol x => compSymbol(x,m,e) or return nil - m = $Expression and primitiveType x => [x,m,e] + m = $OutputForm and primitiveType x => [x,m,e] STRINGP x => [x,x,e] [x,primitiveType x or return nil,e] convert(t,m) @@ -322,7 +322,7 @@ compSymbol(s,m,e) == not isFunction(s,e) and null ($compForModeIfTrue=true) then errorRef s [s,m',e] --s is a declared argument MEMQ(s,$FormalMapVariableList) => stackMessage ["no mode found for",s] - m = $Expression or m = $Symbol => [['QUOTE,s],m,e] + m = $OutputForm or m = $Symbol => [['QUOTE,s],m,e] not isFunction(s,e) => errorRef s ++ Return the more recent unique type case assumption on `x' (if any) @@ -379,12 +379,12 @@ compArgumentsAndTryAgain(form is [.,:argl],m,e) == compForm1(form,m,e) outputComp(x,e) == - u:=comp(['_:_:,x,$Expression],$Expression,e) => u + u:=comp(['_:_:,x,$OutputForm],$OutputForm,e) => u x is ['construct,:argl] => - [['LIST,:[([.,.,e]:=outputComp(x,e)).expr for x in argl]],$Expression,e] + [['LIST,:[([.,.,e]:=outputComp(x,e)).expr for x in argl]],$OutputForm,e] (v:= get(x,"value",e)) and (v.mode is ['Union,:l]) => - [['coerceUn2E,x,v.mode],$Expression,e] - [x,$Expression,e] + [['coerceUn2E,x,v.mode],$OutputForm,e] + [x,$OutputForm,e] compForm1(form is [op,:argl],m,e) == $NumberOfArgsIfInteger: local:= #argl --see compElt -- cgit v1.2.3