/* generated by Id 1.1 at ,$ */ /* with the command: -I../stage1/ -c SmallInteger.st -o ../stage2/SmallInteger.o.c */ #include static struct __libid *_libid= 0; #ifdef ID_DEBUG # define _enter(info) void *__id_debug= _libid->enter(info) # define _line(lno) _libid->line(lno) # define _leave() _libid->leave(__id_debug) # define _backtrace() _libid->backtrace() #else # define _enter(info) (void)info # define _line(lno) # define _leave() # define _backtrace() "(no debugging information)\n" #endif #define _return _leave(); return #define _sendv(MSG, N, RCV, ARG...) ({ \ struct __send _s= { (MSG), (N), (RCV) }; \ ((_imp_t)(_libid->bindv(&_s)))(&_s, _s.receiver, _s.receiver, ##ARG); \ }) #define _superv(TYP, MSG, N, RCV, ARG...) ({ \ struct __send _s= { (MSG), (N), (TYP) }; \ _imp_t _imp= _libid->bindv(&_s); \ _s.receiver= (RCV); \ _imp(&_s, _s.receiver, _s.receiver, ##ARG); \ }) static oop s_bitXor_= 0; static oop s_negated= 0; static oop s_bitOr_= 0; static oop s_abs= 0; static oop s__5c_5c= 0; static oop s_highBitOfPositiveReceiver= 0; static oop s_whileFalse_= 0; static oop s_isSmallInteger= 0; static oop s_identityHash= 0; static oop s_digitLength= 0; static oop s_bitAnd_= 0; static oop s_ifTrue_ifFalse_= 0; static oop s_size_5f_value_5f_= 0; static oop s_minVal= 0; static oop s__2a= 0; static oop s_errorDivisionByZero= 0; static oop s_numerator_denominator_= 0; static oop s_errorZeroDivide= 0; static oop s_primitiveFailed= 0; static oop s_highBitOfMagnitude= 0; static oop s_whileTrue_= 0; static oop s_downTo_by_do_= 0; static oop s_upTo_by_do_= 0; static oop s_timesRepeat_= 0; static oop s_bitClear_= 0; static oop s_error_= 0; static oop s_maxVal= 0; static oop s_digitAt_= 0; static oop s__3c_3d= 0; static oop s_hash= 0; static oop s__3c_3c= 0; static oop s_value_5f_= 0; static oop s_quo_= 0; static oop s__5fimport_= 0; static oop s_ifFalse_= 0; static oop s__2d= 0; static oop s_ifTrue_= 0; static oop s__5fbeTagType= 0; static oop s__2b= 0; static oop s__2f_2f= 0; static oop s_to_do_= 0; static oop s__2f= 0; static oop s_downTo_do_= 0; static oop s__3d_3d= 0; static oop s_gcd_= 0; static oop s__3d= 0; static oop s_bitInvert= 0; static oop s__3c= 0; static oop s_and_= 0; static oop s_bitShift_= 0; static oop s__3e= 0; static oop s_reduced= 0; static oop s_value_= 0; static oop s__3e_3d= 0; static oop s_at_= 0; static oop s__7e_3d= 0; static oop s_to_by_do_= 0; static oop s__3e_3e= 0; static oop s_value= 0; static struct _Selector { const char *name; oop *addr; } _Selectors[]= { { "bitXor:", &s_bitXor_ }, { "negated", &s_negated }, { "bitOr:", &s_bitOr_ }, { "abs", &s_abs }, { "\\\\", &s__5c_5c }, { "highBitOfPositiveReceiver", &s_highBitOfPositiveReceiver }, { "whileFalse:", &s_whileFalse_ }, { "isSmallInteger", &s_isSmallInteger }, { "identityHash", &s_identityHash }, { "digitLength", &s_digitLength }, { "bitAnd:", &s_bitAnd_ }, { "ifTrue:ifFalse:", &s_ifTrue_ifFalse_ }, { "size_:value_:", &s_size_5f_value_5f_ }, { "minVal", &s_minVal }, { "*", &s__2a }, { "errorDivisionByZero", &s_errorDivisionByZero }, { "numerator:denominator:", &s_numerator_denominator_ }, { "errorZeroDivide", &s_errorZeroDivide }, { "primitiveFailed", &s_primitiveFailed }, { "highBitOfMagnitude", &s_highBitOfMagnitude }, { "whileTrue:", &s_whileTrue_ }, { "downTo:by:do:", &s_downTo_by_do_ }, { "upTo:by:do:", &s_upTo_by_do_ }, { "timesRepeat:", &s_timesRepeat_ }, { "bitClear:", &s_bitClear_ }, { "error:", &s_error_ }, { "maxVal", &s_maxVal }, { "digitAt:", &s_digitAt_ }, { "<=", &s__3c_3d }, { "hash", &s_hash }, { "<<", &s__3c_3c }, { "value_:", &s_value_5f_ }, { "quo:", &s_quo_ }, { "_import:", &s__5fimport_ }, { "ifFalse:", &s_ifFalse_ }, { "-", &s__2d }, { "ifTrue:", &s_ifTrue_ }, { "_beTagType", &s__5fbeTagType }, { "+", &s__2b }, { "//", &s__2f_2f }, { "to:do:", &s_to_do_ }, { "/", &s__2f }, { "downTo:do:", &s_downTo_do_ }, { "==", &s__3d_3d }, { "gcd:", &s_gcd_ }, { "=", &s__3d }, { "bitInvert", &s_bitInvert }, { "<", &s__3c }, { "and:", &s_and_ }, { "bitShift:", &s_bitShift_ }, { ">", &s__3e }, { "reduced", &s_reduced }, { "value:", &s_value_ }, { ">=", &s__3e_3d }, { "at:", &s_at_ }, { "~=", &s__7e_3d }, { "to:by:do:", &s_to_by_do_ }, { ">>", &s__3e_3e }, { "value", &s_value }, { 0, 0 } }; struct t__object { struct _vtable *_vtable[0]; }; struct t__selector { struct _vtable *_vtable[0]; oop v__size; oop v__elements; }; struct t__assoc { struct _vtable *_vtable[0]; oop v_key; oop v_value; }; struct t__closure { struct _vtable *_vtable[0]; oop v__method; oop v_data; }; struct t__vector { struct _vtable *_vtable[0]; oop v__size; }; struct t__vtable { struct _vtable *_vtable[0]; oop v__tally; oop v_bindings; oop v_delegate; }; struct t_Object { struct _vtable *_vtable[0]; }; struct t_UndefinedObject { struct _vtable *_vtable[0]; }; struct t_StaticBlockClosure { struct _vtable *_vtable[0]; oop v__function; oop v__arity; }; struct t_BlockClosure { struct _vtable *_vtable[0]; oop v__function; oop v__arity; oop v_outer; oop v_state; oop v__nlr; }; struct t_Magnitude { struct _vtable *_vtable[0]; }; struct t_Character { struct _vtable *_vtable[0]; oop v_value; }; struct t_Number { struct _vtable *_vtable[0]; }; struct t_Fraction { struct _vtable *_vtable[0]; oop v_numerator; oop v_denominator; }; struct t_Float { struct _vtable *_vtable[0]; }; struct t_Integer { struct _vtable *_vtable[0]; }; struct t_SmallInteger { struct _vtable *_vtable[0]; }; struct t_LargePositiveInteger { struct _vtable *_vtable[0]; oop v_bytes; }; struct t_LargeNegativeInteger { struct _vtable *_vtable[0]; oop v_bytes; }; struct t_Collection { struct _vtable *_vtable[0]; }; struct t_SequenceableCollection { struct _vtable *_vtable[0]; }; struct t_ArrayedCollection { struct _vtable *_vtable[0]; oop v_size; }; struct t_Array { struct _vtable *_vtable[0]; oop v_size; oop v__pointers; }; struct t_ImmutableArray { struct _vtable *_vtable[0]; oop v_size; oop v__pointers; }; struct t_WordArray { struct _vtable *_vtable[0]; oop v_size; oop v__words; }; struct t_ImmutableWordArray { struct _vtable *_vtable[0]; oop v_size; oop v__words; }; struct t_ByteArray { struct _vtable *_vtable[0]; oop v_size; oop v__bytes; }; struct t_ImmutableByteArray { struct _vtable *_vtable[0]; oop v_size; oop v__bytes; }; struct t_String { struct _vtable *_vtable[0]; oop v_size; oop v__bytes; }; struct t_ImmutableString { struct _vtable *_vtable[0]; oop v_size; oop v__bytes; }; struct t_Symbol { struct _vtable *_vtable[0]; oop v_size; oop v__bytes; }; struct t_nil { struct _vtable *_vtable[0]; }; struct t_true { struct _vtable *_vtable[0]; }; struct t_false { struct _vtable *_vtable[0]; }; struct t_CharacterTable { struct _vtable *_vtable[0]; oop v_size; oop v__pointers; }; static oop l_4= 0; static oop l_6= 0; static oop l_10= 0; static oop l_11= 0; static oop l_12= 0; static oop l_13= 0; static oop l_14= 0; static oop l_15= 0; static oop l_16= 0; static oop l_17= 0; static oop l_18= 0; static oop l_19= 0; static oop l_21= 0; static oop l_22= 0; static oop l_23= 0; static oop l_24= 0; static oop l_25= 0; static oop l_26= 0; static oop l_31= 0; static oop l_35= 0; static oop l_36= 0; static oop l_38= 0; static oop l_40= 0; static oop l_42= 0; static oop l_44= 0; static oop l_45= 0; static oop l_56= 0; static oop l_57= 0; static oop l_58= 0; static oop l_59= 0; static oop l_61= 0; static oop l_63= 0; static oop l_65= 0; static oop l_67= 0; static oop l_71= 0; static oop l_72= 0; static oop v__object= 0; static oop v_Object= 0; static oop v_UndefinedObject= 0; static oop v_StaticBlockClosure= 0; static oop v_Magnitude= 0; static oop v_Number= 0; static oop v_Fraction= 0; static oop v_Integer= 0; static oop v_SmallInteger= 0; static oop v_LargePositiveInteger= 0; static oop v_Collection= 0; static oop v_SequenceableCollection= 0; static oop v_ArrayedCollection= 0; static oop v_Array= 0; static oop v_WordArray= 0; static oop v_ByteArray= 0; static oop v_ImmutableByteArray= 0; static oop v_String= 0; static oop v_ImmutableString= 0; static oop v_true= 0; static oop v_false= 0; static struct __methodinfo __info1= { "isSmallInteger", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 27, 28, 0 }; static oop SmallInteger__isSmallInteger(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info1); oop _1= 0; _line(27); _1= v_true; _leave(); return _1; _leave(); } static struct __methodinfo __info2= { "isSmallInteger", "Object", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 28, 30, &__info1 }; static oop Object__isSmallInteger(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info2); oop _1= 0; _line(28); _1= v_false; _leave(); return _1; _leave(); } static struct __methodinfo __info3= { "hash", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 30, 31, &__info2 }; static oop SmallInteger__hash(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info3); oop _1= 0; oop _2= 0; _line(30); _1= v_self; _2= l_4; if ((1 & (long)_1) && (_1 > 0) && (_2 > 0)) { _1= (oop)((long)_1 & (long)_2); } else _1= _sendv(s_bitAnd_, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info5= { "identityHash", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 31, 33, &__info3 }; static oop SmallInteger__identityHash(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info5); oop _1= 0; oop _2= 0; _line(31); _1= v_self; _2= l_6; if ((1 & (long)_1) && (_1 > 0) && (_2 > 0)) { _1= (oop)((long)_1 & (long)_2); } else _1= _sendv(s_bitAnd_, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info7= { "maxVal", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 33, 34, &__info5 }; static oop SmallInteger__maxVal(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info7); oop _1= 0; _line(33); { # define self ((struct t_SmallInteger *)v_self) return (oop)((-1UL >> 1) ); # undef self } _1= 0; _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info8= { "minVal", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 34, 36, &__info7 }; static oop SmallInteger__minVal(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info8); oop _1= 0; _line(34); { # define self ((struct t_SmallInteger *)v_self) return (oop)((-1UL >> 1) + 2); # undef self } _1= 0; _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info9= { "digitLength", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 36, 44, &__info8 }; static oop SmallInteger__digitLength(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info9); oop _1= 0; oop _2= 0; oop _3= 0; _line(36); /* ifTrue: */ _1= 0; /* and: */ _2= v_self; _3= l_10; if (1 & (long)_2) { _2= (((long)_2 < (long)_3) ? v_true : v_false); } else _2= _sendv(s__3c, 2, _2, _3); if (!_2) goto _l2; { _2= v_self; _3= l_11; if (1 & (long)_2) { _2= (((long)_2 > (long)_3) ? v_true : v_false); } else _2= _sendv(s__3e, 2, _2, _3); } _l2:; if (!_2) goto _l1; { _1= l_12; _leave(); return _1; } _l1:; /* ifTrue: */ _1= 0; /* and: */ _2= v_self; _3= l_13; if (1 & (long)_2) { _2= (((long)_2 < (long)_3) ? v_true : v_false); } else _2= _sendv(s__3c, 2, _2, _3); if (!_2) goto _l4; { _2= v_self; _3= l_14; if (1 & (long)_2) { _2= (((long)_2 > (long)_3) ? v_true : v_false); } else _2= _sendv(s__3e, 2, _2, _3); } _l4:; if (!_2) goto _l3; { _1= l_15; _leave(); return _1; } _l3:; /* ifTrue: */ _1= 0; /* and: */ _2= v_self; _3= l_16; if (1 & (long)_2) { _2= (((long)_2 < (long)_3) ? v_true : v_false); } else _2= _sendv(s__3c, 2, _2, _3); if (!_2) goto _l6; { _2= v_self; _3= l_17; if (1 & (long)_2) { _2= (((long)_2 > (long)_3) ? v_true : v_false); } else _2= _sendv(s__3e, 2, _2, _3); } _l6:; if (!_2) goto _l5; { _1= l_18; _leave(); return _1; } _l5:; _1= l_19; _leave(); return _1; _leave(); } static struct __methodinfo __info20= { "digitAt:", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 44, 58, &__info9 }; static oop SmallInteger__digitAt_(oop v__closure, oop v_stateful_self, oop v_self, oop v_n) { _enter(&__info20); oop _1= 0; oop _2= 0; oop _3= 0; _line(44); /* ifTrue: */ _1= 0; _2= v_n; _3= l_21; if (1 & (long)_2) { _2= (((long)_2 > (long)_3) ? v_true : v_false); } else _2= _sendv(s__3e, 2, _2, _3); if (!_2) goto _l7; { _1= l_22; _leave(); return _1; } _l7:; /* ifTrue:ifFalse: */ _1= v_self; _2= l_22; if (1 & (long)_1) { _1= (((long)_1 < (long)_2) ? v_true : v_false); } else _1= _sendv(s__3c, 2, _1, _2); if (!_1) goto _l8; { /* ifTrue: */ _1= 0; _2= v_self; _3= v_self; _line(49); _3=_sendv(s_minVal, 1, _3); if (1 & (long)_2 & (long)_3) { _2= (((long)_2 == (long)_3) ? v_true : v_false); } else _2= _sendv(s__3d, 2, _2, _3); if (!_2) goto _l10; { _1= l_23; _2= v_n; _line(52); _1=_sendv(s_at_, 2, _1, _2); _leave(); return _1; } _l10:; _1= l_22; _2= v_self; { int _l= (long)_1 >> 1; int _r= (long)_2 >> 1; int _s= (_l - _r); if ((1 & (long)_2) && ((_s ^ (_s << 1)) >= 0)) _1= (oop)(long)(_s << 1 | 1); else _1= _sendv(s__2d, 2, _1, _2); } _2= l_24; _3= v_n; { int _l= (long)_2 >> 1; int _r= (long)_3 >> 1; int _s= (_l - _r); if ((1 & (long)_3) && ((_s ^ (_s << 1)) >= 0)) _2= (oop)(long)(_s << 1 | 1); else _2= _sendv(s__2d, 2, _2, _3); } _3= l_25; { int _l= (long)_2 >> 1; int _r= (long)_3 >> 1; int _s= (_l * _r); if ((1 & (long)_2) && ((_r == 0) || (_s / _r == _l)) && ((_s ^ (_s << 1)) >= 0)) _2= (oop)(long)(_s << 1 | 1); else _2= _sendv(s__2a, 2, _2, _3); } { int _l= (long)_1 >> 1, _r= (long)_2 >> 1, _s= ((_r < 0) ? (_l >> -_r) : (_l << _r)); if ((1 & (long)_1 & (long)_2) && ( ( (_r >= 0) && (_r <= 31) && (_l == (_s >> _r)) && ((_s ^ (_s << 1)) >= 0) ) || ((_r < 0) && (_r >= -31)) )) _1= (oop)(long)(_s << 1 | 1); else _1= _sendv(s_bitShift_, 2, _1, _2); } _2= l_26; if ((1 & (long)_1) && (_1 > 0) && (_2 > 0)) { _1= (oop)((long)_1 & (long)_2); } else _1= _sendv(s_bitAnd_, 2, _1, _2); _leave(); return _1; } goto _l9; _l8:; { _1= v_self; _2= l_24; _3= v_n; { int _l= (long)_2 >> 1; int _r= (long)_3 >> 1; int _s= (_l - _r); if ((1 & (long)_3) && ((_s ^ (_s << 1)) >= 0)) _2= (oop)(long)(_s << 1 | 1); else _2= _sendv(s__2d, 2, _2, _3); } _3= l_25; { int _l= (long)_2 >> 1; int _r= (long)_3 >> 1; int _s= (_l * _r); if ((1 & (long)_2) && ((_r == 0) || (_s / _r == _l)) && ((_s ^ (_s << 1)) >= 0)) _2= (oop)(long)(_s << 1 | 1); else _2= _sendv(s__2a, 2, _2, _3); } { int _l= (long)_1 >> 1, _r= (long)_2 >> 1, _s= ((_r < 0) ? (_l >> -_r) : (_l << _r)); if ((1 & (long)_1 & (long)_2) && ( ( (_r >= 0) && (_r <= 31) && (_l == (_s >> _r)) && ((_s ^ (_s << 1)) >= 0) ) || ((_r < 0) && (_r >= -31)) )) _1= (oop)(long)(_s << 1 | 1); else _1= _sendv(s_bitShift_, 2, _1, _2); } _2= l_26; if ((1 & (long)_1) && (_1 > 0) && (_2 > 0)) { _1= (oop)((long)_1 & (long)_2); } else _1= _sendv(s_bitAnd_, 2, _1, _2); _leave(); return _1; } _l9:; _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info27= { "+", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 58, 67, &__info20 }; static oop SmallInteger___2b(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNumber) { _enter(&__info27); oop _1= 0; oop _2= 0; _line(58); { # define self ((struct t_SmallInteger *)v_self) if ((long)v_aNumber & 1) { int s= ((int)(long)v_self >> 1) + ((int)(long)v_aNumber >> 1); if ((s ^ (s << 1)) >= 0) return (oop)(long)(s << 1 | 1); } # undef self } _1= 0; _1= v_self; _2= v_aNumber; _line(64); _1=_superv(v_Integer, s__2b, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info28= { "-", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 67, 76, &__info27 }; static oop SmallInteger___2d(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNumber) { _enter(&__info28); oop _1= 0; oop _2= 0; _line(67); { # define self ((struct t_SmallInteger *)v_self) if ((long)v_aNumber & 1) { int s= ((int)(long)v_self >> 1) - ((int)(long)v_aNumber >> 1); if ((s ^ (s << 1)) >= 0) return (oop)(long)(s << 1 | 1); } # undef self } _1= 0; _1= v_self; _2= v_aNumber; _line(73); _1=_superv(v_Integer, s__2d, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info29= { "*", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 76, 85, &__info28 }; static oop SmallInteger___2a(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNumber) { _enter(&__info29); oop _1= 0; oop _2= 0; _line(76); { # define self ((struct t_SmallInteger *)v_self) if ((long)v_aNumber & 1) { int l= (int)(long)v_self >> 1, r= (int)(long)v_aNumber >> 1, s= l * r; if (((s ^ (s << 1)) >= 0) && ((r == 0) || (s / r == l))) return (oop)(long)(s << 1 | 1); } # undef self } _1= 0; _1= v_self; _2= v_aNumber; _line(82); _1=_superv(v_Integer, s__2a, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info30= { "/", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 85, 97, &__info29 }; static oop SmallInteger___2f(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNumber) { _enter(&__info30); oop _1= 0; oop _2= 0; oop _3= 0; _line(85); { # define self ((struct t_SmallInteger *)v_self) if (((long)v_aNumber & 1) && ((long)v_aNumber != 1)) { int l= (long)v_self >> 1, r= (long)v_aNumber >> 1, s= l / r; if (s * r == l) return (oop)(long)(s << 1 | 1); } # undef self } _1= 0; /* ifTrue: */ _1= 0; _2= v_aNumber; _3= l_31; if (1 & (long)_2) { _2= (((long)_2 == (long)_3) ? v_true : v_false); } else _2= _sendv(s__3d, 2, _2, _3); if (!_2) goto _l11; { _1= v_self; _line(91); _1=_sendv(s_errorDivisionByZero, 1, _1); _leave(); return _1; } _l11:; /* ifTrue:ifFalse: */ _1= v_aNumber; _line(92); _1=_sendv(s_isSmallInteger, 1, _1); if (!_1) goto _l12; { _1= v_Fraction; _2= v_self; _3= v_aNumber; _line(93); _1=_sendv(s_numerator_denominator_, 3, _1, _2, _3); _line(93); _1=_sendv(s_reduced, 1, _1); } goto _l13; _l12:; { _1= v_self; _2= v_aNumber; _line(94); _1=_superv(v_Integer, s__2f, 2, _1, _2); } _l13:; _leave(); return _1; _leave(); } static struct __methodinfo __info32= { "//", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 97, 123, &__info30 }; static oop SmallInteger___2f_2f(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNumber) { _enter(&__info32); oop _1= 0; oop _2= 0; _line(97); { # define self ((struct t_SmallInteger *)v_self) if (((long)v_aNumber & 1) && ((long)v_aNumber != 1)) { int rcvr= (long)v_self >> 1, arg= (long)v_aNumber >> 1, result; if (rcvr > 0) { if (arg > 0) { result= rcvr / arg; } else { arg= 0 - arg; result= 0 - ((rcvr + (arg - 1)) / arg); } } else { rcvr= 0 - rcvr; if (arg > 0) { result= 0 - ((rcvr + (arg - 1)) / arg); } else { arg= 0 - arg; result= rcvr / arg; } } if ((result ^ (result << 1)) >= 0) return (oop)(long)(result << 1 | 1); } # undef self } _1= 0; _1= v_self; _2= v_aNumber; _line(120); _1=_superv(v_Integer, s__2f_2f, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info33= { "\\", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 123, 138, &__info32 }; static oop SmallInteger___5c_5c(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNumber) { _enter(&__info33); oop _1= 0; oop _2= 0; _line(123); { # define self ((struct t_SmallInteger *)v_self) if (((long)v_aNumber & 1) && ((long)v_aNumber != 1)) { int rem= ((long)v_self >> 1) % ((long)v_aNumber >> 1); if ((long)v_aNumber < 0) { if (rem > 0) rem += ((long)v_aNumber >> 1); } else { if (rem < 0) rem += ((long)v_aNumber >> 1); } if ((rem ^ (rem << 1)) >= 0) return (oop)(long)(rem << 1 | 1); } # undef self } _1= 0; _1= v_self; _2= v_aNumber; _line(135); _1=_superv(v_Integer, s__5c_5c, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info34= { "quo:", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 138, 158, &__info33 }; static oop SmallInteger__quo_(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNumber) { _enter(&__info34); oop _1= 0; oop _2= 0; oop _3= 0; _line(138); { # define self ((struct t_SmallInteger *)v_self) if ((long)v_self & (long)v_aNumber & 1) { int integerRcvr = (long)v_self >> 1; int integerArg = (long)v_aNumber >> 1; int integerResult = ((integerRcvr > 0) ? (((integerArg > 0) ? (integerRcvr / integerArg) : (0 - (integerRcvr / (0 - integerArg))))) : (((integerArg > 0) ? (0 - ((0 - integerRcvr) / integerArg)) : ((0 - integerRcvr) / (0 - integerArg))))); if ((integerResult ^ (integerResult << 1)) >= 0) return (oop)(long)(integerResult << 1 | 1); } # undef self } _1= 0; /* ifTrue: */ _1= 0; _2= v_aNumber; _3= l_35; if (1 & (long)_2) { _2= (((long)_2 == (long)_3) ? v_true : v_false); } else _2= _sendv(s__3d, 2, _2, _3); if (!_2) goto _l14; { _1= v_self; _line(152); _1=_sendv(s_errorZeroDivide, 1, _1); } _l14:; /* ifFalse: */ _1= 0; _2= v_aNumber; _line(153); _2=_sendv(s_isSmallInteger, 1, _2); if (_2) goto _l15; { _1= v_self; _2= v_aNumber; _line(153); _1=_superv(v_Integer, s_quo_, 2, _1, _2); _leave(); return _1; } _l15:; /* ifTrue: */ _1= 0; /* and: */ _2= v_aNumber; _3= l_36; _2= (_2 == _3) ? v_true : v_false; if (!_2) goto _l17; { _2= v_self; _3= v_self; _line(154); _3=_sendv(s_minVal, 1, _3); _2= (_2 == _3) ? v_true : v_false; } _l17:; if (!_2) goto _l16; { _1= v_self; _line(154); _1=_sendv(s_negated, 1, _1); _leave(); return _1; } _l16:; _1= v_self; _line(155); _1=_sendv(s_primitiveFailed, 1, _1); _leave(); return _1; _leave(); } static struct __methodinfo __info37= { "bitAnd:", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 158, 166, &__info34 }; static oop SmallInteger__bitAnd_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anInteger) { _enter(&__info37); oop _1= 0; oop _2= 0; oop _3= 0; _line(158); { # define self ((struct t_SmallInteger *)v_self) if (((long)v_anInteger & 1) && ((long)v_self > 0) && ((long)v_anInteger > 0)) return (oop)(((long)v_self & (long)v_anInteger) | 1); # undef self } _1= 0; /* ifTrue: */ _1= 0; _2= v_self; _3= l_38; if (1 & (long)_2) { _2= (((long)_2 >= (long)_3) ? v_true : v_false); } else _2= _sendv(s__3e_3d, 2, _2, _3); if (!_2) goto _l18; { _1= v_anInteger; _2= v_self; if ((1 & (long)_1 & (long)_2) && (_1 > 0) && (_2 > 0)) { _1= (oop)((long)_1 & (long)_2); } else _1= _sendv(s_bitAnd_, 2, _1, _2); _leave(); return _1; } _l18:; _1= v_self; _line(163); _1=_sendv(s_bitInvert, 1, _1); _2= v_anInteger; _line(163); _2=_sendv(s_bitInvert, 1, _2); if ((1 & (long)_1 & (long)_2) && (_1 > 0) && (_2 > 0)) { _1= (oop)((long)_1 | (long)_2); } else _1= _sendv(s_bitOr_, 2, _1, _2); _line(163); _1=_sendv(s_bitInvert, 1, _1); _leave(); return _1; _leave(); } static struct __methodinfo __info39= { "bitOr:", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 166, 176, &__info37 }; static oop SmallInteger__bitOr_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anInteger) { _enter(&__info39); oop _1= 0; oop _2= 0; oop _3= 0; _line(166); { # define self ((struct t_SmallInteger *)v_self) if (((long)v_anInteger & 1) && ((long)v_self > 0) && ((long)v_anInteger > 0)) return (oop)(((long)v_self | (long)v_anInteger) | 1); # undef self } _1= 0; /* ifTrue: */ _1= 0; _2= v_self; _3= l_40; if (1 & (long)_2) { _2= (((long)_2 >= (long)_3) ? v_true : v_false); } else _2= _sendv(s__3e_3d, 2, _2, _3); if (!_2) goto _l19; { _1= v_anInteger; _2= v_self; if ((1 & (long)_1 & (long)_2) && (_1 > 0) && (_2 > 0)) { _1= (oop)((long)_1 | (long)_2); } else _1= _sendv(s_bitOr_, 2, _1, _2); _leave(); return _1; } _l19:; /* ifTrue:ifFalse: */ _1= v_anInteger; _2= l_40; if (1 & (long)_1) { _1= (((long)_1 < (long)_2) ? v_true : v_false); } else _1= _sendv(s__3c, 2, _1, _2); if (!_1) goto _l20; { _1= v_self; _line(172); _1=_sendv(s_bitInvert, 1, _1); _2= v_anInteger; _line(172); _2=_sendv(s_bitInvert, 1, _2); if ((1 & (long)_1 & (long)_2) && (_1 > 0) && (_2 > 0)) { _1= (oop)((long)_1 & (long)_2); } else _1= _sendv(s_bitAnd_, 2, _1, _2); _line(172); _1=_sendv(s_bitInvert, 1, _1); } goto _l21; _l20:; { _1= v_self; _line(173); _1=_sendv(s_bitInvert, 1, _1); _2= v_anInteger; _line(173); _1=_sendv(s_bitClear_, 2, _1, _2); _line(173); _1=_sendv(s_bitInvert, 1, _1); } _l21:; _leave(); return _1; _leave(); } static struct __methodinfo __info41= { "bitXor:", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 176, 186, &__info39 }; static oop SmallInteger__bitXor_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anInteger) { _enter(&__info41); oop _1= 0; oop _2= 0; oop _3= 0; _line(176); { # define self ((struct t_SmallInteger *)v_self) if (((long)v_anInteger & 1) && ((long)v_self > 0) && ((long)v_anInteger > 0)) return (oop)(((long)v_self ^ (long)v_anInteger) | 1); # undef self } _1= 0; /* ifTrue: */ _1= 0; _2= v_self; _3= l_42; if (1 & (long)_2) { _2= (((long)_2 >= (long)_3) ? v_true : v_false); } else _2= _sendv(s__3e_3d, 2, _2, _3); if (!_2) goto _l22; { _1= v_anInteger; _2= v_self; if ((1 & (long)_1 & (long)_2) && (_1 > 0) && (_2 > 0)) { _1= (oop)(((long)_1 ^ (long)_2) | 1); } else _1= _sendv(s_bitXor_, 2, _1, _2); _leave(); return _1; } _l22:; /* ifTrue:ifFalse: */ _1= v_anInteger; _2= l_42; if (1 & (long)_1) { _1= (((long)_1 < (long)_2) ? v_true : v_false); } else _1= _sendv(s__3c, 2, _1, _2); if (!_1) goto _l23; { _1= v_self; _line(182); _1=_sendv(s_bitInvert, 1, _1); _2= v_anInteger; _line(182); _2=_sendv(s_bitInvert, 1, _2); if ((1 & (long)_1 & (long)_2) && (_1 > 0) && (_2 > 0)) { _1= (oop)(((long)_1 ^ (long)_2) | 1); } else _1= _sendv(s_bitXor_, 2, _1, _2); } goto _l24; _l23:; { _1= v_self; _line(183); _1=_sendv(s_bitInvert, 1, _1); _2= v_anInteger; _line(183); _1=_sendv(s_bitClear_, 2, _1, _2); _line(183); _1=_sendv(s_bitInvert, 1, _1); } _l24:; _leave(); return _1; _leave(); } static struct __methodinfo __info43= { "bitShift:", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 186, 204, &__info41 }; static oop SmallInteger__bitShift_(oop v__closure, oop v_stateful_self, oop v_self, oop v_displacement) { _enter(&__info43); oop _1= 0; oop _2= 0; oop _3= 0; _line(186); /* ifFalse: */ _1= 0; _2= v_displacement; _line(188); _2=_sendv(s_isSmallInteger, 1, _2); if (_2) goto _l25; { _1= v_self; _2= l_44; _line(188); _1=_sendv(s_error_, 2, _1, _2); _leave(); return _1; } _l25:; { # define self ((struct t_SmallInteger *)v_self) int l= (long)v_self >> 1, r= (long)v_displacement >> 1; if (r >= 0) { if (r <= 31) { int s= l << r; if ((l == (s >> r)) && ((s ^ (s << 1)) >= 0)) return (oop)(long)(s << 1 | 1); } } else if (r >= -31) { int s= l >> r; return (oop)(long)(s << 1 | 1); } # undef self } _1= 0; /* ifTrue: */ _1= 0; _2= v_self; _3= l_45; if (1 & (long)_2) { _2= (((long)_2 >= (long)_3) ? v_true : v_false); } else _2= _sendv(s__3e_3d, 2, _2, _3); if (!_2) goto _l26; { _1= v_self; _2= v_displacement; _line(200); _1=_superv(v_Integer, s_bitShift_, 2, _1, _2); _leave(); return _1; } _l26:; _1= v_self; _line(201); _1=_sendv(s_negated, 1, _1); _2= v_displacement; { int _l= (long)_1 >> 1, _r= (long)_2 >> 1, _s= ((_r < 0) ? (_l >> -_r) : (_l << _r)); if ((1 & (long)_1 & (long)_2) && ( ( (_r >= 0) && (_r <= 31) && (_l == (_s >> _r)) && ((_s ^ (_s << 1)) >= 0) ) || ((_r < 0) && (_r >= -31)) )) _1= (oop)(long)(_s << 1 | 1); else _1= _sendv(s_bitShift_, 2, _1, _2); } _line(201); _1=_sendv(s_negated, 1, _1); _leave(); return _1; _leave(); } static struct __methodinfo __info46= { "<<", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 204, 214, &__info43 }; static oop SmallInteger___3c_3c(oop v__closure, oop v_stateful_self, oop v_self, oop v_displacement) { _enter(&__info46); oop _1= 0; oop _2= 0; _line(204); { # define self ((struct t_SmallInteger *)v_self) if ((long)v_self & (long)v_displacement & 1) { int l= (long)v_self >> 1, r= (long)v_displacement >> 1, s= (l << r); if ((r >= 0) && (r <= 31) && ((s ^ (s << 1)) >= 0) && ((s >> r) == l)) return (oop)(long)(s << 1 | 1); } # undef self } _1= 0; _1= v_self; _2= v_displacement; _line(211); _1=_superv(v_Integer, s__3c_3c, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info47= { ">>", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 214, 224, &__info46 }; static oop SmallInteger___3e_3e(oop v__closure, oop v_stateful_self, oop v_self, oop v_displacement) { _enter(&__info47); oop _1= 0; oop _2= 0; _line(214); { # define self ((struct t_SmallInteger *)v_self) if ((long)v_self & (long)v_displacement & 1) { int l= (long)v_self >> 1, r= (long)v_displacement >> 1, s= (l >> r); if ((r >= 0) && (r <= 31)) return (oop)(long)(s << 1 | 1); } # undef self } _1= 0; _1= v_self; _2= v_displacement; _line(221); _1=_superv(v_Integer, s__3e_3e, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info48= { "<", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 224, 230, &__info47 }; static oop SmallInteger___3c(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNumber) { _enter(&__info48); oop _1= 0; oop _2= 0; _line(224); { # define self ((struct t_SmallInteger *)v_self) if ((long)v_aNumber & 1) return ((long)v_self < (long)v_aNumber) ? v_true : v_false; # undef self } _1= 0; _1= v_self; _2= v_aNumber; _line(227); _1=_superv(v_Integer, s__3c, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info49= { "<=", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 230, 236, &__info48 }; static oop SmallInteger___3c_3d(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNumber) { _enter(&__info49); oop _1= 0; oop _2= 0; _line(230); { # define self ((struct t_SmallInteger *)v_self) if ((long)v_aNumber & 1) return ((long)v_self <= (long)v_aNumber) ? v_true : v_false; # undef self } _1= 0; _1= v_self; _2= v_aNumber; _line(233); _1=_superv(v_Integer, s__3c_3d, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info50= { "=", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 236, 242, &__info49 }; static oop SmallInteger___3d(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNumber) { _enter(&__info50); oop _1= 0; oop _2= 0; _line(236); { # define self ((struct t_SmallInteger *)v_self) if ((long)v_aNumber & 1) return ((long)v_self == (long)v_aNumber) ? v_true : v_false; # undef self } _1= 0; _1= v_self; _2= v_aNumber; _line(239); _1=_superv(v_Integer, s__3d, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info51= { "~=", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 242, 248, &__info50 }; static oop SmallInteger___7e_3d(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNumber) { _enter(&__info51); oop _1= 0; oop _2= 0; _line(242); { # define self ((struct t_SmallInteger *)v_self) if ((long)v_aNumber & 1) return ((long)v_self != (long)v_aNumber) ? v_true : v_false; # undef self } _1= 0; _1= v_self; _2= v_aNumber; _line(245); _1=_superv(v_Integer, s__7e_3d, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info52= { ">=", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 248, 254, &__info51 }; static oop SmallInteger___3e_3d(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNumber) { _enter(&__info52); oop _1= 0; oop _2= 0; _line(248); { # define self ((struct t_SmallInteger *)v_self) if ((long)v_aNumber & 1) return ((long)v_self >= (long)v_aNumber) ? v_true : v_false; # undef self } _1= 0; _1= v_self; _2= v_aNumber; _line(251); _1=_superv(v_Integer, s__3e_3d, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info53= { ">", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 254, 260, &__info52 }; static oop SmallInteger___3e(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNumber) { _enter(&__info53); oop _1= 0; oop _2= 0; _line(254); { # define self ((struct t_SmallInteger *)v_self) if ((long)v_aNumber & 1) return ((long)v_self > (long)v_aNumber) ? v_true : v_false; # undef self } _1= 0; _1= v_self; _2= v_aNumber; _line(257); _1=_superv(v_Integer, s__3e, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info54= { "highBitOfMagnitude", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 260, 265, &__info53 }; static oop SmallInteger__highBitOfMagnitude(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info54); oop _1= 0; _line(260); _1= v_self; _line(262); _1=_sendv(s_abs, 1, _1); _line(262); _1=_sendv(s_highBitOfPositiveReceiver, 1, _1); _leave(); return _1; _leave(); } static struct __methodinfo __info55= { "highBitOfPositiveReceiver", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 265, 281, &__info54 }; static oop SmallInteger__highBitOfPositiveReceiver(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info55); oop v_shifted= 0; oop v_bitNo= 0; oop _1= 0; oop _2= 0; (void)v_shifted; (void)v_bitNo; _line(265); _1= v_self; v_shifted= _1; _1= l_56; v_bitNo= _1; /* whileFalse: */ goto _l28; _l27:; { _1= v_shifted; _2= l_58; { int _l= (long)_1 >> 1, _r= (long)_2 >> 1, _s= (_l >> _r); if ((1 & (long)_1) && (_r >= 0) && (_r <= 31)) _1= (oop)(long)(_s << 1 | 1); else _1= _sendv(s__3e_3e, 2, _1, _2); } v_shifted= _1; _1= v_bitNo; _2= l_58; { int _l= (long)_1 >> 1; int _r= (long)_2 >> 1; int _s= _l + _r; if ((1 & (long)_1) && ((_s ^ (_s << 1)) >= 0)) _1= (oop)(long)(_s << 1 | 1); else _1= _sendv(s__2b, 2, _1, _2); } v_bitNo= _1; } _l28:; { _1= v_shifted; _2= l_57; if (1 & (long)_1) { _1= (((long)_1 < (long)_2) ? v_true : v_false); } else _1= _sendv(s__3c, 2, _1, _2); } if (!_1) goto _l27; _1= 0; /* whileFalse: */ goto _l30; _l29:; { _1= v_shifted; _2= l_59; { int _l= (long)_1 >> 1, _r= (long)_2 >> 1, _s= (_l >> _r); if ((1 & (long)_1) && (_r >= 0) && (_r <= 31)) _1= (oop)(long)(_s << 1 | 1); else _1= _sendv(s__3e_3e, 2, _1, _2); } v_shifted= _1; _1= v_bitNo; _2= l_59; { int _l= (long)_1 >> 1; int _r= (long)_2 >> 1; int _s= _l + _r; if ((1 & (long)_1) && ((_s ^ (_s << 1)) >= 0)) _1= (oop)(long)(_s << 1 | 1); else _1= _sendv(s__2b, 2, _1, _2); } v_bitNo= _1; } _l30:; { _1= v_shifted; _2= l_56; if (1 & (long)_1) { _1= (((long)_1 == (long)_2) ? v_true : v_false); } else _1= _sendv(s__3d, 2, _1, _2); } if (!_1) goto _l29; _1= 0; _1= v_bitNo; _leave(); return _1; _leave(); } static struct __methodinfo __info60= { "gcd:", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 281, 293, &__info55 }; static oop SmallInteger__gcd_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anInteger) { _enter(&__info60); oop v_n= 0; oop v_m= 0; oop _1= 0; oop _2= 0; (void)v_n; (void)v_m; _line(281); _1= v_self; v_n= _1; _1= v_anInteger; v_m= _1; /* whileFalse: */ goto _l32; _l31:; { _1= v_m; _2= v_n; v_m= _2; _1= _sendv(s__5c_5c, 2, _1, _2); v_n= _1; } _l32:; { _1= v_n; _2= l_61; if (1 & (long)_1) { _1= (((long)_1 == (long)_2) ? v_true : v_false); } else _1= _sendv(s__3d, 2, _1, _2); } if (!_1) goto _l31; _1= 0; _1= v_m; _line(287); _1=_sendv(s_abs, 1, _1); _leave(); return _1; _leave(); } static struct __methodinfo __info62= { "to:do:", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 293, 303, &__info60 }; static oop SmallInteger__to_do_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anInteger, oop v_unaryBlock) { _enter(&__info62); oop v_index= 0; oop _1= 0; oop _2= 0; (void)v_index; _line(293); _1= v_self; v_index= _1; /* whileTrue: */ goto _l34; _l33:; { _1= v_unaryBlock; _2= v_index; _line(299); _1=_sendv(s_value_, 2, _1, _2); _1= v_index; _2= l_63; { int _l= (long)_1 >> 1; int _r= (long)_2 >> 1; int _s= _l + _r; if ((1 & (long)_1) && ((_s ^ (_s << 1)) >= 0)) _1= (oop)(long)(_s << 1 | 1); else _1= _sendv(s__2b, 2, _1, _2); } v_index= _1; } _l34:; { _1= v_index; _2= v_anInteger; if (1 & (long)_1 & (long)_2) { _1= (((long)_1 <= (long)_2) ? v_true : v_false); } else _1= _sendv(s__3c_3d, 2, _1, _2); } if (_1) goto _l33; _1= 0; _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info64= { "downTo:do:", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 303, 313, &__info62 }; static oop SmallInteger__downTo_do_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anInteger, oop v_unaryBlock) { _enter(&__info64); oop v_index= 0; oop _1= 0; oop _2= 0; (void)v_index; _line(303); _1= v_self; v_index= _1; /* whileTrue: */ goto _l36; _l35:; { _1= v_unaryBlock; _2= v_index; _line(309); _1=_sendv(s_value_, 2, _1, _2); _1= v_index; _2= l_65; { int _l= (long)_1 >> 1; int _r= (long)_2 >> 1; int _s= (_l - _r); if ((1 & (long)_1) && ((_s ^ (_s << 1)) >= 0)) _1= (oop)(long)(_s << 1 | 1); else _1= _sendv(s__2d, 2, _1, _2); } v_index= _1; } _l36:; { _1= v_index; _2= v_anInteger; if (1 & (long)_1 & (long)_2) { _1= (((long)_1 >= (long)_2) ? v_true : v_false); } else _1= _sendv(s__3e_3d, 2, _1, _2); } if (_1) goto _l35; _1= 0; _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info66= { "to:by:do:", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 313, 320, &__info64 }; static oop SmallInteger__to_by_do_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anInteger, oop v_stepInteger, oop v_unaryBlock) { _enter(&__info66); oop _1= 0; oop _2= 0; oop _3= 0; oop _4= 0; _line(313); /* ifTrue:ifFalse: */ _1= v_stepInteger; _2= l_67; if (1 & (long)_1) { _1= (((long)_1 < (long)_2) ? v_true : v_false); } else _1= _sendv(s__3c, 2, _1, _2); if (!_1) goto _l37; { _1= v_self; _2= v_anInteger; _3= v_stepInteger; _4= v_unaryBlock; _line(316); _1=_sendv(s_downTo_by_do_, 4, _1, _2, _3, _4); } goto _l38; _l37:; { _1= v_self; _2= v_anInteger; _3= v_stepInteger; _4= v_unaryBlock; _line(317); _1=_sendv(s_upTo_by_do_, 4, _1, _2, _3, _4); } _l38:; _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info68= { "upTo:by:do:", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 320, 330, &__info66 }; static oop SmallInteger__upTo_by_do_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anInteger, oop v_stepInteger, oop v_unaryBlock) { _enter(&__info68); oop v_index= 0; oop _1= 0; oop _2= 0; (void)v_index; _line(320); _1= v_self; v_index= _1; /* whileTrue: */ goto _l40; _l39:; { _1= v_unaryBlock; _2= v_index; _line(326); _1=_sendv(s_value_, 2, _1, _2); _1= v_index; _2= v_stepInteger; { int _l= (long)_1 >> 1; int _r= (long)_2 >> 1; int _s= _l + _r; if ((1 & (long)_1 & (long)_2) && ((_s ^ (_s << 1)) >= 0)) _1= (oop)(long)(_s << 1 | 1); else _1= _sendv(s__2b, 2, _1, _2); } v_index= _1; } _l40:; { _1= v_index; _2= v_anInteger; if (1 & (long)_1 & (long)_2) { _1= (((long)_1 <= (long)_2) ? v_true : v_false); } else _1= _sendv(s__3c_3d, 2, _1, _2); } if (_1) goto _l39; _1= 0; _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info69= { "downTo:by:do:", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 330, 340, &__info68 }; static oop SmallInteger__downTo_by_do_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anInteger, oop v_stepInteger, oop v_unaryBlock) { _enter(&__info69); oop v_index= 0; oop _1= 0; oop _2= 0; (void)v_index; _line(330); _1= v_self; v_index= _1; /* whileTrue: */ goto _l42; _l41:; { _1= v_unaryBlock; _2= v_index; _line(336); _1=_sendv(s_value_, 2, _1, _2); _1= v_index; _2= v_stepInteger; { int _l= (long)_1 >> 1; int _r= (long)_2 >> 1; int _s= _l + _r; if ((1 & (long)_1 & (long)_2) && ((_s ^ (_s << 1)) >= 0)) _1= (oop)(long)(_s << 1 | 1); else _1= _sendv(s__2b, 2, _1, _2); } v_index= _1; } _l42:; { _1= v_index; _2= v_anInteger; if (1 & (long)_1 & (long)_2) { _1= (((long)_1 >= (long)_2) ? v_true : v_false); } else _1= _sendv(s__3e_3d, 2, _1, _2); } if (_1) goto _l41; _1= 0; _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info70= { "timesRepeat:", "SmallInteger", "/Users/piumarta/src/idst/object/st80/SmallInteger.st", 0, 340, 346, &__info69 }; static oop SmallInteger__timesRepeat_(oop v__closure, oop v_stateful_self, oop v_self, oop v_aBlock) { _enter(&__info70); oop v_count= 0; oop _1= 0; oop _2= 0; (void)v_count; _line(340); _1= v_self; v_count= _1; /* whileFalse: */ goto _l44; _l43:; { _1= v_aBlock; _line(344); _1=_sendv(s_value, 1, _1); } _l44:; { _1= v_count; _2= l_71; { int _l= (long)_1 >> 1; int _r= (long)_2 >> 1; int _s= (_l - _r); if ((1 & (long)_1) && ((_s ^ (_s << 1)) >= 0)) _1= (oop)(long)(_s << 1 | 1); else _1= _sendv(s__2d, 2, _1, _2); } v_count= _1; _2= l_72; if (1 & (long)_1) { _1= (((long)_1 < (long)_2) ? v_true : v_false); } else _1= _sendv(s__3c, 2, _1, _2); } if (!_1) goto _l43; _1= 0; _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info= { "__id__init__", "", "SmallInteger.st", 0, 0, 0, &__info70 }; void __id__init__SmallInteger(struct __libid *__libid) { if (_libid) return; if (!(_libid= __libid)) { fprintf(stderr, "init _libid %p\n", __libid); abort(); } # define GC_add_roots _libid->gc_addRoots GC_INIT(); { struct _Selector *s= 0; for (s= _Selectors; s->name; ++s) *s->addr= _libid->intern(s->name); } _enter(&__info); _libid->infos(&__info, &__info1); _sendv(s__5fimport_, 3, _libid->_object, "Integer", "__id__init__Integer"); v__object= _libid->import("_object"); v_Object= _libid->import("Object"); v_UndefinedObject= _libid->import("UndefinedObject"); v_StaticBlockClosure= _libid->import("StaticBlockClosure"); v_Magnitude= _libid->import("Magnitude"); v_Number= _libid->import("Number"); v_Fraction= _libid->import("Fraction"); v_Integer= _libid->import("Integer"); v_SmallInteger= _libid->import("SmallInteger"); v_LargePositiveInteger= _libid->import("LargePositiveInteger"); v_Collection= _libid->import("Collection"); v_SequenceableCollection= _libid->import("SequenceableCollection"); v_ArrayedCollection= _libid->import("ArrayedCollection"); v_Array= _libid->import("Array"); v_WordArray= _libid->import("WordArray"); v_ByteArray= _libid->import("ByteArray"); v_ImmutableByteArray= _libid->import("ImmutableByteArray"); v_String= _libid->import("String"); v_ImmutableString= _libid->import("ImmutableString"); v_true= _libid->import("true"); v_false= _libid->import("false"); { oop _1= 0; _1= v_SmallInteger; _line(25); _1=_sendv(s__5fbeTagType, 1, _1); } _libid->method(v_SmallInteger, s_isSmallInteger, (_imp_t)SmallInteger__isSmallInteger); _libid->method(v_Object, s_isSmallInteger, (_imp_t)Object__isSmallInteger); l_4= _sendv(s_value_5f_, 2, v_SmallInteger, 16777215); _libid->method(v_SmallInteger, s_hash, (_imp_t)SmallInteger__hash); l_6= _sendv(s_value_5f_, 2, v_SmallInteger, 16777215); _libid->method(v_SmallInteger, s_identityHash, (_imp_t)SmallInteger__identityHash); _libid->method(v_SmallInteger, s_maxVal, (_imp_t)SmallInteger__maxVal); _libid->method(v_SmallInteger, s_minVal, (_imp_t)SmallInteger__minVal); l_10= _sendv(s_value_5f_, 2, v_SmallInteger, 256); l_11= _sendv(s_value_5f_, 2, v_SmallInteger, -256); l_12= _sendv(s_value_5f_, 2, v_SmallInteger, 1); l_13= _sendv(s_value_5f_, 2, v_SmallInteger, 65536); l_14= _sendv(s_value_5f_, 2, v_SmallInteger, -65536); l_15= _sendv(s_value_5f_, 2, v_SmallInteger, 2); l_16= _sendv(s_value_5f_, 2, v_SmallInteger, 16777216); l_17= _sendv(s_value_5f_, 2, v_SmallInteger, -16777216); l_18= _sendv(s_value_5f_, 2, v_SmallInteger, 3); l_19= _sendv(s_value_5f_, 2, v_SmallInteger, 4); _libid->method(v_SmallInteger, s_digitLength, (_imp_t)SmallInteger__digitLength); l_21= _sendv(s_value_5f_, 2, v_SmallInteger, 4); l_22= _sendv(s_value_5f_, 2, v_SmallInteger, 0); l_23= _sendv(s_size_5f_value_5f_, 3, v_ImmutableByteArray, 4, "\000\000\000\100"); l_24= _sendv(s_value_5f_, 2, v_SmallInteger, 1); l_25= _sendv(s_value_5f_, 2, v_SmallInteger, 8); l_26= _sendv(s_value_5f_, 2, v_SmallInteger, 255); _libid->method(v_SmallInteger, s_digitAt_, (_imp_t)SmallInteger__digitAt_); _libid->method(v_SmallInteger, s__2b, (_imp_t)SmallInteger___2b); _libid->method(v_SmallInteger, s__2d, (_imp_t)SmallInteger___2d); _libid->method(v_SmallInteger, s__2a, (_imp_t)SmallInteger___2a); l_31= _sendv(s_value_5f_, 2, v_SmallInteger, 0); _libid->method(v_SmallInteger, s__2f, (_imp_t)SmallInteger___2f); _libid->method(v_SmallInteger, s__2f_2f, (_imp_t)SmallInteger___2f_2f); _libid->method(v_SmallInteger, s__5c_5c, (_imp_t)SmallInteger___5c_5c); l_35= _sendv(s_value_5f_, 2, v_SmallInteger, 0); l_36= _sendv(s_value_5f_, 2, v_SmallInteger, -1); _libid->method(v_SmallInteger, s_quo_, (_imp_t)SmallInteger__quo_); l_38= _sendv(s_value_5f_, 2, v_SmallInteger, 0); _libid->method(v_SmallInteger, s_bitAnd_, (_imp_t)SmallInteger__bitAnd_); l_40= _sendv(s_value_5f_, 2, v_SmallInteger, 0); _libid->method(v_SmallInteger, s_bitOr_, (_imp_t)SmallInteger__bitOr_); l_42= _sendv(s_value_5f_, 2, v_SmallInteger, 0); _libid->method(v_SmallInteger, s_bitXor_, (_imp_t)SmallInteger__bitXor_); l_44= _sendv(s_size_5f_value_5f_, 3, v_ImmutableString, 24, "non-Integer displacement"); l_45= _sendv(s_value_5f_, 2, v_SmallInteger, 0); _libid->method(v_SmallInteger, s_bitShift_, (_imp_t)SmallInteger__bitShift_); _libid->method(v_SmallInteger, s__3c_3c, (_imp_t)SmallInteger___3c_3c); _libid->method(v_SmallInteger, s__3e_3e, (_imp_t)SmallInteger___3e_3e); _libid->method(v_SmallInteger, s__3c, (_imp_t)SmallInteger___3c); _libid->method(v_SmallInteger, s__3c_3d, (_imp_t)SmallInteger___3c_3d); _libid->method(v_SmallInteger, s__3d, (_imp_t)SmallInteger___3d); _libid->method(v_SmallInteger, s__7e_3d, (_imp_t)SmallInteger___7e_3d); _libid->method(v_SmallInteger, s__3e_3d, (_imp_t)SmallInteger___3e_3d); _libid->method(v_SmallInteger, s__3e, (_imp_t)SmallInteger___3e); _libid->method(v_SmallInteger, s_highBitOfMagnitude, (_imp_t)SmallInteger__highBitOfMagnitude); l_56= _sendv(s_value_5f_, 2, v_SmallInteger, 0); l_57= _sendv(s_value_5f_, 2, v_SmallInteger, 16); l_58= _sendv(s_value_5f_, 2, v_SmallInteger, 4); l_59= _sendv(s_value_5f_, 2, v_SmallInteger, 1); _libid->method(v_SmallInteger, s_highBitOfPositiveReceiver, (_imp_t)SmallInteger__highBitOfPositiveReceiver); l_61= _sendv(s_value_5f_, 2, v_SmallInteger, 0); _libid->method(v_SmallInteger, s_gcd_, (_imp_t)SmallInteger__gcd_); l_63= _sendv(s_value_5f_, 2, v_SmallInteger, 1); _libid->method(v_SmallInteger, s_to_do_, (_imp_t)SmallInteger__to_do_); l_65= _sendv(s_value_5f_, 2, v_SmallInteger, 1); _libid->method(v_SmallInteger, s_downTo_do_, (_imp_t)SmallInteger__downTo_do_); l_67= _sendv(s_value_5f_, 2, v_SmallInteger, 0); _libid->method(v_SmallInteger, s_to_by_do_, (_imp_t)SmallInteger__to_by_do_); _libid->method(v_SmallInteger, s_upTo_by_do_, (_imp_t)SmallInteger__upTo_by_do_); _libid->method(v_SmallInteger, s_downTo_by_do_, (_imp_t)SmallInteger__downTo_by_do_); l_71= _sendv(s_value_5f_, 2, v_SmallInteger, 1); l_72= _sendv(s_value_5f_, 2, v_SmallInteger, 0); _libid->method(v_SmallInteger, s_timesRepeat_, (_imp_t)SmallInteger__timesRepeat_); _leave(); }