aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog12
-rw-r--r--src/interp/buildom.boot2
-rw-r--r--src/interp/clam.boot4
-rw-r--r--src/interp/g-opt.boot18
-rw-r--r--src/interp/g-timer.boot3
-rw-r--r--src/interp/lisp-backend.boot1
6 files changed, 25 insertions, 15 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 11316088..1a06ca53 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,17 @@
2011-12-02 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * interp/buildom.boot (seteltRecordFun): Change EXIT to %exit.
+ * interp/clam.boot (compHash):Likewise.
+ * interp/g-opt.boot (changeVariableDefinitionToStore): Likewise.
+ (jumpToToplevel?): Likewise.
+ (groupVariableDefinitions): Likewise.
+ (changeLeaveToExit): Likewise.
+ (optLabelled): Likewise.
+ (optSeq): Likewise.
+ * interp/lisp-backend.boot: Translate %exit to EXIT.
+
+2011-12-02 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* interp/buildom.boot (setelt): Change SEQ to %seq.
* interp/clam.boot (compHash): Likewise.
* interp/compiler.boot (freeVarUsage): Likewise.
diff --git a/src/interp/buildom.boot b/src/interp/buildom.boot
index 7c234e1e..05a09efe 100644
--- a/src/interp/buildom.boot
+++ b/src/interp/buildom.boot
@@ -605,7 +605,7 @@ seteltRecordFun(n,i) ==
field := formalRecordField(n,i)
body :=
n > 2 => ['%store,field,"#3"]
- ['%seq,['%store,field,"#3"],['EXIT,field]]
+ ['%seq,['%store,field,"#3"],['%exit,field]]
["XLAM",args,body]
copyRecordFun n ==
diff --git a/src/interp/clam.boot b/src/interp/clam.boot
index 6c1d6c55..65602dd1 100644
--- a/src/interp/clam.boot
+++ b/src/interp/clam.boot
@@ -229,7 +229,7 @@ compHash(op,argl,body,cacheNameOrNil,eqEtc,countFl) ==
['tableValue,cacheNameOrNil,MKQ op],MKQ eqEtc]
['lassocShift,cacheArgKey,['tableValue,cacheNameOrNil,MKQ op]]
['tableValue,cacheName,g1]
- secondPredPair:= [g2,optSeq ['%seq,:hitCountCode,['EXIT,returnFoundValue]]]
+ secondPredPair:= [g2,optSeq ['%seq,:hitCountCode,['%exit,returnFoundValue]]]
putCode:=
null argl =>
cacheNameOrNil =>
@@ -249,7 +249,7 @@ compHash(op,argl,body,cacheNameOrNil,eqEtc,countFl) ==
thirdPredPair:= ['%otherwise,putCode]
codeBody:= optSeq
['%seq,:callCountCode,
- ['EXIT,['%bind,[[g2,getCode]],['%when,secondPredPair,thirdPredPair]]]]
+ ['%exit,['%bind,[[g2,getCode]],['%when,secondPredPair,thirdPredPair]]]]
lamex:= ['LAM,arg,codeBody]
mainFunction:= [op,lamex]
computeFunction:= [auxfn,['LAMBDA,argl,:body]]
diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot
index 003f3d0a..75df003b 100644
--- a/src/interp/g-opt.boot
+++ b/src/interp/g-opt.boot
@@ -97,7 +97,7 @@ changeVariableDefinitionToStore(form,vars) ==
abstractionOperator? form.op =>
changeVariableDefinitionToStore(form.absBody,[:form.absParms,:vars])
vars
- form is ['%seq,:stmts,['EXIT,val]] =>
+ form is ['%seq,:stmts,['%exit,val]] =>
for s in stmts repeat
vars := changeVariableDefinitionToStore(s,vars)
changeVariableDefinitionToStore(val,vars)
@@ -110,7 +110,7 @@ jumpToToplevel? x ==
atomic? x => false
op := x.op
op is '%seq => CONTAINED('%leave,x.args) -- FIXME: what about GO?
- op in '(EXIT %leave) => true
+ op in '(%exit %leave) => true
or/[jumpToToplevel? x' for x' in x]
++ Return true if `form' is just one assignment expression.
@@ -135,7 +135,7 @@ groupVariableDefinitions form ==
[form.absKind,form.absParms,groupVariableDefinitions form.absBody]
form is ['%loop,:iters,body,val] =>
[form.op,:iters,groupVariableDefinitions body,val]
- form isnt ['%seq,:stmts,['EXIT,val]] => form
+ form isnt ['%seq,:stmts,['%exit,val]] => form
defs := nil
for x in stmts while nonExitingSingleAssignment? x repeat
defs := [x.args,:defs]
@@ -143,7 +143,7 @@ groupVariableDefinitions form ==
stmts := drop(#defs,stmts)
expr :=
stmts = nil => val
- ['%seq,:stmts,['EXIT,val]]
+ ['%seq,:stmts,['%exit,val]]
['%bind,reverse! defs,expr]
optimizeFunctionDef(def) ==
@@ -213,7 +213,7 @@ subrname u ==
changeLeaveToExit(s,g) ==
s isnt [.,:.] or s.op in '(QUOTE %seq REPEAT COLLECT %collect %loop) => nil
- s is ['%leave, =g,:u] => (s.first := "EXIT"; s.rest := u)
+ s is ['%leave, =g,:u] => (s.first := '%exit; s.rest := u)
changeLeaveToExit(first s,g)
changeLeaveToExit(rest s,g)
@@ -252,14 +252,14 @@ optLabelled (x is ['%labelled,g,a]) ==
removeNeedlessLeave a
if a is ['%seq,:s,['%leave,=g,u]] then
changeLeaveToExit(s,g)
- a.rest := [:s,["EXIT",u]]
+ a.rest := [:s,['%exit,u]]
a := simplifyVMForm a
if hasNoLeave(a,g) then
resetTo(x,a)
else
changeLeaveToGo(a,g)
x.first := '%seq
- x.rest := [["EXIT",a],second g,["EXIT",second g]]
+ x.rest := [['%exit,a],second g,['%exit,second g]]
x
optSPADCALL(form is ['SPADCALL,:argl]) ==
@@ -424,14 +424,14 @@ optSeq ['%seq,:l] ==
--this gets rid of unwanted labels generated by declarations in %seq
[first l,:getRidOfTemps rest l]
seqToCOND l ==
- transform:= [[a,b] for x in l while (x is ['%when,[a,["EXIT",b]]])]
+ transform:= [[a,b] for x in l while (x is ['%when,[a,['%exit,b]]])]
before:= take(#transform,l)
aft:= after(l,before)
null before => ['%seq,:aft]
null aft => ['%when,:transform,'(%otherwise (conderr))]
optCond ['%when,:transform,['%otherwise,optSeq ['%seq,:aft]]]
tryToRemoveSeq l ==
- l is ['%seq,[op,a]] and op in '(EXIT RETURN %leave %return) => a
+ l is ['%seq,[op,a]] and op in '(%exit RETURN %leave %return) => a
l
optSuchthat [.,:u] == ["SUCHTHAT",:u]
diff --git a/src/interp/g-timer.boot b/src/interp/g-timer.boot
index 7b9476c9..f3d9a4a0 100644
--- a/src/interp/g-timer.boot
+++ b/src/interp/g-timer.boot
@@ -267,9 +267,6 @@ timedEvaluate code ==
displayHeapStatsIfWanted() ==
$printStorageIfTrue => sayBrightly OLDHEAPSTATS()
---EVALANDFILEACTQ(
--- PUTGCEXIT function displayHeapStatsIfWanted )
-
--% stubs for the stats summary fns
statRecordInstantiationEvent() == nil
statRecordLoadEvent() == nil
diff --git a/src/interp/lisp-backend.boot b/src/interp/lisp-backend.boot
index 0aba8664..3cd7524e 100644
--- a/src/interp/lisp-backend.boot
+++ b/src/interp/lisp-backend.boot
@@ -638,6 +638,7 @@ for x in [
['%function, :'FUNCTION],
['%lambda, :'LAMBDA],
['%seq, :'SEQ],
+ ['%exit, :'EXIT],
['%when, :'COND],
-- I/O stream functions