6 Ruby.primitive :fixnum_invert
7 raise PrimitiveFailure, "Fixnum#~ primitive failed"
11 Ruby.primitive :fixnum_neg
12 raise PrimitiveFailure, "Fixnum#-@ primitive failed"
15 # binary math operators
28 Ruby.primitive :fixnum_mul
32 # this method is aliased to / in core
33 # see README-DEVELOPERS regarding safe math compiler plugin
35 Ruby.primitive :fixnum_div
40 Ruby.primitive :fixnum_modulo
45 Ruby.primitive :fixnum_divmod
49 # bitwise binary operators
52 Ruby.primitive :fixnum_and
53 if o.__kind_of__ Float
54 raise RangeError, ("float %-.10g is out of range of a Fixnum" % o)
60 Ruby.primitive :fixnum_or
61 if o.__kind_of__ Float
62 raise RangeError, ("float %-.10g is out of range of a Fixnum" % o)
68 Ruby.primitive :fixnum_xor
69 if o.__kind_of__ Float
70 raise RangeError, ("float %-.10g is out of range of a Fixnum" % o)
75 def __fixnum_left_shift__(c)
76 Ruby.primitive :fixnum_left_shift
77 raise PrimitiveFailure, "primitive failed"
80 def __fixnum_right_shift__(c)
81 Ruby.primitive :fixnum_right_shift
82 raise PrimitiveFailure, "primitive failed"
85 def __bignum_new__(value)
86 Ruby.primitive :bignum_new
87 raise PrimitiveFailure, "primitive failed"
90 # comparison operators
98 Ruby.primitive :compare
103 Ruby.primitive :fixnum_lt
108 Ruby.primitive :fixnum_le
113 Ruby.primitive :fixnum_gt
118 Ruby.primitive :fixnum_ge
135 Ruby.primitive :fixnum_to_s
136 raise PrimitiveFailure, "Fixnum#based_to_s primitive failed"
140 Ruby.primitive :fixnum_to_f
141 raise PrimitiveFailure, "Fixnum#to_f primitive failed"
145 Ruby.primitive :fixnum_size
146 raise PrimitiveFailure, "Fixnum#size primitive failed"