aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/g-opt.boot7
-rw-r--r--src/interp/g-util.boot33
2 files changed, 26 insertions, 14 deletions
diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot
index 953efd3f..4d8387f0 100644
--- a/src/interp/g-opt.boot
+++ b/src/interp/g-opt.boot
@@ -405,13 +405,14 @@ $VMsideEffectFreeOperators ==
CGREATERP GGREATERP CHAR BOOLE GET BVEC_-GREATER FUNCALL %false %true
%and %or %not %eq %ieq %ilt %ile %igt %ige %head %tail %integer?
%imul %iadd %isub %igcd %ilcm %ipow %imin %imax %ieven? %iodd? %iinc
- %feq %flt %fle %fgt %fge %fmul %fadd %fsub %fexp %fmin %fmax
- %fpow %nil %pair? %lconcat %llength %hash %ismall?)
+ %feq %flt %fle %fgt %fge %fmul %fadd %fsub %fexp %fmin %fmax %float?
+ %fpow %nil %pair? %lconcat %llength %lfirst %lsecond %lthird
+ %hash %ismall? %string?)
++ List of simple VM operators
$simpleVMoperators ==
append($VMsideEffectFreeOperators,
- ["CONS","LIST","VECTOR","STRINGIMAGE",
+ ["CONS","LIST","VECTOR","STRINGIMAGE",'%gensym,
"MAKE-FULL-CVEC","BVEC-MAKE-FULL","COND"])
++ Return true if the `form' is semi-simple with respect to
diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot
index 6d19f0dd..9fa9777d 100644
--- a/src/interp/g-util.boot
+++ b/src/interp/g-util.boot
@@ -273,29 +273,40 @@ for x in [
['%isub,:"-"],
-- unary float operations.
- ['%fabs,:'ABS],
+ ['%fabs, :'ABS],
+ ['%float?,:'FLOATP],
-- binary float operations.
- ['%fadd,:"+"],
- ['%fge, :">="],
- ['%fgt, :">"],
- ['%fle, :"<="],
- ['%flt, :"<"],
- ['%fmax,:'MAX],
- ['%fmin,:'MIN],
- ['%fmul,:"*"],
- ['%fpow,:'EXPT],
- ['%fsub,:"-"],
+ ['%fadd, :"+"],
+ ['%fge, :">="],
+ ['%fgt, :">"],
+ ['%fle, :"<="],
+ ['%flt, :"<"],
+ ['%fmax, :'MAX],
+ ['%fmin, :'MIN],
+ ['%fmul, :"*"],
+ ['%fpow, :'EXPT],
+ ['%fsub, :"-"],
-- list contants
-- ['%nil, :'NIL],
-- unary list operations
['%head, :'CAR],
+ ['%makepair,:'CONS],
+ ['%lfirst, :'CAR],
['%llength, :'LIST_-LENGTH],
+ ['%lsecond, :'CADR],
+ ['%lthird, :'CADDR],
['%pair?, :'CONSP],
['%tail, :'CDR],
-- binary list operations
['%lconcat, :'APPEND],
+ -- symbol unary functions
+ ['%gensym, :'GENSYM],
+
+ -- string unary functions
+ ['%string?, :'STRINGP],
+
-- general utility
['%hash,:'SXHASH]
] repeat property(first x,'%Rename) := rest x