diff options
author | dos-reis <gdr@axiomatics.org> | 2010-12-31 09:08:44 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2010-12-31 09:08:44 +0000 |
commit | 76862a96d4ba24beffa94cfbfbb1c2c8dbd1dd26 (patch) | |
tree | 4e200ace4c0bffe0e95e118acbd2bbdab71bd5f6 /src/interp | |
parent | b1fb4cb58a886484e213bd1235f6de75713950c9 (diff) | |
download | open-axiom-76862a96d4ba24beffa94cfbfbb1c2c8dbd1dd26.tar.gz |
* interp/g-opt.boot ($VMsideEffectFreeOperators): Include new
builtin functions %strlt, %streq, %strcopy, and %strconc.
* interp/g-util.boot: Expand them.
* algebra/string.spad.pamphlet (String): Remove uses of
Lisp-level functions CHAR, EQUAL, CHAR=, ans SXHASH.
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/g-opt.boot | 2 | ||||
-rw-r--r-- | src/interp/g-util.boot | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot index a25c25a3..4eadc1a3 100644 --- a/src/interp/g-opt.boot +++ b/src/interp/g-opt.boot @@ -451,7 +451,7 @@ $VMsideEffectFreeOperators == %nil %pair? %lconcat %llength %lfirst %lsecond %lthird %lreverse %lempty? %hash %ismall? %string? %f2s %ccst %ceq %clt %cle %cgt %cge %c2i %i2c %s2c %sname - %strlength %i2s + %strlength %streq %i2s %schar %strlt %strconc %strcopy %vref %vlength %before?) ++ List of simple VM operators diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot index 9f5502b3..fb08a56a 100644 --- a/src/interp/g-util.boot +++ b/src/interp/g-util.boot @@ -349,6 +349,13 @@ expandFlt ['%flt,x,y] == expandFgt ['%fgt,x,y] == expandFlt ['%flt,y,x] +-- String operations +expandStreq ['%streq,x,y] == + expandToVMForm ['%not,['%peq,['STRING_=,x,y],'%nil]] + +expandStrlt ['%strlt,x,y] == + expandToVMForm ['%not,['%peq,['STRING_<,x,y],'%nil]] + -- Local variable bindings expandBind ['%bind,inits,:body] == body := expandToVMForm body @@ -515,6 +522,9 @@ for x in [ -- string unary functions ['%string?, :'STRINGP], ['%strlength, :'LENGTH], + ['%schar, :'CHAR], + ['%strconc, :'STRCONC], + ['%strcopy, :'COPY_-SEQ], -- general utility ['%hash, :'SXHASH], @@ -554,6 +564,9 @@ for x in [ ['%fneg, :function expandFneg], ['%fprec, :function expandFprec], + ['%streq, :function expandStreq], + ['%strlt, :function expandStrlt], + ['%peq, :function expandPeq], ['%before?, :function expandBefore?], |