aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/g-opt.boot2
-rw-r--r--src/interp/g-util.boot5
-rw-r--r--src/interp/spad.lisp15
-rw-r--r--src/interp/sys-globals.boot3
4 files changed, 6 insertions, 19 deletions
diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot
index af4eb981..32f7c426 100644
--- a/src/interp/g-opt.boot
+++ b/src/interp/g-opt.boot
@@ -443,7 +443,7 @@ $VMsideEffectFreeOperators ==
%beq %blt %ble %bgt %bge %bitand %bitior %bitnot %bcompl
%icst0 %icst1
%imul %iadd %isub %igcd %ilcm %ipow %imin %imax %ieven? %iodd? %iinc
- %irem %iquo
+ %irem %iquo %idivide
%feq %flt %fle %fgt %fge %fmul %fadd %fsub %fexp %fmin %fmax %float?
%fpow %fdiv %fneg %i2f %fminval %fmaxval %fbase %fprec %ftrunc
%nil %pair? %lconcat %llength %lfirst %lsecond %lthird
diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot
index 11bc3b28..b408d077 100644
--- a/src/interp/g-util.boot
+++ b/src/interp/g-util.boot
@@ -263,6 +263,10 @@ expandIneg ['%ineg,x] ==
integer? x => -x
['_-,x]
+expandIdivide ['%idivide,x,y] ==
+ ['MULTIPLE_-VALUE_-CALL,['FUNCTION,'CONS],
+ ['TRUNCATE,expandToVMForm x,expandToVMForm y]]
+
expandIeq ['%ieq,a,b] ==
a := expandToVMForm a
integer? a and a = 0 => ['ZEROP,expandToVMForm b]
@@ -463,6 +467,7 @@ for x in [
['%igt, :function expandIgt],
['%ilt, :function expandIlt],
['%ineg, :function expandIneg],
+ ['%idivide, :function expandIdivide],
['%bitand, :function expandBitand],
['%bitior, :function expandBitior],
['%bitnot, :function expandBitnot],
diff --git a/src/interp/spad.lisp b/src/interp/spad.lisp
index 72b68a6a..5c6f0f2e 100644
--- a/src/interp/spad.lisp
+++ b/src/interp/spad.lisp
@@ -244,20 +244,6 @@
(sort (copy-seq seq) (function (lambda (x y) (SPADCALL X Y SPADFN)))))
#-Lucid
-(defun QUOTIENT2 (X Y) (values (TRUNCATE X Y)))
-
-#+Lucid
-(defun QUOTIENT2 (X Y) ; following to force error check in division by zero
- (values (if (zerop y) (truncate 1 Y) (TRUNCATE X Y))))
-
-#-Lucid
-(define-function 'REMAINDER2 #'REM)
-
-#+Lucid
-(defun REMAINDER2 (X Y)
- (if (zerop y) (REM 1 Y) (REM X Y)))
-
-#-Lucid
(defun DIVIDE2 (X Y) (multiple-value-call #'cons (TRUNCATE X Y)))
#+Lucid
@@ -290,7 +276,6 @@
|$insideCategoryIfTrue| |$insideCapsuleFunctionIfTrue| |$form|
(|$e| |$EmptyEnvironment|)
(|$genSDVar| 0)
- (|$VariableCount| 0)
(|$previousTime| (TEMPUS-FUGIT)))
(|compileParseTree| X)))
diff --git a/src/interp/sys-globals.boot b/src/interp/sys-globals.boot
index 28e8b594..c6e31a4d 100644
--- a/src/interp/sys-globals.boot
+++ b/src/interp/sys-globals.boot
@@ -209,9 +209,6 @@ $PrettyPrint := false
$previousTime := 0
++
-$VariableCount := 0
-
-++
$useBFasDefault := true
++