/* generated by Id 1.1 at ,$ */ /* with the command: -I../stage1/ -c OrderedCollection.st -o ../stage2/OrderedCollection.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_shiftToEnd= 0; static oop s_yourself= 0; static oop s_size= 0; static oop s_resetToBeginning= 0; static oop s_initialize_= 0; static oop s__5fdebugName= 0; static oop s_setCollection_= 0; static oop s_new= 0; static oop s_ifTrue_ifFalse_= 0; static oop s_errorNoSuchElement= 0; static oop s_makeRoomAtFirst= 0; static oop s_makeRoomAtLast= 0; static oop s_removeFirst= 0; static oop s_copyFrom_to_= 0; static oop s_function_5f_arity_5f_outer_state_nlr_5f_= 0; static oop s_doWithIndex_= 0; static oop s_value_value_= 0; static oop s__2a= 0; static oop s_growSize= 0; static oop s_replaceFrom_to_with_startingAt_= 0; static oop s_shiftToBeginning= 0; static oop s_resetToBegining= 0; static oop s__5fsizeof= 0; static oop s_max_= 0; static oop s_new_= 0; static oop s_new_5f_= 0; static oop s_resetToEnd= 0; static oop s_addFirst_= 0; static oop s_value_5f_= 0; static oop s_species= 0; static oop s__5fimport_= 0; static oop s_do_= 0; static oop s__5fslots= 0; static oop s__2d= 0; static oop s__2b= 0; static oop s__2f_2f= 0; static oop s_ifTrue_= 0; static oop s_emptyCheck= 0; static oop s_to_do_= 0; static oop s_downTo_do_= 0; static oop s__3d_3d= 0; static oop s_removeLast= 0; static oop s_reset= 0; static oop s_add_= 0; static oop s__3d= 0; static oop s__3c= 0; static oop s_and_= 0; static oop s__3e= 0; static oop s_addLast_= 0; static oop s_or_= 0; static oop s_value_= 0; static oop s_at_= 0; static oop s_at_put_= 0; static struct _Selector { const char *name; oop *addr; } _Selectors[]= { { "shiftToEnd", &s_shiftToEnd }, { "yourself", &s_yourself }, { "size", &s_size }, { "resetToBeginning", &s_resetToBeginning }, { "initialize:", &s_initialize_ }, { "_debugName", &s__5fdebugName }, { "setCollection:", &s_setCollection_ }, { "new", &s_new }, { "ifTrue:ifFalse:", &s_ifTrue_ifFalse_ }, { "errorNoSuchElement", &s_errorNoSuchElement }, { "makeRoomAtFirst", &s_makeRoomAtFirst }, { "makeRoomAtLast", &s_makeRoomAtLast }, { "removeFirst", &s_removeFirst }, { "copyFrom:to:", &s_copyFrom_to_ }, { "function_:arity_:outer:state:nlr_:", &s_function_5f_arity_5f_outer_state_nlr_5f_ }, { "doWithIndex:", &s_doWithIndex_ }, { "value:value:", &s_value_value_ }, { "*", &s__2a }, { "growSize", &s_growSize }, { "replaceFrom:to:with:startingAt:", &s_replaceFrom_to_with_startingAt_ }, { "shiftToBeginning", &s_shiftToBeginning }, { "resetToBegining", &s_resetToBegining }, { "_sizeof", &s__5fsizeof }, { "max:", &s_max_ }, { "new:", &s_new_ }, { "new_:", &s_new_5f_ }, { "resetToEnd", &s_resetToEnd }, { "addFirst:", &s_addFirst_ }, { "value_:", &s_value_5f_ }, { "species", &s_species }, { "_import:", &s__5fimport_ }, { "do:", &s_do_ }, { "_slots", &s__5fslots }, { "-", &s__2d }, { "+", &s__2b }, { "//", &s__2f_2f }, { "ifTrue:", &s_ifTrue_ }, { "emptyCheck", &s_emptyCheck }, { "to:do:", &s_to_do_ }, { "downTo:do:", &s_downTo_do_ }, { "==", &s__3d_3d }, { "removeLast", &s_removeLast }, { "reset", &s_reset }, { "add:", &s_add_ }, { "=", &s__3d }, { "<", &s__3c }, { "and:", &s_and_ }, { ">", &s__3e }, { "addLast:", &s_addLast_ }, { "or:", &s_or_ }, { "value:", &s_value_ }, { "at:", &s_at_ }, { "at:put:", &s_at_put_ }, { 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; }; struct t_OrderedCollection { struct _vtable *_vtable[0]; oop v_array; oop v_firstIndex; oop v_lastIndex; }; static oop l_3= 0; static oop l_8= 0; static oop l_10= 0; static oop l_11= 0; static oop l_13= 0; static oop l_15= 0; static oop l_18= 0; static oop l_20= 0; static oop l_22= 0; static oop l_24= 0; static oop l_26= 0; static oop l_27= 0; static oop l_30= 0; static oop l_33= 0; static oop l_35= 0; static oop l_37= 0; static oop l_38= 0; static oop l_40= 0; static oop l_41= 0; static oop l_43= 0; static oop l_49= 0; static oop l_51= 0; static oop v__object= 0; static oop v__vector= 0; static oop v_Object= 0; static oop v_UndefinedObject= 0; static oop v_StaticBlockClosure= 0; static oop v_BlockClosure= 0; static oop v_Magnitude= 0; static oop v_Number= 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_String= 0; static oop v_ImmutableString= 0; static oop v_nil= 0; static oop v_true= 0; static oop v_false= 0; static oop v_OrderedCollection= 0; static size_t OrderedCollection___5fsizeof(oop _closure, oop v_self) { return sizeof(struct t_OrderedCollection); } static char *OrderedCollection___5fdebugName(oop _closure, oop v_self) { return "OrderedCollection"; } static struct __slotinfo *OrderedCollection___5fslots(oop _closure, oop v_self) { static struct __slotinfo info[]= { { "array", 0, 4 }, { "firstIndex", 4, 4 }, { "lastIndex", 8, 4 }, { 0, 0, 0 } }; return &info[0]; } static struct __methodinfo __info1= { "species", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 25, 27, 0 }; static oop OrderedCollection__species(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info1); oop _1= 0; _line(25); _1= v_OrderedCollection; _leave(); return _1; _leave(); } static struct __methodinfo __info2= { "new", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 27, 28, &__info1 }; static oop OrderedCollection__new(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info2); oop _1= 0; oop _2= 0; _line(27); _1= v_self; _2= l_3; _line(27); _1=_sendv(s_new_, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info4= { "new:", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 28, 30, &__info2 }; static oop OrderedCollection__new_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anInteger) { _enter(&__info4); oop _1= 0; oop _2= 0; _line(28); _1= v_self; _line(28); _1=_superv(v_SequenceableCollection, s_new, 1, _1); _2= v_anInteger; _line(28); _1=_sendv(s_initialize_, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info5= { "initialize:", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 30, 32, &__info4 }; static oop OrderedCollection__initialize_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anInteger) { _enter(&__info5); oop _1= 0; oop _2= 0; oop _3= 0; _line(30); _1= v_self; _2= v_Array; _3= v_anInteger; _line(30); _2=_sendv(s_new_, 2, _2, _3); _line(30); _1=_sendv(s_setCollection_, 2, _1, _2); _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info6= { "setCollection:", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 32, 38, &__info5 }; static oop OrderedCollection__setCollection_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anArray) { _enter(&__info6); oop _1= 0; _line(32); _1= v_anArray; ((struct t_OrderedCollection *)v_stateful_self)->v_array= _1; _1= v_self; _line(35); _1=_sendv(s_reset, 1, _1); _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info7= { "size", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 38, 40, &__info6 }; static oop OrderedCollection__size(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info7); oop _1= 0; oop _2= 0; _line(38); _1= ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex; _2= ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex; { 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__2d, 2, _1, _2); } _2= l_8; { 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); } _leave(); return _1; _leave(); } static struct __methodinfo __info9= { "reset", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 40, 42, &__info7 }; static oop OrderedCollection__reset(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info9); oop _1= 0; oop _2= 0; _line(40); _1= ((struct t_OrderedCollection *)v_stateful_self)->v_array; _line(40); _1=_sendv(s_size, 1, _1); _2= l_10; _1= _sendv(s__2f_2f, 2, _1, _2); _2= l_11; _line(40); _1=_sendv(s_max_, 2, _1, _2); ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex= _1; _2= l_11; { 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); } ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex= _1; _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info12= { "at:", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 42, 49, &__info9 }; static oop OrderedCollection__at_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anInteger) { _enter(&__info12); oop v_position= 0; oop _1= 0; oop _2= 0; (void)v_position; _line(42); _1= ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex; _2= v_anInteger; { 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); } _2= l_13; { 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_position= _1; /* ifTrue:ifFalse: */ /* or: */ _1= v_anInteger; _2= l_13; if (1 & (long)_1) { _1= (((long)_1 < (long)_2) ? v_true : v_false); } else _1= _sendv(s__3c, 2, _1, _2); if (_1) goto _l3; { _1= v_position; _2= ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex; if (1 & (long)_1 & (long)_2) { _1= (((long)_1 > (long)_2) ? v_true : v_false); } else _1= _sendv(s__3e, 2, _1, _2); } _l3:; if (!_1) goto _l1; { _1= v_self; _line(46); _1=_sendv(s_errorNoSuchElement, 1, _1); } goto _l2; _l1:; { _1= ((struct t_OrderedCollection *)v_stateful_self)->v_array; _2= v_position; _line(46); _1=_sendv(s_at_, 2, _1, _2); } _l2:; _leave(); return _1; _leave(); } static struct __methodinfo __info14= { "at:put:", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 49, 63, &__info12 }; static oop OrderedCollection__at_put_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anInteger, oop v_anObject) { _enter(&__info14); oop v_position= 0; oop _1= 0; oop _2= 0; oop _3= 0; (void)v_position; _line(49); _1= ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex; _2= v_anInteger; { 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); } _2= l_15; { 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_position= _1; /* ifTrue:ifFalse: */ /* or: */ _1= v_anInteger; _2= l_15; if (1 & (long)_1) { _1= (((long)_1 < (long)_2) ? v_true : v_false); } else _1= _sendv(s__3c, 2, _1, _2); if (_1) goto _l6; { _1= v_position; _2= ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex; if (1 & (long)_1 & (long)_2) { _1= (((long)_1 > (long)_2) ? v_true : v_false); } else _1= _sendv(s__3e, 2, _1, _2); } _l6:; if (!_1) goto _l4; { _1= v_self; _line(60); _1=_sendv(s_errorNoSuchElement, 1, _1); } goto _l5; _l4:; { _1= ((struct t_OrderedCollection *)v_stateful_self)->v_array; _2= v_position; _3= v_anObject; _line(60); _1=_sendv(s_at_put_, 3, _1, _2, _3); } _l5:; _leave(); return _1; _leave(); } static struct __methodinfo __info16= { "add:", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 63, 65, &__info14 }; static oop OrderedCollection__add_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anObject) { _enter(&__info16); oop _1= 0; oop _2= 0; _line(63); _1= v_self; _2= v_anObject; _line(63); _1=_sendv(s_addLast_, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info17= { "addFirst:", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 65, 71, &__info16 }; static oop OrderedCollection__addFirst_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anObject) { _enter(&__info17); oop _1= 0; oop _2= 0; oop _3= 0; _line(65); /* ifTrue: */ _1= 0; _2= ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex; _3= l_18; if (1 & (long)_2) { _2= (((long)_2 == (long)_3) ? v_true : v_false); } else _2= _sendv(s__3d, 2, _2, _3); if (!_2) goto _l7; { _1= v_self; _line(67); _1=_sendv(s_makeRoomAtFirst, 1, _1); } _l7:; _1= ((struct t_OrderedCollection *)v_stateful_self)->v_array; _2= ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex; _3= l_18; { int _l= (long)_2 >> 1; int _r= (long)_3 >> 1; int _s= (_l - _r); if ((1 & (long)_2) && ((_s ^ (_s << 1)) >= 0)) _2= (oop)(long)(_s << 1 | 1); else _2= _sendv(s__2d, 2, _2, _3); } ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex= _2; _3= v_anObject; _line(68); _1=_sendv(s_at_put_, 3, _1, _2, _3); _leave(); return _1; _leave(); } static struct __methodinfo __info19= { "addLast:", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 71, 77, &__info17 }; static oop OrderedCollection__addLast_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anObject) { _enter(&__info19); oop _1= 0; oop _2= 0; oop _3= 0; _line(71); /* ifTrue: */ _1= 0; _2= ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex; _3= ((struct t_OrderedCollection *)v_stateful_self)->v_array; _line(73); _3=_sendv(s_size, 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 _l8; { _1= v_self; _line(73); _1=_sendv(s_makeRoomAtLast, 1, _1); } _l8:; _1= ((struct t_OrderedCollection *)v_stateful_self)->v_array; _2= ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex; _3= l_20; { int _l= (long)_2 >> 1; int _r= (long)_3 >> 1; int _s= _l + _r; if ((1 & (long)_2) && ((_s ^ (_s << 1)) >= 0)) _2= (oop)(long)(_s << 1 | 1); else _2= _sendv(s__2b, 2, _2, _3); } ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex= _2; _3= v_anObject; _line(74); _1=_sendv(s_at_put_, 3, _1, _2, _3); _leave(); return _1; _leave(); } static struct __methodinfo __info21= { "removeFirst", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 77, 87, &__info19 }; static oop OrderedCollection__removeFirst(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info21); oop v_first= 0; oop _1= 0; oop _2= 0; oop _3= 0; (void)v_first; _line(77); _1= v_self; _line(80); _1=_sendv(s_emptyCheck, 1, _1); _1= ((struct t_OrderedCollection *)v_stateful_self)->v_array; _2= ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex; _line(81); _1=_sendv(s_at_, 2, _1, _2); v_first= _1; _1= ((struct t_OrderedCollection *)v_stateful_self)->v_array; _2= ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex; _3= v_nil; _line(82); _1=_sendv(s_at_put_, 3, _1, _2, _3); _1= ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex; _2= l_22; { 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); } ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex= _1; _1= v_first; _leave(); return _1; _leave(); } static struct __methodinfo __info23= { "removeLast", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 87, 97, &__info21 }; static oop OrderedCollection__removeLast(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info23); oop v_last= 0; oop _1= 0; oop _2= 0; oop _3= 0; (void)v_last; _line(87); _1= v_self; _line(90); _1=_sendv(s_emptyCheck, 1, _1); _1= ((struct t_OrderedCollection *)v_stateful_self)->v_array; _2= ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex; _line(91); _1=_sendv(s_at_, 2, _1, _2); v_last= _1; _1= ((struct t_OrderedCollection *)v_stateful_self)->v_array; _2= ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex; _3= v_nil; _line(92); _1=_sendv(s_at_put_, 3, _1, _2, _3); _1= ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex; _2= l_24; { 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); } ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex= _1; _1= v_last; _leave(); return _1; _leave(); } static struct __methodinfo __info28= { "[] copyFrom:to:", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 97, 106, &__info23 }; static oop b_28(oop v__closure, oop v__self, oop v_index) { _enter(&__info28); oop _1= 0; oop _2= 0; oop _3= 0; _line(102); _1= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1]; /* copy */ _2= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[2]; /* self */ _3= v_index; _line(102); _2=_sendv(s_at_, 2, _2, _3); _line(102); _1=_sendv(s_addLast_, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info25= { "copyFrom:to:", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 97, 106, &__info28 }; static oop OrderedCollection__copyFrom_to_(oop v__closure, oop v_stateful_self, oop v_self, oop v_first, oop v_last) { _enter(&__info25); oop _state1= _sendv(s_new_5f_, 2, v__vector, 7); oop _1= 0; oop _2= 0; oop _3= 0; ((oop *)_state1)[3]= v_stateful_self; ((oop *)_state1)[2]= v_self; _line(97); /* ifTrue: */ _1= 0; _2= v_last; _3= v_first; if (1 & (long)_2 & (long)_3) { _2= (((long)_2 < (long)_3) ? v_true : v_false); } else _2= _sendv(s__3c, 2, _2, _3); if (!_2) goto _l9; { _1= ((oop *)_state1)[2]; /* self */ _line(100); _1=_sendv(s_species, 1, _1); _2= l_26; _line(100); _1=_sendv(s_new_, 2, _1, _2); _leave(); return _1; } _l9:; _1= ((oop *)_state1)[2]; /* self */ _line(101); _1=_sendv(s_species, 1, _1); _2= v_last; _3= l_27; { int _l= (long)_2 >> 1; int _r= (long)_3 >> 1; int _s= _l + _r; if ((1 & (long)_2) && ((_s ^ (_s << 1)) >= 0)) _2= (oop)(long)(_s << 1 | 1); else _2= _sendv(s__2b, 2, _2, _3); } _3= v_first; { int _l= (long)_2 >> 1; int _r= (long)_3 >> 1; int _s= (_l - _r); if ((1 & (long)_2 & (long)_3) && ((_s ^ (_s << 1)) >= 0)) _2= (oop)(long)(_s << 1 | 1); else _2= _sendv(s__2d, 2, _2, _3); } _line(101); _1=_sendv(s_new_, 2, _1, _2); ((oop *)_state1)[1]= _1; /* copy */ _1= v_first; _2= v_last; /* Scope('index'->ArgumentVariableNode) */ /* Scope('copy'->TemporaryVariableNode 'stateful_self'->ArgumentVariableNode 'array'->SlotVariableNode 'first'->ArgumentVariableNode 'self'->ArgumentVariableNode 'firstIndex'->SlotVariableNode 'lastIndex'->SlotVariableNode 'last'->ArgumentVariableNode) */ /* nil */ /* 2 */ /* 1 */ _3= _sendv(s_function_5f_arity_5f_outer_state_nlr_5f_, 6, v_BlockClosure, (oop)b_28, 1, 0, ((oop *)_state1), 0); _line(102); _1=_sendv(s_to_do_, 3, _1, _2, _3); _1= ((oop *)_state1)[1]; /* copy */ _leave(); return _1; _leave(); } static struct __methodinfo __info31= { "[] do:", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 106, 111, &__info25 }; static oop b_31(oop v__closure, oop v__self, oop v_offset) { _enter(&__info31); oop _1= 0; oop _2= 0; oop _3= 0; oop _4= 0; _line(108); _1= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1]; /* unaryBlock */ _2= ((struct t_OrderedCollection *)((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[2])->v_array; /* array */ _3= ((struct t_OrderedCollection *)((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[2])->v_firstIndex; /* firstIndex */ _4= v_offset; { int _l= (long)_3 >> 1; int _r= (long)_4 >> 1; int _s= _l + _r; if ((1 & (long)_3 & (long)_4) && ((_s ^ (_s << 1)) >= 0)) _3= (oop)(long)(_s << 1 | 1); else _3= _sendv(s__2b, 2, _3, _4); } _line(108); _2=_sendv(s_at_, 2, _2, _3); _line(108); _1=_sendv(s_value_, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info29= { "do:", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 106, 111, &__info31 }; static oop OrderedCollection__do_(oop v__closure, oop v_stateful_self, oop v_self, oop v_unaryBlock) { _enter(&__info29); oop _state1= _sendv(s_new_5f_, 2, v__vector, 6); oop _1= 0; oop _2= 0; oop _3= 0; ((oop *)_state1)[2]= v_stateful_self; ((oop *)_state1)[1]= v_unaryBlock; _line(106); _1= l_30; _2= ((struct t_OrderedCollection *)((oop *)_state1)[2])->v_lastIndex; /* lastIndex */ _3= ((struct t_OrderedCollection *)((oop *)_state1)[2])->v_firstIndex; /* firstIndex */ { int _l= (long)_2 >> 1; int _r= (long)_3 >> 1; int _s= (_l - _r); if ((1 & (long)_2 & (long)_3) && ((_s ^ (_s << 1)) >= 0)) _2= (oop)(long)(_s << 1 | 1); else _2= _sendv(s__2d, 2, _2, _3); } /* Scope('offset'->ArgumentVariableNode) */ /* Scope('self'->ArgumentVariableNode 'firstIndex'->SlotVariableNode 'lastIndex'->SlotVariableNode 'unaryBlock'->ArgumentVariableNode 'stateful_self'->ArgumentVariableNode 'array'->SlotVariableNode) */ /* nil */ /* 2 */ /* 1 */ _3= _sendv(s_function_5f_arity_5f_outer_state_nlr_5f_, 6, v_BlockClosure, (oop)b_31, 1, 0, ((oop *)_state1), 0); _line(108); _1=_sendv(s_to_do_, 3, _1, _2, _3); _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info34= { "[] doWithIndex:", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 111, 125, &__info29 }; static oop b_34(oop v__closure, oop v__self, oop v_offset) { _enter(&__info34); oop _1= 0; oop _2= 0; oop _3= 0; oop _4= 0; _line(113); _1= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1]; /* binaryBlock */ _2= ((struct t_OrderedCollection *)((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[2])->v_array; /* array */ _3= ((struct t_OrderedCollection *)((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[2])->v_firstIndex; /* firstIndex */ _4= v_offset; { int _l= (long)_3 >> 1; int _r= (long)_4 >> 1; int _s= _l + _r; if ((1 & (long)_3 & (long)_4) && ((_s ^ (_s << 1)) >= 0)) _3= (oop)(long)(_s << 1 | 1); else _3= _sendv(s__2b, 2, _3, _4); } _line(113); _2=_sendv(s_at_, 2, _2, _3); _3= v_offset; _4= l_35; { int _l= (long)_3 >> 1; int _r= (long)_4 >> 1; int _s= _l + _r; if ((1 & (long)_3) && ((_s ^ (_s << 1)) >= 0)) _3= (oop)(long)(_s << 1 | 1); else _3= _sendv(s__2b, 2, _3, _4); } _line(113); _1=_sendv(s_value_value_, 3, _1, _2, _3); _leave(); return _1; _leave(); } static struct __methodinfo __info32= { "doWithIndex:", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 111, 125, &__info34 }; static oop OrderedCollection__doWithIndex_(oop v__closure, oop v_stateful_self, oop v_self, oop v_binaryBlock) { _enter(&__info32); oop _state1= _sendv(s_new_5f_, 2, v__vector, 6); oop _1= 0; oop _2= 0; oop _3= 0; ((oop *)_state1)[2]= v_stateful_self; ((oop *)_state1)[1]= v_binaryBlock; _line(111); _1= l_33; _2= ((struct t_OrderedCollection *)((oop *)_state1)[2])->v_lastIndex; /* lastIndex */ _3= ((struct t_OrderedCollection *)((oop *)_state1)[2])->v_firstIndex; /* firstIndex */ { int _l= (long)_2 >> 1; int _r= (long)_3 >> 1; int _s= (_l - _r); if ((1 & (long)_2 & (long)_3) && ((_s ^ (_s << 1)) >= 0)) _2= (oop)(long)(_s << 1 | 1); else _2= _sendv(s__2d, 2, _2, _3); } /* Scope('offset'->ArgumentVariableNode) */ /* Scope('stateful_self'->ArgumentVariableNode 'self'->ArgumentVariableNode 'firstIndex'->SlotVariableNode 'lastIndex'->SlotVariableNode 'binaryBlock'->ArgumentVariableNode 'array'->SlotVariableNode) */ /* nil */ /* 2 */ /* 1 */ _3= _sendv(s_function_5f_arity_5f_outer_state_nlr_5f_, 6, v_BlockClosure, (oop)b_34, 1, 0, ((oop *)_state1), 0); _line(113); _1=_sendv(s_to_do_, 3, _1, _2, _3); _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info36= { "makeRoomAtFirst", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 125, 137, &__info32 }; static oop OrderedCollection__makeRoomAtFirst(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info36); oop v_delta= 0; oop v_newArray= 0; oop _1= 0; oop _2= 0; oop _3= 0; oop _4= 0; oop _5= 0; (void)v_delta; (void)v_newArray; _line(125); /* ifTrue: */ _1= 0; /* and: */ _2= v_self; _line(128); _2=_sendv(s_size, 1, _2); _3= l_37; _2= (_2 == _3) ? v_true : v_false; if (!_2) goto _l11; { _2= ((struct t_OrderedCollection *)v_stateful_self)->v_array; _line(128); _2=_sendv(s_size, 1, _2); _3= l_37; if (1 & (long)_2) { _2= (((long)_2 > (long)_3) ? v_true : v_false); } else _2= _sendv(s__3e, 2, _2, _3); } _l11:; if (!_2) goto _l10; { _1= v_self; _line(128); _1=_sendv(s_resetToEnd, 1, _1); _leave(); return _1; } _l10:; /* ifTrue: */ _1= 0; _2= v_self; _line(129); _2=_sendv(s_size, 1, _2); _3= l_38; { 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); } _3= ((struct t_OrderedCollection *)v_stateful_self)->v_array; _line(129); _3=_sendv(s_size, 1, _3); if (1 & (long)_2 & (long)_3) { _2= (((long)_2 < (long)_3) ? v_true : v_false); } else _2= _sendv(s__3c, 2, _2, _3); if (!_2) goto _l12; { _1= v_self; _line(129); _1=_sendv(s_shiftToEnd, 1, _1); _leave(); return _1; } _l12:; _1= v_self; _line(130); _1=_sendv(s_growSize, 1, _1); v_delta= _1; _1= v_Array; _2= v_self; _line(131); _2=_sendv(s_size, 1, _2); _3= v_delta; { int _l= (long)_2 >> 1; int _r= (long)_3 >> 1; int _s= _l + _r; if ((1 & (long)_2 & (long)_3) && ((_s ^ (_s << 1)) >= 0)) _2= (oop)(long)(_s << 1 | 1); else _2= _sendv(s__2b, 2, _2, _3); } _line(131); _1=_sendv(s_new_, 2, _1, _2); _2= ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex; _3= v_delta; { int _l= (long)_2 >> 1; int _r= (long)_3 >> 1; int _s= _l + _r; if ((1 & (long)_2 & (long)_3) && ((_s ^ (_s << 1)) >= 0)) _2= (oop)(long)(_s << 1 | 1); else _2= _sendv(s__2b, 2, _2, _3); } _3= ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex; _4= v_delta; { int _l= (long)_3 >> 1; int _r= (long)_4 >> 1; int _s= _l + _r; if ((1 & (long)_3 & (long)_4) && ((_s ^ (_s << 1)) >= 0)) _3= (oop)(long)(_s << 1 | 1); else _3= _sendv(s__2b, 2, _3, _4); } _4= ((struct t_OrderedCollection *)v_stateful_self)->v_array; _5= ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex; _line(131); _1=_sendv(s_replaceFrom_to_with_startingAt_, 5, _1, _2, _3, _4, _5); v_newArray= _1; _1= v_newArray; ((struct t_OrderedCollection *)v_stateful_self)->v_array= _1; _1= ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex; _2= v_delta; { 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); } ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex= _1; _1= ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex; _2= v_delta; { 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); } ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex= _1; _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info39= { "makeRoomAtLast", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 137, 146, &__info36 }; static oop OrderedCollection__makeRoomAtLast(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info39); oop _1= 0; oop _2= 0; oop _3= 0; oop _4= 0; oop _5= 0; _line(137); /* ifTrue: */ _1= 0; /* and: */ _2= v_self; _line(139); _2=_sendv(s_size, 1, _2); _3= l_40; _2= (_2 == _3) ? v_true : v_false; if (!_2) goto _l14; { _2= ((struct t_OrderedCollection *)v_stateful_self)->v_array; _line(139); _2=_sendv(s_size, 1, _2); _3= l_40; if (1 & (long)_2) { _2= (((long)_2 > (long)_3) ? v_true : v_false); } else _2= _sendv(s__3e, 2, _2, _3); } _l14:; if (!_2) goto _l13; { _1= v_self; _line(139); _1=_sendv(s_resetToBeginning, 1, _1); _leave(); return _1; } _l13:; /* ifTrue: */ _1= 0; _2= v_self; _line(140); _2=_sendv(s_size, 1, _2); _3= l_41; { 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); } _3= ((struct t_OrderedCollection *)v_stateful_self)->v_array; _line(140); _3=_sendv(s_size, 1, _3); if (1 & (long)_2 & (long)_3) { _2= (((long)_2 < (long)_3) ? v_true : v_false); } else _2= _sendv(s__3c, 2, _2, _3); if (!_2) goto _l15; { _1= v_self; _line(140); _1=_sendv(s_shiftToBeginning, 1, _1); _leave(); return _1; } _l15:; _1= v_Array; _2= v_self; _line(141); _2=_sendv(s_size, 1, _2); _3= v_self; _line(141); _3=_sendv(s_growSize, 1, _3); { int _l= (long)_2 >> 1; int _r= (long)_3 >> 1; int _s= _l + _r; if ((1 & (long)_2 & (long)_3) && ((_s ^ (_s << 1)) >= 0)) _2= (oop)(long)(_s << 1 | 1); else _2= _sendv(s__2b, 2, _2, _3); } _line(141); _1=_sendv(s_new_, 2, _1, _2); _2= ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex; _3= ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex; _4= ((struct t_OrderedCollection *)v_stateful_self)->v_array; _5= ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex; _line(142); _sendv(s_replaceFrom_to_with_startingAt_, 5, _1, _2, _3, _4, _5); _1=_sendv(s_yourself, 1, _1); ((struct t_OrderedCollection *)v_stateful_self)->v_array= _1; _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info44= { "[] shiftToBeginning", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 146, 155, &__info39 }; static oop b_44(oop v__closure, oop v__self, oop v_index) { _enter(&__info44); oop _1= 0; oop _2= 0; oop _3= 0; oop _4= 0; oop _5= 0; _line(150); _1= ((struct t_OrderedCollection *)((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1])->v_array; /* array */ _2= v_index; _3= ((struct t_OrderedCollection *)((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1])->v_array; /* array */ _4= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[2]; /* delta */ _5= v_index; { int _l= (long)_4 >> 1; int _r= (long)_5 >> 1; int _s= _l + _r; if ((1 & (long)_4 & (long)_5) && ((_s ^ (_s << 1)) >= 0)) _4= (oop)(long)(_s << 1 | 1); else _4= _sendv(s__2b, 2, _4, _5); } _line(150); _3=_sendv(s_at_, 2, _3, _4); _line(150); _1=_sendv(s_at_put_, 3, _1, _2, _3); _leave(); return _1; _leave(); } static struct __methodinfo __info42= { "shiftToBeginning", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 146, 155, &__info44 }; static oop OrderedCollection__shiftToBeginning(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info42); oop _state1= _sendv(s_new_5f_, 2, v__vector, 6); oop _1= 0; oop _2= 0; oop _3= 0; ((oop *)_state1)[1]= v_stateful_self; _line(146); _1= ((struct t_OrderedCollection *)((oop *)_state1)[1])->v_firstIndex; /* firstIndex */ _2= l_43; { 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); } ((oop *)_state1)[2]= _1; /* delta */ _1= l_43; _2= v_self; _line(150); _2=_sendv(s_size, 1, _2); /* Scope('index'->ArgumentVariableNode) */ /* Scope('self'->ArgumentVariableNode 'firstIndex'->SlotVariableNode 'lastIndex'->SlotVariableNode 'delta'->TemporaryVariableNode 'stateful_self'->ArgumentVariableNode 'array'->SlotVariableNode) */ /* nil */ /* 2 */ /* 1 */ _3= _sendv(s_function_5f_arity_5f_outer_state_nlr_5f_, 6, v_BlockClosure, (oop)b_44, 1, 0, ((oop *)_state1), 0); _line(150); _1=_sendv(s_to_do_, 3, _1, _2, _3); _1= ((struct t_OrderedCollection *)((oop *)_state1)[1])->v_firstIndex; /* firstIndex */ _2= ((oop *)_state1)[2]; /* delta */ { 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__2d, 2, _1, _2); } ((struct t_OrderedCollection *)((oop *)_state1)[1])->v_firstIndex= _1; /* firstIndex */ _1= ((struct t_OrderedCollection *)((oop *)_state1)[1])->v_lastIndex; /* lastIndex */ _2= ((oop *)_state1)[2]; /* delta */ { 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__2d, 2, _1, _2); } ((struct t_OrderedCollection *)((oop *)_state1)[1])->v_lastIndex= _1; /* lastIndex */ _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info46= { "[] shiftToEnd", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 155, 164, &__info42 }; static oop b_46(oop v__closure, oop v__self, oop v_index) { _enter(&__info46); oop _1= 0; oop _2= 0; oop _3= 0; oop _4= 0; _line(159); _1= ((struct t_OrderedCollection *)((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1])->v_array; /* array */ _2= v_index; _3= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[2]; /* delta */ { int _l= (long)_2 >> 1; int _r= (long)_3 >> 1; int _s= _l + _r; if ((1 & (long)_2 & (long)_3) && ((_s ^ (_s << 1)) >= 0)) _2= (oop)(long)(_s << 1 | 1); else _2= _sendv(s__2b, 2, _2, _3); } _3= ((struct t_OrderedCollection *)((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1])->v_array; /* array */ _4= v_index; _line(159); _3=_sendv(s_at_, 2, _3, _4); _line(159); _1=_sendv(s_at_put_, 3, _1, _2, _3); _leave(); return _1; _leave(); } static struct __methodinfo __info45= { "shiftToEnd", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 155, 164, &__info46 }; static oop OrderedCollection__shiftToEnd(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info45); oop _state1= _sendv(s_new_5f_, 2, v__vector, 6); oop _1= 0; oop _2= 0; oop _3= 0; ((oop *)_state1)[1]= v_stateful_self; _line(155); _1= ((struct t_OrderedCollection *)((oop *)_state1)[1])->v_array; /* array */ _line(158); _1=_sendv(s_size, 1, _1); _2= ((struct t_OrderedCollection *)((oop *)_state1)[1])->v_lastIndex; /* lastIndex */ { 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__2d, 2, _1, _2); } ((oop *)_state1)[2]= _1; /* delta */ _1= ((struct t_OrderedCollection *)((oop *)_state1)[1])->v_lastIndex; /* lastIndex */ _2= ((struct t_OrderedCollection *)((oop *)_state1)[1])->v_firstIndex; /* firstIndex */ /* Scope('index'->ArgumentVariableNode) */ /* Scope('self'->ArgumentVariableNode 'firstIndex'->SlotVariableNode 'lastIndex'->SlotVariableNode 'delta'->TemporaryVariableNode 'stateful_self'->ArgumentVariableNode 'array'->SlotVariableNode) */ /* nil */ /* 2 */ /* 1 */ _3= _sendv(s_function_5f_arity_5f_outer_state_nlr_5f_, 6, v_BlockClosure, (oop)b_46, 1, 0, ((oop *)_state1), 0); _line(159); _1=_sendv(s_downTo_do_, 3, _1, _2, _3); _1= ((struct t_OrderedCollection *)((oop *)_state1)[1])->v_firstIndex; /* firstIndex */ _2= ((oop *)_state1)[2]; /* delta */ { 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); } ((struct t_OrderedCollection *)((oop *)_state1)[1])->v_firstIndex= _1; /* firstIndex */ _1= ((struct t_OrderedCollection *)((oop *)_state1)[1])->v_lastIndex; /* lastIndex */ _2= ((oop *)_state1)[2]; /* delta */ { 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); } ((struct t_OrderedCollection *)((oop *)_state1)[1])->v_lastIndex= _1; /* lastIndex */ _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info47= { "growSize", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 164, 166, &__info45 }; static oop OrderedCollection__growSize(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info47); oop _1= 0; _line(164); _1= ((struct t_OrderedCollection *)v_stateful_self)->v_array; _line(164); _1=_sendv(s_size, 1, _1); _leave(); return _1; _leave(); } static struct __methodinfo __info48= { "resetToBegining", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 166, 167, &__info47 }; static oop OrderedCollection__resetToBegining(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info48); oop _1= 0; oop _2= 0; _line(166); _1= l_49; ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex= _1; _2= l_49; { 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); } ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex= _1; _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info50= { "resetToEnd", "OrderedCollection", "/Users/piumarta/src/idst/object/st80/OrderedCollection.st", 0, 167, 168, &__info48 }; static oop OrderedCollection__resetToEnd(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info50); oop _1= 0; oop _2= 0; _line(167); _1= ((struct t_OrderedCollection *)v_stateful_self)->v_array; _line(167); _1=_sendv(s_size, 1, _1); ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex= _1; _2= l_51; { 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); } ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex= _1; _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info= { "__id__init__", "", "OrderedCollection.st", 0, 0, 0, &__info50 }; void __id__init__OrderedCollection(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, "SequenceableCollection", "__id__init__SequenceableCollection"); v__object= _libid->import("_object"); v__vector= _libid->import("_vector"); v_Object= _libid->import("Object"); v_UndefinedObject= _libid->import("UndefinedObject"); v_StaticBlockClosure= _libid->import("StaticBlockClosure"); v_BlockClosure= _libid->import("BlockClosure"); v_Magnitude= _libid->import("Magnitude"); v_Number= _libid->import("Number"); 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_String= _libid->import("String"); v_ImmutableString= _libid->import("ImmutableString"); v_nil= _libid->import("nil"); v_true= _libid->import("true"); v_false= _libid->import("false"); v_OrderedCollection= _libid->proto2(v_SequenceableCollection, OrderedCollection___5fsizeof(0, 0)); _libid->method(v_OrderedCollection, s__5fsizeof, (_imp_t)OrderedCollection___5fsizeof); _libid->method(v_OrderedCollection, s__5fdebugName, (_imp_t)OrderedCollection___5fdebugName); _libid->method(v_OrderedCollection, s__5fslots, (_imp_t)OrderedCollection___5fslots); _libid->export("OrderedCollection", v_OrderedCollection); _libid->method(v_OrderedCollection, s_species, (_imp_t)OrderedCollection__species); l_3= _sendv(s_value_5f_, 2, v_SmallInteger, 2); _libid->method(v_OrderedCollection, s_new, (_imp_t)OrderedCollection__new); _libid->method(v_OrderedCollection, s_new_, (_imp_t)OrderedCollection__new_); _libid->method(v_OrderedCollection, s_initialize_, (_imp_t)OrderedCollection__initialize_); _libid->method(v_OrderedCollection, s_setCollection_, (_imp_t)OrderedCollection__setCollection_); l_8= _sendv(s_value_5f_, 2, v_SmallInteger, 1); _libid->method(v_OrderedCollection, s_size, (_imp_t)OrderedCollection__size); l_10= _sendv(s_value_5f_, 2, v_SmallInteger, 3); l_11= _sendv(s_value_5f_, 2, v_SmallInteger, 1); _libid->method(v_OrderedCollection, s_reset, (_imp_t)OrderedCollection__reset); l_13= _sendv(s_value_5f_, 2, v_SmallInteger, 1); _libid->method(v_OrderedCollection, s_at_, (_imp_t)OrderedCollection__at_); l_15= _sendv(s_value_5f_, 2, v_SmallInteger, 1); _libid->method(v_OrderedCollection, s_at_put_, (_imp_t)OrderedCollection__at_put_); _libid->method(v_OrderedCollection, s_add_, (_imp_t)OrderedCollection__add_); l_18= _sendv(s_value_5f_, 2, v_SmallInteger, 1); _libid->method(v_OrderedCollection, s_addFirst_, (_imp_t)OrderedCollection__addFirst_); l_20= _sendv(s_value_5f_, 2, v_SmallInteger, 1); _libid->method(v_OrderedCollection, s_addLast_, (_imp_t)OrderedCollection__addLast_); l_22= _sendv(s_value_5f_, 2, v_SmallInteger, 1); _libid->method(v_OrderedCollection, s_removeFirst, (_imp_t)OrderedCollection__removeFirst); l_24= _sendv(s_value_5f_, 2, v_SmallInteger, 1); _libid->method(v_OrderedCollection, s_removeLast, (_imp_t)OrderedCollection__removeLast); l_26= _sendv(s_value_5f_, 2, v_SmallInteger, 0); l_27= _sendv(s_value_5f_, 2, v_SmallInteger, 1); _libid->method(v_OrderedCollection, s_copyFrom_to_, (_imp_t)OrderedCollection__copyFrom_to_); l_30= _sendv(s_value_5f_, 2, v_SmallInteger, 0); _libid->method(v_OrderedCollection, s_do_, (_imp_t)OrderedCollection__do_); l_33= _sendv(s_value_5f_, 2, v_SmallInteger, 0); l_35= _sendv(s_value_5f_, 2, v_SmallInteger, 1); _libid->method(v_OrderedCollection, s_doWithIndex_, (_imp_t)OrderedCollection__doWithIndex_); l_37= _sendv(s_value_5f_, 2, v_SmallInteger, 0); l_38= _sendv(s_value_5f_, 2, v_SmallInteger, 2); _libid->method(v_OrderedCollection, s_makeRoomAtFirst, (_imp_t)OrderedCollection__makeRoomAtFirst); l_40= _sendv(s_value_5f_, 2, v_SmallInteger, 0); l_41= _sendv(s_value_5f_, 2, v_SmallInteger, 2); _libid->method(v_OrderedCollection, s_makeRoomAtLast, (_imp_t)OrderedCollection__makeRoomAtLast); l_43= _sendv(s_value_5f_, 2, v_SmallInteger, 1); _libid->method(v_OrderedCollection, s_shiftToBeginning, (_imp_t)OrderedCollection__shiftToBeginning); _libid->method(v_OrderedCollection, s_shiftToEnd, (_imp_t)OrderedCollection__shiftToEnd); _libid->method(v_OrderedCollection, s_growSize, (_imp_t)OrderedCollection__growSize); l_49= _sendv(s_value_5f_, 2, v_SmallInteger, 1); _libid->method(v_OrderedCollection, s_resetToBegining, (_imp_t)OrderedCollection__resetToBegining); l_51= _sendv(s_value_5f_, 2, v_SmallInteger, 1); _libid->method(v_OrderedCollection, s_resetToEnd, (_imp_t)OrderedCollection__resetToEnd); _leave(); }