UNION: immediate fixnum POSTPONE: f ;
: generate-push ( node -- )
- [
- >#push< dup literal-template
- dup requested-vregs ensure-vregs
- alloc-vregs [ [ load-literal ] 2each ] keep
- phantom-d get phantom-append
- ] with-scope ;
+ >#push< dup literal-template
+ dup requested-vregs ensure-vregs
+ alloc-vregs [ [ load-literal ] 2each ] keep
+ phantom-d get phantom-append
+ "fp-scratch" off ;
M: #push generate-node ( #push -- )
generate-push iterate-next ;
[ 5.0 ] [ [ 5.0 ] compile-1 full-gc full-gc full-gc ] unit-test
[ 2.0 3.0 ] [ 3.0 [ 2.0 swap ] compile-1 ] unit-test
+[ 1 2 3 4.0 ] [ [ 1 2 3 4.0 ] compile-1 ] unit-test
+
[ 3.0 ] [ 1.0 [ 2.0 float+ ] compile-1 ] unit-test
[ 3.0 ] [ 1.0 [ 2.0 swap float+ ] compile-1 ] unit-test
[ 3.0 ] [ 1.0 2.0 [ float+ ] compile-1 ] unit-test