Code cleanups

db4
Slava Pestov 2010-04-28 02:53:08 -04:00
parent c55a6bb385
commit d23bb19b55
2 changed files with 5 additions and 5 deletions

View File

@ -94,9 +94,6 @@ M: ##load-reference optimize-insn
! Into either
! ##shl-imm by X - tag-bits, or
! ##sar-imm by tag-bits - X.
: combine-shl-imm-input? ( insn -- ? )
;
: combine-shl-imm-input ( insn -- )
[ dst>> ] [ src1>> ] [ src2>> ] tri tag-bits get {
{ [ 2dup < ] [ swap - ##sar-imm here ] }
@ -232,6 +229,9 @@ M: ##compare-integer-branch optimize-insn
[ call-next-method ]
} cond ;
! Identities:
! tag(neg(untag(x))) = x
! tag(neg(x)) = x * -2^tag-bits
: inert-tag/untag-unary? ( insn -- ? )
[ dst>> ] [ src>> ] bi [ rep-of tagged-rep? ] both? ;
@ -252,6 +252,8 @@ M: ##neg optimize-insn
[ call-next-method ]
} cond ;
! Identity:
! tag(not(untag(x))) = not(x) xor tag-mask
:: emit-tagged-not ( insn -- )
tagged-rep next-vreg-rep :> temp
temp insn src>> ##not

View File

@ -91,8 +91,6 @@ inline static cell tag_fixnum(fixnum untagged)
return RETAG(untagged << TAG_BITS,FIXNUM_TYPE);
}
struct object;
#define NO_TYPE_CHECK static const cell type_number = TYPE_COUNT
struct object {