aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-06-01 03:06:34 +0000
committerdos-reis <gdr@axiomatics.org>2010-06-01 03:06:34 +0000
commit39f3846ba6690deb71bb26630fbd655fabf36ebd (patch)
tree1a106f8e6c9e56ee1c7127426bfbb7c38f2aafaa /src/interp
parent5b0462a5f0b499c2c3177e36e52b476875141969 (diff)
downloadopen-axiom-39f3846ba6690deb71bb26630fbd655fabf36ebd.tar.gz
Adjust opcode for character support
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/g-opt.boot2
-rw-r--r--src/interp/g-util.boot9
2 files changed, 10 insertions, 1 deletions
diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot
index 4d8387f0..eccf8e73 100644
--- a/src/interp/g-opt.boot
+++ b/src/interp/g-opt.boot
@@ -407,7 +407,7 @@ $VMsideEffectFreeOperators ==
%imul %iadd %isub %igcd %ilcm %ipow %imin %imax %ieven? %iodd? %iinc
%feq %flt %fle %fgt %fge %fmul %fadd %fsub %fexp %fmin %fmax %float?
%fpow %nil %pair? %lconcat %llength %lfirst %lsecond %lthird
- %hash %ismall? %string?)
+ %hash %ismall? %string? %ceq %clt %cle %cgt %cge %c2i %i2c)
++ List of simple VM operators
$simpleVMoperators ==
diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot
index 9fa9777d..a3674a01 100644
--- a/src/interp/g-util.boot
+++ b/src/interp/g-util.boot
@@ -249,6 +249,15 @@ for x in [
['%and, :'AND],
['%or, :'OR],
+ -- character binary operations
+ ['%ceq, :'CHAR_=],
+ ['%clt, :'CHAR_<],
+ ['%cle, :'CHAR_<_=],
+ ['%cgt, :'CHAR_>],
+ ['%cge, :'CHAR_>_=],
+ ['%c2i, :'CHAR_-CODE],
+ ['%i2c, :'CODE_-CHAR],
+
-- unary integer operations.
['%iabs, :'ABS],
['%ieven?, :'EVENP],