diff options
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/g-opt.boot | 3 | ||||
-rw-r--r-- | src/interp/lisp-backend.boot | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot index 6e379d21..c65dcf2d 100644 --- a/src/interp/g-opt.boot +++ b/src/interp/g-opt.boot @@ -657,7 +657,8 @@ $VMsideEffectFreeOperators == %sname %strlength %streq %i2s %schar %strlt %strconc %strcopy %bytevec2str %str2bytevec - %array %simpleArray %emptyArray %list2array %initialElement %initialContents + %array %simpleArray %emptyArray %list2array %array2list + %initialElement %initialContents %vector %aref %vref %vlength %vcopy %bitvector %bitvecnot %bitvecand %bitvecnand %bivecor %bitvecnor %bitvecxor diff --git a/src/interp/lisp-backend.boot b/src/interp/lisp-backend.boot index 6fb119e8..d1fa2d74 100644 --- a/src/interp/lisp-backend.boot +++ b/src/interp/lisp-backend.boot @@ -190,6 +190,9 @@ expandList(x is ['%list,:args]) == args' = 'failed => ['LIST,:args] quote args' +expandArray2List ['%array2list,x] == + ['COERCE,expandToVMForm x,quote 'LIST] + expandLeave ['%leave,l,x] == x := expandToVMForm x l = nil => ['RETURN,x] @@ -672,6 +675,7 @@ for x in [ ++ Table of opcode-expander pairs. for x in [ ['%list, :function expandList], + ['%array2list, :function expandArray2List], ['%collect, :function expandCollect], ['%repeat, :function expandRepeat], ['%return, :function expandReturn], |