aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog6
-rw-r--r--src/interp/c-util.boot5
-rw-r--r--src/interp/compiler.boot2
-rw-r--r--src/interp/g-opt.boot2
4 files changed, 12 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ad56facb..7211d968 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2012-02-26 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * interp/c-util.boot (numOfOccurencesOf): Tidy.
+ * interp/compiler.boot (compUnnamedMapping): Fix thinko.
+ * interp/g-opt.boot (semiSimpleRelativeTo?): Likewise.
+
2012-02-25 Gabriel Dos Reis <gdr@cs.tamu.edu>
* interp/compiler.boot (compTopLevel): Do not bind $killOptimizeIfTrue.
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index a395241a..0e4b2705 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -953,7 +953,10 @@ numOfOccurencesOf(x,y) ==
fn(x,y,n) ==
null y => 0
x=y => n+1
- y isnt [.,:.] => n
+ atomic? y => n
+ symbol? x and abstraction? y =>
+ symbolMember?(x,y.absParms) => n
+ fn(x,y.absBody,n)
fn(x,first y,n)+fn(x,rest y,n)
compilerMessage(msg,args) ==
diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot
index 52cc875d..1087b07e 100644
--- a/src/interp/compiler.boot
+++ b/src/interp/compiler.boot
@@ -2751,7 +2751,7 @@ compUnnamedMapping(parms,source,target,body,env) ==
[.,.,env] := compMakeDeclaration(p,s,env)
env := giveVariableSomeValue(p,get(p,'mode,env),env)
T := comp(body,target,env) or return nil
- fun := ['%closure,['%lambda,[:parms,'$],T.expr],'$]
+ fun := ['%closure,['%function,['%lambda,[:parms,'$],T.expr]],'$]
[fun,["Mapping",T.mode,:source],savedEnv]
gatherParameterList vars == main(vars,nil,nil) where
diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot
index d9a72185..c953c3e3 100644
--- a/src/interp/g-opt.boot
+++ b/src/interp/g-opt.boot
@@ -668,7 +668,7 @@ $simpleVMoperators ==
semiSimpleRelativeTo?(form,ops) ==
atomic? form => true
not symbol?(form.op) or not symbolMember?(form.op,ops) => false
- abstraction? form.op => true -- always, regardless of body
+ abstraction? form => true -- always, regardless of body
form.op is '%when =>
and/[sideEffectFree? p and semiSimpleRelativeTo?(c,ops)
for [p,c] in form.args]