aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
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)
+