diff options
author | dos-reis <gdr@axiomatics.org> | 2010-06-27 21:12:18 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2010-06-27 21:12:18 +0000 |
commit | af47268d550b5d1f1380b1a7be01389eae02a4d2 (patch) | |
tree | 430b9ee52a8ff7893a4efbc97eeecad61f9d0f68 /src | |
parent | c18c464e8da9c36f71e468d52f3090a13acb4fa9 (diff) | |
download | open-axiom-af47268d550b5d1f1380b1a7be01389eae02a4d2.tar.gz |
* interp/g-util.boot: Add new opcode %before?.
* interp/g-opt.boot ($VMsideEffectFreeOperators): Include it.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/interp/g-opt.boot | 2 | ||||
-rw-r--r-- | src/interp/g-util.boot | 16 |
3 files changed, 16 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 37929af2..7cfdc4e1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2010-06-27 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/g-util.boot: Add new opcode %before?. + * interp/g-opt.boot ($VMsideEffectFreeOperators): Include it. + +2010-06-27 Gabriel Dos Reis <gdr@cs.tamu.edu> + * algebra/matcat.spad.pamphlet (MatrixCategory) [matrix]: Add overload that takes sizes and function to compute entries. diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot index 8c7c4a10..6786bbbf 100644 --- a/src/interp/g-opt.boot +++ b/src/interp/g-opt.boot @@ -479,7 +479,7 @@ $VMsideEffectFreeOperators == %nil %pair? %lconcat %llength %lfirst %lsecond %lthird %lreverse %lempty? %hash %ismall? %string? %f2s %ceq %clt %cle %cgt %cge %c2i %i2c - %vref %vlength) + %vref %vlength %before?) ++ List of simple VM operators $simpleVMoperators == diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot index 97519045..284a7e98 100644 --- a/src/interp/g-util.boot +++ b/src/interp/g-util.boot @@ -227,6 +227,9 @@ expandPeq ['%peq,x,y] == y = '%nil => ['NULL,expandToVMForm x] ['EQ,expandToVMForm x, expandToVMForm y] +expandBefore? ['%before?,x,y] == + ['GGREATER,expandToVMForm y,expandToVMForm x] + -- Integer operations expandIneg ['%ineg,x] == x := expandToVMForm x @@ -393,8 +396,8 @@ for x in [ ++ Table of opcode-expander pairs. for x in [ - ['%collect,:function expandCollect], - ['%loop, :function expandLoop], + ['%collect, :function expandCollect], + ['%loop, :function expandLoop], ['%return, :function expandReturn], ['%igt, :function expandIgt], @@ -410,11 +413,12 @@ for x in [ ['%fneg, :function expandFneg], ['%fprec, :function expandFprec], - ["%peq",:function expandPeq], + ['%peq, :function expandPeq], + ['%before?, :function expandBefore?], - ["%bind",:function expandBind], - ["%store",:function expandStore], - ["%dynval",:function expandDynval] + ["%bind", :function expandBind], + ["%store", :function expandStore], + ["%dynval", :function expandDynval] ] repeat property(first x,"%Expander") := rest x ++ Return the expander of a middle-end opcode, or nil if there is none. |