diff options
author | dos-reis <gdr@axiomatics.org> | 2010-06-01 00:22:44 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2010-06-01 00:22:44 +0000 |
commit | 5b0462a5f0b499c2c3177e36e52b476875141969 (patch) | |
tree | a698fd6d161395245e4b1bdc349724f503ec8c44 /src/interp | |
parent | a1eeda981dd4d753a805ff4a13a4ef26d167a7fb (diff) | |
download | open-axiom-5b0462a5f0b499c2c3177e36e52b476875141969.tar.gz |
* interp/g-util.boot: Add more opcodes.
* algebra/syntax.spad.pamphlet: Clean up.
* algebra/variable.spad.pamphlet: Likewise.
* algebra/ystream.spad.pamphlet: Likewise.
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/g-opt.boot | 7 | ||||
-rw-r--r-- | src/interp/g-util.boot | 33 |
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 |