aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2009-06-09 07:08:27 +0000
committerdos-reis <gdr@axiomatics.org>2009-06-09 07:08:27 +0000
commita8716de1c3778c147f62d18f1648d8b23163fccf (patch)
treefdcef0df213b4d7c755f05d7d8dcaa07d484fdb4 /src
parent5eacf6339b7768a4c6d048d5fce6c5aff8c2d62a (diff)
downloadopen-axiom-a8716de1c3778c147f62d18f1648d8b23163fccf.tar.gz
* interp/compiler.boot (compLogicalNot): Tidy.
* interp/define.boot (doIt): Tidy conditional case. * boot/tokens.boot: 'fourth' is a now a builtin function.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/boot/tokens.boot3
-rw-r--r--src/interp/compiler.boot3
-rw-r--r--src/interp/define.boot8
4 files changed, 17 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 70174393..0d54fe8f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2009-06-09 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * interp/compiler.boot (compLogicalNot): Tidy.
+ * interp/define.boot (doIt): Tidy conditional case.
+ * boot/tokens.boot: 'fourth' is a now a builtin function.
+
2009-06-07 Gabriel Dos Reis <gdr@cs.tamu.edu>
* algebra/kl.spad.pamphlet (Kernel): Tidy.
diff --git a/src/boot/tokens.boot b/src/boot/tokens.boot
index 6a98317a..a51fe58b 100644
--- a/src/boot/tokens.boot
+++ b/src/boot/tokens.boot
@@ -1,6 +1,6 @@
-- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd.
-- All rights reserved.
--- Copyright (C) 2007-2008, Gabriel Dos Reis.
+-- Copyright (C) 2007-2009, Gabriel Dos Reis.
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
@@ -242,6 +242,7 @@ for i in [ _
["exit", "EXIT"] , _
["false", 'NIL] , _
["first", "CAR"] , _
+ ["fourth", "CADDDR"] , _
["function","FUNCTION"] , _
["genvar", "GENVAR"] , _
["IN", "MEMBER"] , _
diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot
index 817517ef..357e8564 100644
--- a/src/interp/compiler.boot
+++ b/src/interp/compiler.boot
@@ -1438,7 +1438,8 @@ compLogicalNot(x,m,e) ==
$normalizeTree and resolve(m,$Boolean) = $Boolean => $Boolean
$EmptyMode
yT := comp(y,yTarget,e) or return nil
- yTarget = $Boolean => (rplac(first yT, ["NOT",yT.expr]); yT)
+ yT.mode = $Boolean and yTarget = $Boolean =>
+ [["NOT",yT.expr],yT.mode,yT.env]
compResolveCall("not",[yT],m,yT.env)
diff --git a/src/interp/define.boot b/src/interp/define.boot
index 8cbc7ce9..543450d9 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -1482,7 +1482,13 @@ doIt(item,$predl) ==
item is ["%SignatureImport",:.] =>
[.,.,$e] := compSignatureImport(item,$EmptyMode,$e)
mutateToNothing item
- item is ["IF",:.] => doItIf(item,$predl,$e)
+ item is ["IF",p,x,y] =>
+ p is ["not",p'] =>
+ rplac(second item,p')
+ rplac(third item,y)
+ rplac(fourth item,x)
+ doIt(item,$predl)
+ doItIf(item,$predl,$e)
item is ["where",b,:l] => compOrCroak(item,$EmptyMode,$e)
item is ["MDEF",:.] => [.,.,$e]:= compOrCroak(item,$EmptyMode,$e)
item is ['DEF,[op,:.],:.] =>