aboutsummaryrefslogtreecommitdiff
path: root/src/interp/g-util.boot
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp/g-util.boot')
-rw-r--r--src/interp/g-util.boot13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot
index af20fb51..95618b16 100644
--- a/src/interp/g-util.boot
+++ b/src/interp/g-util.boot
@@ -221,12 +221,13 @@ expandReturn(x is ['%return,.,y]) ==
$FUNNAME = nil => systemErrorHere ['expandReturn,x]
['RETURN_-FROM,$FUNNAME,expandToVMForm y]
--- Logical operators
-
-expandEq ["%eq",:args] ==
- ["EQ",:expandToVMForm args]
-
+-- Pointer operations
+expandPeq ['%peq,x,y] ==
+ x = '%nil => ['NULL,expandToVMForm y]
+ y = '%nil => ['NULL,expandToVMForm x]
+ ['EQ,expandToVMForm x, expandToVMForm y]
+-- Integer operations
expandIneg ['%ineg,x] ==
x := expandToVMForm x
integer? x => -x
@@ -401,7 +402,7 @@ for x in [
['%fneg, :function expandFneg],
['%fprec, :function expandFprec],
- ["%eq",:function expandEq],
+ ["%peq",:function expandPeq],
["%bind",:function expandBind],
["%store",:function expandStore],