! Copyright (C) 2008, 2010 Slava Pestov, Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays combinators compiler.cfg.builder.blocks
-compiler.cfg.comparisons compiler.cfg.hats
-compiler.cfg.instructions compiler.cfg.stacks.local compiler.cfg.registers
-compiler.cfg.stacks compiler.tree.propagation.info cpu.architecture fry kernel
-layouts math math.intervals namespaces sequences ;
+USING: accessors arrays combinators compiler.cfg
+compiler.cfg.builder.blocks compiler.cfg.comparisons compiler.cfg.hats
+compiler.cfg.instructions compiler.cfg.registers compiler.cfg.stacks
+compiler.cfg.stacks.local compiler.tree.propagation.info
+cpu.architecture fry kernel layouts math math.intervals namespaces
+sequences ;
IN: compiler.cfg.intrinsics.fixnum
: emit-both-fixnums? ( -- )
ds-peek 0 cc> ##compare-integer-imm-branch,
[ emit-fixnum-left-shift ] with-branch
[ emit-fixnum-right-shift ] with-branch
- 2array emit-conditional ;
+ 2array basic-block get emit-conditional ;
: emit-fixnum-shift-fast ( node -- )
node-input-infos second interval>> {
: emit-overflow-case ( word -- final-bb )
[
- -1 emit-call-block
+ -1 basic-block get emit-call-block
] with-branch ;
: emit-fixnum-overflow-op ( quot word -- )
! of loc>vreg sync
[ [ (2inputs) [ any-rep ^^copy ] bi@ cc/o ] dip call ] dip
[ emit-no-overflow-case ] [ emit-overflow-case ] bi* 2array
- emit-conditional ; inline
+ basic-block get emit-conditional ; inline
: fixnum+overflow ( x y -- z ) [ >bignum ] bi@ + ;