aboutsummaryrefslogtreecommitdiff
path: root/src/interp/g-util.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-12-31 15:20:08 +0000
committerdos-reis <gdr@axiomatics.org>2010-12-31 15:20:08 +0000
commitb06db52e69e3a7b7f4bd90ac129ea369be45284a (patch)
tree84b61490c6ac337af1a9dba684725264d8bc6252 /src/interp/g-util.boot
parent76862a96d4ba24beffa94cfbfbb1c2c8dbd1dd26 (diff)
downloadopen-axiom-b06db52e69e3a7b7f4bd90ac129ea369be45284a.tar.gz
* interp/g-opt.boot ($VMsideEffectFreeOperators): Include %cup and
%cdown. * interp/g-util.boot: Expand them. * interp/vmlisp.lisp (QESET): Remove. * algebra/string.spad.pamphlet (String): Don't use QESET.
Diffstat (limited to 'src/interp/g-util.boot')
-rw-r--r--src/interp/g-util.boot28
1 files changed, 19 insertions, 9 deletions
diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot
index fb08a56a..98e834bb 100644
--- a/src/interp/g-util.boot
+++ b/src/interp/g-util.boot
@@ -349,13 +349,20 @@ expandFlt ['%flt,x,y] ==
expandFgt ['%fgt,x,y] ==
expandFlt ['%flt,y,x]
--- String operations
+-- String operations
+
+++ string equality comparison
expandStreq ['%streq,x,y] ==
expandToVMForm ['%not,['%peq,['STRING_=,x,y],'%nil]]
+++ string lexicographic comparison
expandStrlt ['%strlt,x,y] ==
expandToVMForm ['%not,['%peq,['STRING_<,x,y],'%nil]]
+++ deposit a character `z' at slot number `y' in string object `x'.
+expandStrstc ['%strstc,x,y,z] ==
+ expandToVMForm ['%store,['%schar,x,y],z]
+
-- Local variable bindings
expandBind ['%bind,inits,:body] ==
body := expandToVMForm body
@@ -424,13 +431,15 @@ for x in [
['%or, :'OR],
-- character operations
- ['%ceq, :'CHAR_=],
- ['%clt, :'CHAR_<],
- ['%cle, :'CHAR_<_=],
- ['%cgt, :'CHAR_>],
- ['%cge, :'CHAR_>_=],
- ['%c2i, :'CHAR_-CODE],
- ['%i2c, :'CODE_-CHAR],
+ ['%ceq, :'CHAR_=],
+ ['%clt, :'CHAR_<],
+ ['%cle, :'CHAR_<_=],
+ ['%cgt, :'CHAR_>],
+ ['%cge, :'CHAR_>_=],
+ ['%cup, :'CHAR_-UPCASE],
+ ['%cdown, :'CHAR_-DOWNCASE],
+ ['%c2i, :'CHAR_-CODE],
+ ['%i2c, :'CODE_-CHAR],
-- byte operations
['%beq, :'byteEqual],
@@ -519,7 +528,7 @@ for x in [
['%gensym, :'GENSYM],
['%sname, :'SYMBOL_-NAME],
- -- string unary functions
+ -- string functions
['%string?, :'STRINGP],
['%strlength, :'LENGTH],
['%schar, :'CHAR],
@@ -566,6 +575,7 @@ for x in [
['%streq, :function expandStreq],
['%strlt, :function expandStrlt],
+ ['%strstc, :function expandStrstc],
['%peq, :function expandPeq],
['%before?, :function expandBefore?],