aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-05-08 23:43:29 +0000
committerdos-reis <gdr@axiomatics.org>2008-05-08 23:43:29 +0000
commit9a48778ee366536ba772e3c23b1e95ef63af6c5a (patch)
tree6d59b102d87c63d7534c93a7fcc6bad1bce2ff5a /src/interp
parent78b4bdac02e3f64db5acfa9ebdb1b88696b9a405 (diff)
downloadopen-axiom-9a48778ee366536ba772e3c23b1e95ef63af6c5a.tar.gz
* algebra/java.spad.pamphlet: New. Implement JavaBytecode.
* algebra/data.spad.pamphlet (bitand$Byte): New. (bitior$Byte): Likewwise. (byte$Byte): Likewise. * algebra/Makefile.pamphlet (axiom_algebra_layer_15): Include JAVACODE.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/buildom.boot6
-rw-r--r--src/interp/sys-utility.boot9
2 files changed, 12 insertions, 3 deletions
diff --git a/src/interp/buildom.boot b/src/interp/buildom.boot
index 6d94cc4c..12b77b33 100644
--- a/src/interp/buildom.boot
+++ b/src/interp/buildom.boot
@@ -265,8 +265,8 @@ Enumeration(:"args") ==
dom.5 := nil
for i in $FirstParamSlot.. for a in args repeat dom.i := a
dom.($FirstParamSlot + nargs) := [function EnumEqual, :dom]
- dom.($FirstParamSlot + nargs + 1) := [function createEnum, :dom]
- dom.($FirstParamSlot + nargs + 2) := [function EnumPrint, :dom]
+ dom.($FirstParamSlot + nargs + 1) := [function EnumPrint, :dom]
+ dom.($FirstParamSlot + nargs + 2) := [function createEnum, :dom]
haddProp($ConstructorCache,"Enumeration",args,[1,:dom])
dom
@@ -281,7 +281,7 @@ createEnum(sym, dom) ==
val := -1
for v in args for i in 0.. repeat
sym=v => return(val:=i)
- val<0 => error ["Cannot coerce",sym,"to",["Enumeration",:args]]
+ val<0 => userError ["Cannot coerce",sym,"to",["Enumeration",:args]]
val
--% INSTANTIATORS
diff --git a/src/interp/sys-utility.boot b/src/interp/sys-utility.boot
index 41deb426..409632be 100644
--- a/src/interp/sys-utility.boot
+++ b/src/interp/sys-utility.boot
@@ -194,3 +194,12 @@ loadModule(path,name) ==
--% numericis
log10 x ==
LOG(x,10)
+
+bitand: (%Short,%Short) -> %Short
+bitand(x,y) ==
+ BOOLE(BOOLE_-AND,x,y)
+
+bitior: (%Short,%Short) -> %Short
+bitior(x,y) ==
+ BOOLE(BOOLE_-IOR,x,y)
+