aboutsummaryrefslogtreecommitdiff
path: root/src/interp/c-util.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-07-27 12:24:31 +0000
committerdos-reis <gdr@axiomatics.org>2010-07-27 12:24:31 +0000
commitbddd53c126545232dc319fcf520a0070ab396818 (patch)
tree2a0018c952ab0434db10869bce99641609828524 /src/interp/c-util.boot
parent6177d66b74f48a5cd63b62acad815299fcaaa884 (diff)
downloadopen-axiom-bddd53c126545232dc319fcf520a0070ab396818.tar.gz
Misc cleanup
Diffstat (limited to 'src/interp/c-util.boot')
-rw-r--r--src/interp/c-util.boot28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index ca04d4fa..590c7766 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -168,7 +168,7 @@ wantArgumentsAsTuple(args,sig) ==
++ that are unused.
declareUnusedParameters x == (augment x; x) where
augment x ==
- isAtomicForm x => nil
+ atomic? x => nil
x is [op,parms,body] and op in $AbstractionOperator =>
augment body
unused := [p for p in parms | not usedSymbol?(p,body)]
@@ -1096,7 +1096,7 @@ middleEndExpand: %Form -> %Form
middleEndExpand x ==
x = '%false or x = '%nil => 'NIL
IDENTP x and (x' := x has %Rename) => x'
- isAtomicForm x => x
+ atomic? x => x
[op,:args] := x
IDENTP op and (fun := getOpcodeExpander op) =>
middleEndExpand apply(fun,x,nil)
@@ -1135,7 +1135,7 @@ eqSubst(args,parms,body) ==
++ Walk `form' and replace simple functions as appropriate.
replaceSimpleFunctions form ==
- isAtomicForm form => form
+ atomic? form => form
form is ["COND",:body] =>
mutateCONDFormWithUnaryFunction(form,"replaceSimpleFunctions")
form is ["LET",:.] =>
@@ -1145,7 +1145,7 @@ replaceSimpleFunctions form ==
-- Conservatively preserve object identity and storage
-- consumption by not folding non-atomic constant forms.
getFunctionReplacement op isnt ['XLAM,=nil,body] => form
- isAtomicForm body or isVMConstantForm body => body
+ atomic? body or isVMConstantForm body => body
form
-- 1. process argument first.
for args in tails rest form repeat
@@ -1167,7 +1167,7 @@ replaceSimpleFunctions form ==
-- Identity function toos.
parms is [=body] => first args
-- conservatively approximate eager semantics
- and/[isAtomicForm first as for as in tails args] =>
+ and/[atomic? first as for as in tails args] =>
-- alpha rename before substitution.
newparms := [gensym() for p in parms]
body := eqSubstAndCopy(newparms,parms,body)
@@ -1190,7 +1190,7 @@ forwardingCall?(vars,body) ==
++ Return true if `form' has a linear usage of all variables in `vars'.
usesVariablesLinearly?(form,vars) ==
- isAtomicForm form => true
+ atomic? form => true
and/[numOfOccurencesOf(var,form) < 2 for var in vars]
++ We are processing a function definition with parameter list `vars'
@@ -1208,10 +1208,10 @@ expandableDefinition?(vars,body) ==
-- FIXME: This should be done only for constant creators.
null vars' => semiSimpleRelativeTo?(body,$VMsideEffectFreeOperators)
- isAtomicForm body => true
+ atomic? body => true
[op,:args] := body
not IDENTP op => false
- and/[isAtomicForm x for x in args]
+ and/[atomic? x for x in args]
or semiSimpleRelativeTo?(body,$simpleVMoperators) =>
usesVariablesLinearly?(body,vars')
false
@@ -1224,7 +1224,7 @@ expandableDefinition?(vars,body) ==
++ domain. Conditional operations are not folded.
foldSpadcall: %Form -> %Form
foldSpadcall form ==
- isAtomicForm form => form -- leave atomic forms alone
+ atomic? form => form -- leave atomic forms alone
form is ["DECLARE",:.] => form -- don't walk declarations
form is ["LET",inits,:body] =>
mutateLETFormWithUnaryFunction(form,"foldSpadcall")
@@ -1321,7 +1321,7 @@ MAKE_-CLOSEDFN_-NAME() ==
backendCompileNEWNAM: %Form -> %Void
backendCompileNEWNAM x ==
- isAtomicForm x => nil
+ atomic? x => nil
atom(y := first x) =>
backendCompileNEWNAM rest x
if y = "CLOSEDFN" then
@@ -1422,7 +1422,7 @@ backendCompile2 code ==
backendFluidize x ==
IDENTP x and x ~= "$" and x ~= "$$" and
(PNAME x).0 = char "$" and not digit?((PNAME x).1) => x
- isAtomicForm x => nil
+ atomic? x => nil
first x = "FLUID" => second x
a := backendFluidize first x
b := backendFluidize rest x
@@ -1522,7 +1522,7 @@ ilTransformInsns form ==
mutateToBackendCode: %Form -> %Void
mutateToBackendCode x ==
IDENTP x and isLispSpecialVariable x => noteSpecialVariable x
- isAtomicForm x => nil
+ atomic? x => nil
-- temporarily have TRACELET report MAKEPROPs.
if (u := first x) = "MAKEPROP" and $TRACELETFLAG then
x.first := "MAKEPROP-SAY"
@@ -1587,7 +1587,7 @@ declareGlobalVariables vars ==
["DECLARE",["SPECIAL",:vars]]
simplifySEQ form ==
- isAtomicForm form => form
+ atomic? form => form
form is ["SEQ",[op,a]] and op in '(EXIT RETURN) => simplifySEQ a
for stmts in tails form repeat
stmts.first := simplifySEQ first stmts
@@ -1596,7 +1596,7 @@ simplifySEQ form ==
++ Return true if the Lisp `form' has a `RETURN' form
++ that needs to be enclosed in a `PROG' form.
needsPROG? form ==
- isAtomicForm form => false
+ atomic? form => false
op := form.op
op = 'RETURN => true
op in '(LOOP PROG) => false