aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-06-25 03:44:16 +0000
committerdos-reis <gdr@axiomatics.org>2010-06-25 03:44:16 +0000
commit094e16ae834eaf254a85781d759e0399a9269fb1 (patch)
treee5e237ccddba087d995b9b1c879db3165f62d476
parent2341ec9865ba01ce326f6eb46bddef32cb2a83b8 (diff)
downloadopen-axiom-094e16ae834eaf254a85781d759e0399a9269fb1.tar.gz
* interp/c-util.boot (expandableDefinition?): Try to make it a
forwarding function if possible.
-rw-r--r--src/ChangeLog5
-rw-r--r--src/algebra/strap/INT.lsp3
-rw-r--r--src/algebra/strap/SINT.lsp6
-rw-r--r--src/interp/c-util.boot4
4 files changed, 11 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 5cebe16f..296d5e90 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,10 @@
2010-06-24 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * interp/c-util.boot (expandableDefinition?): Try to make it a
+ forwarding function if possible.
+
+2010-06-24 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* algebra/outform.spad.pamphlet: Cleanup.
* algebra/polycat.spad.pamphlet: Likewise.
* algebra/sregset.spad.pamphlet: Likewise.
diff --git a/src/algebra/strap/INT.lsp b/src/algebra/strap/INT.lsp
index d7368a63..52c49a41 100644
--- a/src/algebra/strap/INT.lsp
+++ b/src/algebra/strap/INT.lsp
@@ -261,8 +261,7 @@
(PUT '|INT;dec;2$;13| '|SPADreplace| '(XLAM (|x|) (|%isub| |x| 1)))
-(PUT '|INT;unitCanonical;2$;55| '|SPADreplace|
- '(XLAM (|x|) (|%iabs| |x|)))
+(PUT '|INT;unitCanonical;2$;55| '|SPADreplace| '|%iabs|)
(DEFUN |INT;writeOMInt| (|dev| |x| $)
(SEQ (COND
diff --git a/src/algebra/strap/SINT.lsp b/src/algebra/strap/SINT.lsp
index 7aaa1956..4dcb6617 100644
--- a/src/algebra/strap/SINT.lsp
+++ b/src/algebra/strap/SINT.lsp
@@ -278,11 +278,9 @@
(DECLAIM (FTYPE (FUNCTION (|%Short| |%Shell|) |%Shell|)
|SINT;unitNormal;$R;62|))
-(PUT '|SINT;and;3$;22| '|SPADreplace|
- '(XLAM (|x| |y|) (LOGAND |x| |y|)))
+(PUT '|SINT;and;3$;22| '|SPADreplace| 'LOGAND)
-(PUT '|SINT;or;3$;24| '|SPADreplace|
- '(XLAM (|x| |y|) (LOGIOR |x| |y|)))
+(PUT '|SINT;or;3$;24| '|SPADreplace| 'LOGIOR)
(PUT '|SINT;one?;$B;44| '|SPADreplace| '(XLAM (|x|) (|%ieq| |x| 1)))
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index dc3ba3af..e79aba6b 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -1221,7 +1221,9 @@ expandableDefinition?(vars,body) ==
or semiSimpleRelativeTo?(body,$simpleVMoperators) =>
usesVariablesLinearly?(body,vars')
false
- expand? => ["XLAM",vars',body]
+ expand? =>
+ body is [fun,: =vars'] and symbol? fun => fun
+ ['XLAM,vars',body]
nil
++ Replace all SPADCALLs to operations defined in the current