aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2012-02-09 01:39:19 +0000
committerdos-reis <gdr@axiomatics.org>2012-02-09 01:39:19 +0000
commitad0d0633aa1350f3d9cb0b6b31c77773053958b3 (patch)
tree4bc51829b7aa6190cfff6a6fa0bc5f0366aa14f2
parent5ff4f6cb1ad8817917b419120b67f256d291e85d (diff)
downloadopen-axiom-ad0d0633aa1350f3d9cb0b6b31c77773053958b3.tar.gz
* interp/g-opt.boot (optCall): Simplify SPADCALL of atomic
function expressions. ($VMsideEffectFreeOperators): Don't include %funcall. ($simpleVMoperators): Include it.
-rw-r--r--src/ChangeLog7
-rw-r--r--src/interp/g-opt.boot14
2 files changed, 16 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 1cb21577..04e6c425 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
+2012-02-08 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * interp/g-opt.boot (optCall): Simplify SPADCALL of atomic
+ function expressions.
+ ($VMsideEffectFreeOperators): Don't include %funcall.
+ ($simpleVMoperators): Include it.
+
2012-02-07 Gabriel Dos Reis <gdr@cs.tamu.edu>
* algebra/Makefile.in (oa_algebra_layer_0): Include FINITE-.
diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot
index ef5b6a51..0051997d 100644
--- a/src/interp/g-opt.boot
+++ b/src/interp/g-opt.boot
@@ -1,6 +1,6 @@
-- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-- All rights reserved.
--- Copyright (C) 2007-2011, Gabriel Dos Reis.
+-- Copyright (C) 2007-2012, Gabriel Dos Reis.
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
@@ -536,8 +536,12 @@ optCall (x is ['%call,:u]) ==
opt := fn has OPTIMIZE => resetTo(x,FUNCALL(opt,u))
resetTo(x,u)
fn is ['applyFun,name] =>
- x.first := 'SPADCALL
- x.rest := [:a,name]
+ do
+ ident? name =>
+ x.first := '%funcall
+ x.rest := [['%head,name],:a,['%tail,name]]
+ x.first := 'SPADCALL
+ x.rest := [:a,name]
x
fn is ['%pair,['%function,op],env] =>
x.first := op
@@ -617,7 +621,7 @@ optSuchthat [.,:u] == ["SUCHTHAT",:u]
++ List of VM side effect free operators.
$VMsideEffectFreeOperators ==
'(SPADfirst ASH FLOAT FLOAT_-SIGN %function %nullStream %nonNullStream
- %funcall %nothing %when %false %true %otherwise %2bit %2bool
+ %nothing %when %false %true %otherwise %2bit %2bool
%and %or %not %peq %ieq %ilt %ile %igt %ige %head %tail %integer?
%beq %blt %ble %bgt %bge %bitand %bitior %bitxor %bitnot %bcompl
%ilength %ibit %icst0 %icst1 %icstmin %icstmax
@@ -649,7 +653,7 @@ $VMsideEffectFreeOperators ==
++ List of simple VM operators
$simpleVMoperators ==
[:$VMsideEffectFreeOperators,
- :['SPADCALL,'%apply, '%gensym, '%lreverse!, '%strstc]]
+ :['SPADCALL,'%apply, '%funcall, '%gensym, '%lreverse!, '%strstc]]
++ Return true if the `form' is semi-simple with respect to
++ to the list of operators `ops'.