aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-01-31 01:48:20 +0000
committerdos-reis <gdr@axiomatics.org>2011-01-31 01:48:20 +0000
commit03c09deff90cb2eb7a85730f7e74bce2df268b47 (patch)
tree9e4a0a2dc92091e3ffc1f21bfba4849dbc367b2e /src/interp
parenta31c0a21788a17c1bce15120225bc5a15fa1da33 (diff)
downloadopen-axiom-03c09deff90cb2eb7a85730f7e74bce2df268b47.tar.gz
* interp/vmlisp.lisp: Remove QREFELT, QSDEC1, QSETREFV, QSETVELT,
QSETVELT-1, QSINC1, QVELT, QVELT-1. * algebra/si.spad.pamphlet: Use %iinc and %idec forms.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/clam.boot8
-rw-r--r--src/interp/compiler.boot4
-rw-r--r--src/interp/define.boot1
-rw-r--r--src/interp/g-opt.boot2
-rw-r--r--src/interp/g-util.boot1
-rw-r--r--src/interp/macros.lisp2
-rw-r--r--src/interp/nruncomp.boot1
-rw-r--r--src/interp/nrunfast.boot2
-rw-r--r--src/interp/slam.boot2
-rw-r--r--src/interp/vmlisp.lisp26
10 files changed, 12 insertions, 37 deletions
diff --git a/src/interp/clam.boot b/src/interp/clam.boot
index a4b2f8b9..b4c45112 100644
--- a/src/interp/clam.boot
+++ b/src/interp/clam.boot
@@ -1,6 +1,6 @@
-- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd.
-- All rights reserved.
--- Copyright (C) 2007-2010, Gabriel Dos Reis.
+-- Copyright (C) 2007-2011, Gabriel Dos Reis.
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
@@ -608,10 +608,10 @@ hputNewProp(ht,op,argList,val) ==
listTruncate(l,n) ==
u:= l
- n:= QSSUB1 n
+ n:= n - 1
while n ~= 0 and cons? u repeat
- n:= QSSUB1 n
- u:= rest u
+ n := n - 1
+ u := rest u
if cons? u then
if cons? rest u and $reportInstantiations = true then
recordInstantiation($op,CAADR u,true)
diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot
index a4067f8d..ae9671d0 100644
--- a/src/interp/compiler.boot
+++ b/src/interp/compiler.boot
@@ -777,8 +777,8 @@ compCons1(["CONS",x,y],m,e) ==
yt':= convert(yt,mr) or return nil
[x,.,e]:= convert([x,mx,yt'.env],second mr) or return nil
yt'.expr is ['%listlit,:.] => [['%listlit,x,:rest yt'.expr],mr,e]
- [["CONS",x,yt'.expr],mr,e]
- [["CONS",x,y],["Pair",mx,my],e]
+ [['%makepair,x,yt'.expr],mr,e]
+ [['%makepair,x,y],["Pair",mx,my],e]
convert(T,m)
--% SETQ
diff --git a/src/interp/define.boot b/src/interp/define.boot
index 69d451b2..1aca96d0 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -1195,7 +1195,6 @@ addArgumentConditions($body,$functionName) ==
$body
putInLocalDomainReferences (def := [opName,[lam,varl,body]]) ==
- $elt: local := "getShellEntry"
NRTputInTail CDDADR def
def
diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot
index 993f928c..7a69f229 100644
--- a/src/interp/g-opt.boot
+++ b/src/interp/g-opt.boot
@@ -444,7 +444,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 %idivide
+ %irem %iquo %idivide %idec
%feq %flt %fle %fgt %fge %fmul %fadd %fsub %fexp %fmin %fmax %float?
%fpow %fdiv %fneg %i2f %fminval %fmaxval %fbase %fprec %ftrunc
%fsin %fcos %ftan %fcot %fsec %fcsc %fatan %facot
diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot
index 50846d50..b2c00ccd 100644
--- a/src/interp/g-util.boot
+++ b/src/interp/g-util.boot
@@ -512,6 +512,7 @@ for x in [
['%igcd, :'GCD],
['%ige, :">="],
['%iinc, :"1+"],
+ ['%idec, :"1-"],
['%ilcm, :'LCM],
['%ile, :"<="],
['%imax, :'MAX],
diff --git a/src/interp/macros.lisp b/src/interp/macros.lisp
index 69bd3b2e..1c013f0c 100644
--- a/src/interp/macros.lisp
+++ b/src/interp/macros.lisp
@@ -555,7 +555,7 @@ terminals and empty or at-end files. In Common Lisp, we must assume record size
; (spadcall
; (cons (|function| (lambda (#:G1420 |envArg|) #:G1420)) (vector))
; |#1|
-; (qrefelt |*1;f;1;initial;MV| 0))))))
+; (svref |*1;f;1;initial;MV| 0))))))
;
; the (|function| (lambda form used to cause an infinite expansion loop
;
diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot
index 6734e132..68169169 100644
--- a/src/interp/nruncomp.boot
+++ b/src/interp/nruncomp.boot
@@ -681,7 +681,6 @@ NRTsubstDelta(initSig) ==
updateSlot1DataBase [name,info] == HPUT($Slot1DataBase,name,info)
NRTputInLocalReferences bod ==
- $elt: local := "getShellEntry"
NRTputInHead bod
NRTputInHead bod ==
diff --git a/src/interp/nrunfast.boot b/src/interp/nrunfast.boot
index a9097d17..ef1bcf6d 100644
--- a/src/interp/nrunfast.boot
+++ b/src/interp/nrunfast.boot
@@ -427,7 +427,7 @@ newCompareSig(sig, numvec, index, dollar, domain) ==
null (target := first sig)
or lazyMatchArg(target,numvec.k,dollar,domain) =>
and/[lazyMatchArg(s,numvec.(k := i),dollar,domain)
- for s in rest sig for i in (index+1)..] => numvec.(QSINC1 k)
+ for s in rest sig for i in (index+1)..] => numvec.(k + 1)
nil
nil
diff --git a/src/interp/slam.boot b/src/interp/slam.boot
index 7289b9d3..fb0afcc2 100644
--- a/src/interp/slam.boot
+++ b/src/interp/slam.boot
@@ -246,7 +246,7 @@ countCircularAlist(cal,n) ==
+/[nodeCount x for x in cal for i in 1..n]
predCircular(al,n) ==
- for i in 1..QSSUB1 n repeat al:= rest al
+ for i in 1..(n - 1) repeat al:= rest al
al
assocCircular(x,al) == --like ASSOC except that al is circular
diff --git a/src/interp/vmlisp.lisp b/src/interp/vmlisp.lisp
index 322f703c..b4cbf6d2 100644
--- a/src/interp/vmlisp.lisp
+++ b/src/interp/vmlisp.lisp
@@ -1,6 +1,6 @@
;; Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd.
;; All rights reserved.
-;; Copyright (C) 2007-2010, Gabriel Dos Reis.
+;; Copyright (C) 2007-2011, Gabriel Dos Reis.
;; All rights reserved.
;;
;; Redistribution and use in source and binary forms, with or without
@@ -321,9 +321,6 @@
(defmacro qlength (a)
`(length ,a))
-(defmacro qrefelt (vec ind)
- `(svref ,vec ,ind))
-
(defmacro qrplaca (a b)
`(rplaca (the cons ,a) ,b))
@@ -338,27 +335,12 @@
(defmacro qsadd1 (x)
`(the fixnum (1+ (the fixnum ,x))))
-(defmacro qsdec1 (x)
- `(the fixnum (1- (the fixnum ,x))))
-
(defmacro qsdifference (x y)
`(the fixnum (- (the fixnum ,x) (the fixnum ,y))))
-(defmacro qsetrefv (vec ind val)
- `(setf (svref ,vec (the fixnum ,ind)) ,val))
-
-(defmacro qsetvelt (vec ind val)
- `(setf (svref ,vec (the fixnum ,ind)) ,val))
-
-(defmacro qsetvelt-1 (vec ind val)
- `(setf (svref ,vec (the fixnum (1- (the fixnum ,ind)))) ,val))
-
(defmacro qsgreaterp (a b)
`(> (the fixnum ,a) (the fixnum ,b)))
-(defmacro qsinc1 (x)
- `(the fixnum (1+ (the fixnum ,x))))
-
(defmacro qsleftshift (a b)
`(the fixnum (ash (the fixnum ,a) (the fixnum ,b))))
@@ -395,12 +377,6 @@
(defmacro qszerop (x)
`(zerop (the fixnum ,x)))
-(defmacro qvelt (vec ind)
- `(svref ,vec (the fixnum ,ind)))
-
-(defmacro qvelt-1 (vec ind)
- `(svref ,vec (the fixnum (1- (the fixnum ,ind)))))
-
(defmacro qvmaxindex (x)
`(the fixnum (1- (the fixnum (length (the simple-vector ,x))))))