/* generated by Id 1.1 at ,$ */ /* with the command: -I../stage1/ -c Character.st -o ../stage2/Character.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_next= 0; static oop s__3e_3d= 0; static oop s_hash= 0; static oop s_contents= 0; static oop s_new_5f_= 0; static oop s_value_5f_= 0; static oop s__5fimport_= 0; static oop s_atEnd= 0; static oop s_skip_= 0; static oop s_negated= 0; static oop s__2d= 0; static oop s_ifTrue_= 0; static oop s__2b= 0; static oop s__2f_2f= 0; static oop s__2c= 0; static oop s_isDigit= 0; static oop s__3d_3d= 0; static oop s_digitValue= 0; static oop s_nextPut_= 0; static oop s__3d= 0; static oop s_asString= 0; static oop s__5c_5c= 0; static oop s_isCharacter= 0; static oop s__3c= 0; static oop s__2a= 0; static oop s_asUppercase= 0; static oop s_and_= 0; static oop s_ifTrue_ifFalse_= 0; static oop s__3e= 0; static oop s_asLowercase= 0; static oop s_with_= 0; static oop s_digitValue_= 0; static oop s_size_5f_value_5f_= 0; static oop s_between_and_= 0; static oop s_or_= 0; static oop s_printOctalOn_= 0; static oop s_value_= 0; static oop s_readFrom_base_= 0; static oop s_at_= 0; static oop s_peek= 0; static oop s_isLetter= 0; static oop s_not= 0; static oop s_whileFalse_= 0; static oop s_asciiValue= 0; static oop s_value= 0; static oop s_asInteger= 0; static oop s_function_5f_arity_5f_outer_state_nlr_5f_= 0; static oop s_error_= 0; static struct _Selector { const char *name; oop *addr; } _Selectors[]= { { "next", &s_next }, { ">=", &s__3e_3d }, { "hash", &s_hash }, { "contents", &s_contents }, { "new_:", &s_new_5f_ }, { "value_:", &s_value_5f_ }, { "_import:", &s__5fimport_ }, { "atEnd", &s_atEnd }, { "skip:", &s_skip_ }, { "negated", &s_negated }, { "-", &s__2d }, { "ifTrue:", &s_ifTrue_ }, { "+", &s__2b }, { "//", &s__2f_2f }, { ",", &s__2c }, { "isDigit", &s_isDigit }, { "==", &s__3d_3d }, { "digitValue", &s_digitValue }, { "nextPut:", &s_nextPut_ }, { "=", &s__3d }, { "asString", &s_asString }, { "\\\\", &s__5c_5c }, { "isCharacter", &s_isCharacter }, { "<", &s__3c }, { "*", &s__2a }, { "asUppercase", &s_asUppercase }, { "and:", &s_and_ }, { "ifTrue:ifFalse:", &s_ifTrue_ifFalse_ }, { ">", &s__3e }, { "asLowercase", &s_asLowercase }, { "with:", &s_with_ }, { "digitValue:", &s_digitValue_ }, { "size_:value_:", &s_size_5f_value_5f_ }, { "between:and:", &s_between_and_ }, { "or:", &s_or_ }, { "printOctalOn:", &s_printOctalOn_ }, { "value:", &s_value_ }, { "readFrom:base:", &s_readFrom_base_ }, { "at:", &s_at_ }, { "peek", &s_peek }, { "isLetter", &s_isLetter }, { "not", &s_not }, { "whileFalse:", &s_whileFalse_ }, { "asciiValue", &s_asciiValue }, { "value", &s_value }, { "asInteger", &s_asInteger }, { "function_:arity_:outer:state:nlr_:", &s_function_5f_arity_5f_outer_state_nlr_5f_ }, { "error:", &s_error_ }, { 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_7= 0; static oop l_12= 0; static oop l_13= 0; static oop l_14= 0; static oop l_16= 0; static oop l_17= 0; static oop l_18= 0; static oop l_21= 0; static oop l_22= 0; static oop l_23= 0; static oop l_25= 0; static oop l_26= 0; static oop l_27= 0; static oop l_28= 0; static oop l_29= 0; static oop l_30= 0; static oop l_31= 0; static oop l_32= 0; static oop l_33= 0; static oop l_34= 0; static oop l_35= 0; static oop l_36= 0; static oop l_37= 0; static oop l_38= 0; static oop l_39= 0; static oop l_40= 0; static oop l_41= 0; static oop l_42= 0; static oop l_43= 0; static oop l_44= 0; static oop l_45= 0; static oop l_46= 0; static oop l_47= 0; static oop l_48= 0; static oop l_49= 0; static oop l_50= 0; static oop l_51= 0; static oop l_52= 0; static oop l_53= 0; static oop l_54= 0; static oop l_55= 0; static oop l_56= 0; static oop l_57= 0; static oop l_58= 0; static oop l_59= 0; static oop l_60= 0; static oop l_61= 0; static oop l_62= 0; static oop l_64= 0; static oop l_65= 0; static oop l_66= 0; static oop l_67= 0; static oop l_69= 0; static oop l_70= 0; static oop l_72= 0; static oop l_73= 0; static oop l_74= 0; static oop l_76= 0; static oop l_77= 0; static oop l_78= 0; static oop l_79= 0; static oop l_82= 0; static oop l_83= 0; static oop l_84= 0; static oop l_85= 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_Character= 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_ImmutableArray= 0; static oop v_WordArray= 0; static oop v_ByteArray= 0; static oop v_String= 0; static oop v_ImmutableString= 0; static oop v_true= 0; static oop v_false= 0; static oop al_62[256]= { (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_26, (oop)&l_27, (oop)&l_28, (oop)&l_29, (oop)&l_30, (oop)&l_31, (oop)&l_32, (oop)&l_33, (oop)&l_34, (oop)&l_35, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_36, (oop)&l_37, (oop)&l_38, (oop)&l_39, (oop)&l_40, (oop)&l_41, (oop)&l_42, (oop)&l_43, (oop)&l_44, (oop)&l_45, (oop)&l_46, (oop)&l_47, (oop)&l_48, (oop)&l_49, (oop)&l_50, (oop)&l_51, (oop)&l_52, (oop)&l_53, (oop)&l_54, (oop)&l_55, (oop)&l_56, (oop)&l_57, (oop)&l_58, (oop)&l_59, (oop)&l_60, (oop)&l_61, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_36, (oop)&l_37, (oop)&l_38, (oop)&l_39, (oop)&l_40, (oop)&l_41, (oop)&l_42, (oop)&l_43, (oop)&l_44, (oop)&l_45, (oop)&l_46, (oop)&l_47, (oop)&l_48, (oop)&l_49, (oop)&l_50, (oop)&l_51, (oop)&l_52, (oop)&l_53, (oop)&l_54, (oop)&l_55, (oop)&l_56, (oop)&l_57, (oop)&l_58, (oop)&l_59, (oop)&l_60, (oop)&l_61, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25, (oop)&l_25 }; static struct __methodinfo __info1= { "isCharacter", "Character", "/Users/piumarta/src/idst/object/st80/Character.st", 0, 26, 27, 0 }; static oop Character__isCharacter(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info1); oop _1= 0; _line(26); _1= v_true; _leave(); return _1; _leave(); } static struct __methodinfo __info2= { "isCharacter", "Object", "/Users/piumarta/src/idst/object/st80/Character.st", 0, 27, 48, &__info1 }; static oop Object__isCharacter(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info2); oop _1= 0; _line(27); _1= v_false; _leave(); return _1; _leave(); } static struct __methodinfo __info3= { "asciiValue", "Character", "/Users/piumarta/src/idst/object/st80/Character.st", 0, 48, 49, &__info2 }; static oop Character__asciiValue(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info3); oop _1= 0; _line(48); _1= ((struct t_Character *)v_stateful_self)->v_value; _leave(); return _1; _leave(); } static struct __methodinfo __info4= { "value", "Character", "/Users/piumarta/src/idst/object/st80/Character.st", 0, 49, 50, &__info3 }; static oop Character__value(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info4); oop _1= 0; _line(49); _1= ((struct t_Character *)v_stateful_self)->v_value; _leave(); return _1; _leave(); } static struct __methodinfo __info5= { "asInteger", "Character", "/Users/piumarta/src/idst/object/st80/Character.st", 0, 50, 52, &__info4 }; static oop Character__asInteger(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info5); oop _1= 0; _line(50); _1= ((struct t_Character *)v_stateful_self)->v_value; _leave(); return _1; _leave(); } static struct __methodinfo __info6= { "hash", "Character", "/Users/piumarta/src/idst/object/st80/Character.st", 0, 52, 53, &__info5 }; static oop Character__hash(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info6); oop _1= 0; oop _2= 0; _line(52); _1= ((struct t_Character *)v_stateful_self)->v_value; _2= l_7; { int _l= (long)_1 >> 1; int _r= (long)_2 >> 1; int _s= (_l * _r); if ((1 & (long)_1) && ((_r == 0) || (_s / _r == _l)) && ((_s ^ (_s << 1)) >= 0)) _1= (oop)(long)(_s << 1 | 1); else _1= _sendv(s__2a, 2, _1, _2); } _leave(); return _1; _leave(); } static struct __methodinfo __info8= { "=", "Character", "/Users/piumarta/src/idst/object/st80/Character.st", 0, 53, 54, &__info6 }; static oop Character___3d(oop v__closure, oop v_stateful_self, oop v_self, oop v_aCharacter) { _enter(&__info8); oop _1= 0; oop _2= 0; _line(53); /* and: */ _1= v_aCharacter; _line(53); _1=_sendv(s_isCharacter, 1, _1); if (!_1) goto _l1; { _1= ((struct t_Character *)v_stateful_self)->v_value; _2= v_aCharacter; _line(53); _2=_sendv(s_asciiValue, 1, _2); _1= (_1 == _2) ? v_true : v_false; } _l1:; _leave(); return _1; _leave(); } static struct __methodinfo __info9= { "<", "Character", "/Users/piumarta/src/idst/object/st80/Character.st", 0, 54, 55, &__info8 }; static oop Character___3c(oop v__closure, oop v_stateful_self, oop v_self, oop v_aCharacter) { _enter(&__info9); oop _1= 0; oop _2= 0; _line(54); /* and: */ _1= v_aCharacter; _line(54); _1=_sendv(s_isCharacter, 1, _1); if (!_1) goto _l2; { _1= ((struct t_Character *)v_stateful_self)->v_value; _2= v_aCharacter; _line(54); _2=_sendv(s_asciiValue, 1, _2); if (1 & (long)_1 & (long)_2) { _1= (((long)_1 < (long)_2) ? v_true : v_false); } else _1= _sendv(s__3c, 2, _1, _2); } _l2:; _leave(); return _1; _leave(); } static struct __methodinfo __info10= { ">", "Character", "/Users/piumarta/src/idst/object/st80/Character.st", 0, 55, 57, &__info9 }; static oop Character___3e(oop v__closure, oop v_stateful_self, oop v_self, oop v_aCharacter) { _enter(&__info10); oop _1= 0; oop _2= 0; _line(55); /* and: */ _1= v_aCharacter; _line(55); _1=_sendv(s_isCharacter, 1, _1); if (!_1) goto _l3; { _1= ((struct t_Character *)v_stateful_self)->v_value; _2= v_aCharacter; _line(55); _2=_sendv(s_asciiValue, 1, _2); if (1 & (long)_1 & (long)_2) { _1= (((long)_1 > (long)_2) ? v_true : v_false); } else _1= _sendv(s__3e, 2, _1, _2); } _l3:; _leave(); return _1; _leave(); } static struct __methodinfo __info11= { "asUppercase", "Character", "/Users/piumarta/src/idst/object/st80/Character.st", 0, 57, 58, &__info10 }; static oop Character__asUppercase(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info11); oop _1= 0; oop _2= 0; oop _3= 0; _line(57); /* ifTrue:ifFalse: */ /* and: */ _1= l_12; _2= ((struct t_Character *)v_stateful_self)->v_value; if (1 & (long)_2) { _1= (((long)_1 < (long)_2) ? v_true : v_false); } else _1= _sendv(s__3c, 2, _1, _2); if (!_1) goto _l6; { _1= ((struct t_Character *)v_stateful_self)->v_value; _2= l_13; if (1 & (long)_1) { _1= (((long)_1 < (long)_2) ? v_true : v_false); } else _1= _sendv(s__3c, 2, _1, _2); } _l6:; if (!_1) goto _l4; { _1= v_Character; _2= ((struct t_Character *)v_stateful_self)->v_value; _3= l_14; { 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); } _line(57); _1=_sendv(s_value_, 2, _1, _2); } goto _l5; _l4:; { _1= v_self; } _l5:; _leave(); return _1; _leave(); } static struct __methodinfo __info15= { "asLowercase", "Character", "/Users/piumarta/src/idst/object/st80/Character.st", 0, 58, 59, &__info11 }; static oop Character__asLowercase(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info15); oop _1= 0; oop _2= 0; oop _3= 0; _line(58); /* ifTrue:ifFalse: */ /* and: */ _1= l_16; _2= ((struct t_Character *)v_stateful_self)->v_value; if (1 & (long)_2) { _1= (((long)_1 < (long)_2) ? v_true : v_false); } else _1= _sendv(s__3c, 2, _1, _2); if (!_1) goto _l9; { _1= ((struct t_Character *)v_stateful_self)->v_value; _2= l_17; if (1 & (long)_1) { _1= (((long)_1 < (long)_2) ? v_true : v_false); } else _1= _sendv(s__3c, 2, _1, _2); } _l9:; if (!_1) goto _l7; { _1= v_Character; _2= ((struct t_Character *)v_stateful_self)->v_value; _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__2b, 2, _2, _3); } _line(58); _1=_sendv(s_value_, 2, _1, _2); } goto _l8; _l7:; { _1= v_self; } _l8:; _leave(); return _1; _leave(); } static struct __methodinfo __info19= { "asString", "Character", "/Users/piumarta/src/idst/object/st80/Character.st", 0, 59, 61, &__info15 }; static oop Character__asString(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info19); oop _1= 0; oop _2= 0; _line(59); _1= v_String; _2= v_self; _line(59); _1=_sendv(s_with_, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info20= { "digitValue:", "Character", "/Users/piumarta/src/idst/object/st80/Character.st", 0, 61, 66, &__info19 }; static oop Character__digitValue_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anInteger) { _enter(&__info20); oop _1= 0; oop _2= 0; oop _3= 0; _line(61); _1= v_self; /* ifTrue:ifFalse: */ _2= v_anInteger; _3= l_21; if (1 & (long)_2) { _2= (((long)_2 < (long)_3) ? v_true : v_false); } else _2= _sendv(s__3c, 2, _2, _3); if (!_2) goto _l10; { _2= l_22; } goto _l11; _l10:; { _2= l_23; } _l11:; _3= v_anInteger; { 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(63); _1=_sendv(s_value_, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info24= { "digitValue", "Character", "/Users/piumarta/src/idst/object/st80/Character.st", 0, 66, 91, &__info20 }; static oop Character__digitValue(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info24); oop _1= 0; oop _2= 0; oop _3= 0; _line(66); _1= l_62; _2= l_27; _3= v_self; _line(88); _3=_sendv(s_asciiValue, 1, _3); { 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__2b, 2, _2, _3); } _line(88); _1=_sendv(s_at_, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info63= { "isLetter", "Character", "/Users/piumarta/src/idst/object/st80/Character.st", 0, 91, 92, &__info24 }; static oop Character__isLetter(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info63); oop _1= 0; oop _2= 0; oop _3= 0; _line(91); /* or: */ _1= v_self; _2= l_64; _3= l_65; _line(91); _1=_sendv(s_between_and_, 3, _1, _2, _3); if (_1) goto _l12; { _1= v_self; _2= l_66; _3= l_67; _line(91); _1=_sendv(s_between_and_, 3, _1, _2, _3); } _l12:; _leave(); return _1; _leave(); } static struct __methodinfo __info68= { "isDigit", "Character", "/Users/piumarta/src/idst/object/st80/Character.st", 0, 92, 94, &__info63 }; static oop Character__isDigit(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info68); oop _1= 0; oop _2= 0; oop _3= 0; _line(92); _1= v_self; _2= l_69; _3= l_70; _line(92); _1=_sendv(s_between_and_, 3, _1, _2, _3); _leave(); return _1; _leave(); } static struct __methodinfo __info71= { "printOctalOn:", "Character", "/Users/piumarta/src/idst/object/st80/Character.st", 0, 94, 104, &__info68 }; static oop Character__printOctalOn_(oop v__closure, oop v_stateful_self, oop v_self, oop v_aStream) { _enter(&__info71); oop _1= 0; oop _2= 0; oop _3= 0; oop _4= 0; _line(94); _1= v_aStream; _2= v_Character; _3= v_self; _line(97); _3=_sendv(s_asciiValue, 1, _3); _4= l_72; _3= _sendv(s__2f_2f, 2, _3, _4); _4= l_73; _3= _sendv(s__5c_5c, 2, _3, _4); _line(97); _2=_sendv(s_digitValue_, 2, _2, _3); _line(97); _sendv(s_nextPut_, 2, _1, _2); _2= v_Character; _3= v_self; _line(98); _3=_sendv(s_asciiValue, 1, _3); _4= l_73; _3= _sendv(s__2f_2f, 2, _3, _4); _4= l_73; _3= _sendv(s__5c_5c, 2, _3, _4); _line(98); _2=_sendv(s_digitValue_, 2, _2, _3); _sendv(s_nextPut_, 2, _1, _2); _2= v_Character; _3= v_self; _line(99); _3=_sendv(s_asciiValue, 1, _3); _4= l_74; _3= _sendv(s__2f_2f, 2, _3, _4); _4= l_73; _3= _sendv(s__5c_5c, 2, _3, _4); _line(99); _2=_sendv(s_digitValue_, 2, _2, _3); _1=_sendv(s_nextPut_, 2, _1, _2); _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info80= { "[] readFrom:base:", "Integer", "/Users/piumarta/src/idst/object/st80/Character.st", 0, 104, 130, &__info71 }; static oop b_80(oop v__closure, oop v__self) { _enter(&__info80); oop _1= 0; _line(115); _1= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1]; /* aStream */ _line(115); _1=_sendv(s_atEnd, 1, _1); _leave(); return _1; _leave(); } static struct __methodinfo __info81= { "[] readFrom:base:", "Integer", "/Users/piumarta/src/idst/object/st80/Character.st", 0, 104, 130, &__info80 }; static oop b_81(oop v__closure, oop v__self) { _enter(&__info81); oop v_digit= 0; oop _1= 0; oop _2= 0; oop _3= 0; (void)v_digit; _line(117); _1= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1]; /* aStream */ _line(118); _1=_sendv(s_next, 1, _1); v_digit= _1; /* ifTrue:ifFalse: */ _1= v_digit; _2= l_82; if (1 & (long)_1 & (long)_2) { _1= (((long)_1 == (long)_2) ? v_true : v_false); } else _1= _sendv(s__3d, 2, _1, _2); if (!_1) goto _l13; { /* ifTrue: */ _1= 0; _2= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[2]; /* value */ _3= l_83; if (1 & (long)_2) { _2= (((long)_2 < (long)_3) ? v_true : v_false); } else _2= _sendv(s__3c, 2, _2, _3); if (!_2) goto _l15; { _1= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[3]; /* self */ _2= l_84; _line(121); _1=_sendv(s_error_, 2, _1, _2); } _l15:; _1= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[2]; /* value */ ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[5]= _1; /* base */ _1= l_76; ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[2]= _1; /* value */ } goto _l14; _l13:; { _1= v_digit; _line(125); _1=_sendv(s_digitValue, 1, _1); v_digit= _1; /* ifTrue: */ _1= 0; /* or: */ _2= v_digit; _3= l_76; if (1 & (long)_2) { _2= (((long)_2 < (long)_3) ? v_true : v_false); } else _2= _sendv(s__3c, 2, _2, _3); if (_2) goto _l17; { _2= v_digit; _3= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[5]; /* base */ if (1 & (long)_2 & (long)_3) { _2= (((long)_2 >= (long)_3) ? v_true : v_false); } else _2= _sendv(s__3e_3d, 2, _2, _3); } _l17:; if (!_2) goto _l16; { _1= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[3]; /* self */ _2= l_85; _3= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1]; /* aStream */ _line(126); _3=_sendv(s_contents, 1, _3); _line(126); _2=_sendv(s__2c, 2, _2, _3); _line(126); _1=_sendv(s_error_, 2, _1, _2); } _l16:; _1= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[2]; /* value */ _2= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[5]; /* base */ { int _l= (long)_1 >> 1; int _r= (long)_2 >> 1; int _s= (_l * _r); if ((1 & (long)_1 & (long)_2) && ((_r == 0) || (_s / _r == _l)) && ((_s ^ (_s << 1)) >= 0)) _1= (oop)(long)(_s << 1 | 1); else _1= _sendv(s__2a, 2, _1, _2); } _2= v_digit; { 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); } ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[2]= _1; /* value */ } _l14:; _leave(); return _1; _leave(); } static struct __methodinfo __info75= { "readFrom:base:", "Integer", "/Users/piumarta/src/idst/object/st80/Character.st", 0, 104, 130, &__info81 }; static oop Integer__readFrom_base_(oop v__closure, oop v_stateful_self, oop v_self, oop v_aStream, oop v_base) { _enter(&__info75); oop _state1= _sendv(s_new_5f_, 2, v__vector, 6); oop v_negative= 0; oop _1= 0; oop _2= 0; oop _3= 0; (void)v_negative; ((oop *)_state1)[4]= v_stateful_self; ((oop *)_state1)[3]= v_self; ((oop *)_state1)[1]= v_aStream; ((oop *)_state1)[5]= v_base; _line(104); _1= v_false; v_negative= _1; _1= l_76; ((oop *)_state1)[2]= _1; /* value */ /* ifTrue:ifFalse: */ _1= ((oop *)_state1)[1]; /* aStream */ _line(109); _1=_sendv(s_peek, 1, _1); _2= l_77; if (1 & (long)_1 & (long)_2) { _1= (((long)_1 == (long)_2) ? v_true : v_false); } else _1= _sendv(s__3d, 2, _1, _2); if (!_1) goto _l18; { _1= ((oop *)_state1)[1]; /* aStream */ _2= l_78; _line(110); _1=_sendv(s_skip_, 2, _1, _2); } goto _l19; _l18:; { /* ifTrue: */ _1= 0; _2= ((oop *)_state1)[1]; /* aStream */ _line(112); _2=_sendv(s_peek, 1, _2); _3= l_79; 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 _l20; { _1= v_negative; _line(113); _1=_sendv(s_not, 1, _1); v_negative= _1; _1= ((oop *)_state1)[1]; /* aStream */ _2= l_78; _line(114); _1=_sendv(s_skip_, 2, _1, _2); } _l20:; } _l19:; /* Scope() */ /* Scope('negative'->TemporaryVariableNode 'self'->ArgumentVariableNode 'base'->ArgumentVariableNode 'value'->TemporaryVariableNode 'stateful_self'->ArgumentVariableNode 'aStream'->ArgumentVariableNode) */ /* nil */ /* 2 */ /* 1 */ _1= _sendv(s_function_5f_arity_5f_outer_state_nlr_5f_, 6, v_BlockClosure, (oop)b_80, 0, 0, ((oop *)_state1), 0); /* Scope('digit'->TemporaryVariableNode) */ /* Scope('negative'->TemporaryVariableNode 'self'->ArgumentVariableNode 'base'->ArgumentVariableNode 'value'->TemporaryVariableNode 'stateful_self'->ArgumentVariableNode 'aStream'->ArgumentVariableNode) */ /* nil */ /* 2 */ /* 1 */ _2= _sendv(s_function_5f_arity_5f_outer_state_nlr_5f_, 6, v_BlockClosure, (oop)b_81, 0, 0, ((oop *)_state1), 0); _line(116); _1=_sendv(s_whileFalse_, 2, _1, _2); /* ifTrue:ifFalse: */ _1= v_negative; if (!_1) goto _l21; { _1= ((oop *)_state1)[2]; /* value */ _line(128); _1=_sendv(s_negated, 1, _1); } goto _l22; _l21:; { _1= ((oop *)_state1)[2]; /* value */ } _l22:; _leave(); return _1; _leave(); } static struct __methodinfo __info= { "__id__init__", "", "Character.st", 0, 0, 0, &__info75 }; void __id__init__Character(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, "Magnitude", "__id__init__Magnitude"); 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_Character= _libid->import("Character"); 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_ImmutableArray= _libid->import("ImmutableArray"); v_WordArray= _libid->import("WordArray"); v_ByteArray= _libid->import("ByteArray"); v_String= _libid->import("String"); v_ImmutableString= _libid->import("ImmutableString"); v_true= _libid->import("true"); v_false= _libid->import("false"); _libid->method(v_Character, s_isCharacter, (_imp_t)Character__isCharacter); _libid->method(v_Object, s_isCharacter, (_imp_t)Object__isCharacter); _libid->method(v_Character, s_asciiValue, (_imp_t)Character__asciiValue); _libid->method(v_Character, s_value, (_imp_t)Character__value); _libid->method(v_Character, s_asInteger, (_imp_t)Character__asInteger); l_7= _sendv(s_value_5f_, 2, v_SmallInteger, 6653); _libid->method(v_Character, s_hash, (_imp_t)Character__hash); _libid->method(v_Character, s__3d, (_imp_t)Character___3d); _libid->method(v_Character, s__3c, (_imp_t)Character___3c); _libid->method(v_Character, s__3e, (_imp_t)Character___3e); l_12= _sendv(s_value_5f_, 2, v_SmallInteger, 96); l_13= _sendv(s_value_5f_, 2, v_SmallInteger, 123); l_14= _sendv(s_value_5f_, 2, v_SmallInteger, 32); _libid->method(v_Character, s_asUppercase, (_imp_t)Character__asUppercase); l_16= _sendv(s_value_5f_, 2, v_SmallInteger, 64); l_17= _sendv(s_value_5f_, 2, v_SmallInteger, 91); l_18= _sendv(s_value_5f_, 2, v_SmallInteger, 32); _libid->method(v_Character, s_asLowercase, (_imp_t)Character__asLowercase); _libid->method(v_Character, s_asString, (_imp_t)Character__asString); l_21= _sendv(s_value_5f_, 2, v_SmallInteger, 10); l_22= _sendv(s_value_5f_, 2, v_SmallInteger, 48); l_23= _sendv(s_value_5f_, 2, v_SmallInteger, 87); _libid->method(v_Character, s_digitValue_, (_imp_t)Character__digitValue_); l_25= _sendv(s_value_5f_, 2, v_SmallInteger, -1); l_26= _sendv(s_value_5f_, 2, v_SmallInteger, 0); l_27= _sendv(s_value_5f_, 2, v_SmallInteger, 1); l_28= _sendv(s_value_5f_, 2, v_SmallInteger, 2); l_29= _sendv(s_value_5f_, 2, v_SmallInteger, 3); l_30= _sendv(s_value_5f_, 2, v_SmallInteger, 4); l_31= _sendv(s_value_5f_, 2, v_SmallInteger, 5); l_32= _sendv(s_value_5f_, 2, v_SmallInteger, 6); l_33= _sendv(s_value_5f_, 2, v_SmallInteger, 7); l_34= _sendv(s_value_5f_, 2, v_SmallInteger, 8); l_35= _sendv(s_value_5f_, 2, v_SmallInteger, 9); l_36= _sendv(s_value_5f_, 2, v_SmallInteger, 10); l_37= _sendv(s_value_5f_, 2, v_SmallInteger, 11); l_38= _sendv(s_value_5f_, 2, v_SmallInteger, 12); l_39= _sendv(s_value_5f_, 2, v_SmallInteger, 13); l_40= _sendv(s_value_5f_, 2, v_SmallInteger, 14); l_41= _sendv(s_value_5f_, 2, v_SmallInteger, 15); l_42= _sendv(s_value_5f_, 2, v_SmallInteger, 16); l_43= _sendv(s_value_5f_, 2, v_SmallInteger, 17); l_44= _sendv(s_value_5f_, 2, v_SmallInteger, 18); l_45= _sendv(s_value_5f_, 2, v_SmallInteger, 19); l_46= _sendv(s_value_5f_, 2, v_SmallInteger, 20); l_47= _sendv(s_value_5f_, 2, v_SmallInteger, 21); l_48= _sendv(s_value_5f_, 2, v_SmallInteger, 22); l_49= _sendv(s_value_5f_, 2, v_SmallInteger, 23); l_50= _sendv(s_value_5f_, 2, v_SmallInteger, 24); l_51= _sendv(s_value_5f_, 2, v_SmallInteger, 25); l_52= _sendv(s_value_5f_, 2, v_SmallInteger, 26); l_53= _sendv(s_value_5f_, 2, v_SmallInteger, 27); l_54= _sendv(s_value_5f_, 2, v_SmallInteger, 28); l_55= _sendv(s_value_5f_, 2, v_SmallInteger, 29); l_56= _sendv(s_value_5f_, 2, v_SmallInteger, 30); l_57= _sendv(s_value_5f_, 2, v_SmallInteger, 31); l_58= _sendv(s_value_5f_, 2, v_SmallInteger, 32); l_59= _sendv(s_value_5f_, 2, v_SmallInteger, 33); l_60= _sendv(s_value_5f_, 2, v_SmallInteger, 34); l_61= _sendv(s_value_5f_, 2, v_SmallInteger, 35); l_62= _sendv(s_size_5f_value_5f_, 3, v_ImmutableArray, 256, al_62); _libid->method(v_Character, s_digitValue, (_imp_t)Character__digitValue); l_64= _sendv(s_value_5f_, 2, v_Character, 97); l_65= _sendv(s_value_5f_, 2, v_Character, 122); l_66= _sendv(s_value_5f_, 2, v_Character, 65); l_67= _sendv(s_value_5f_, 2, v_Character, 90); _libid->method(v_Character, s_isLetter, (_imp_t)Character__isLetter); l_69= _sendv(s_value_5f_, 2, v_Character, 48); l_70= _sendv(s_value_5f_, 2, v_Character, 57); _libid->method(v_Character, s_isDigit, (_imp_t)Character__isDigit); l_72= _sendv(s_value_5f_, 2, v_SmallInteger, 64); l_73= _sendv(s_value_5f_, 2, v_SmallInteger, 8); l_74= _sendv(s_value_5f_, 2, v_SmallInteger, 1); _libid->method(v_Character, s_printOctalOn_, (_imp_t)Character__printOctalOn_); l_76= _sendv(s_value_5f_, 2, v_SmallInteger, 0); l_77= _sendv(s_value_5f_, 2, v_Character, 43); l_78= _sendv(s_value_5f_, 2, v_SmallInteger, 1); l_79= _sendv(s_value_5f_, 2, v_Character, 45); l_82= _sendv(s_value_5f_, 2, v_Character, 114); l_83= _sendv(s_value_5f_, 2, v_SmallInteger, 2); l_84= _sendv(s_size_5f_value_5f_, 3, v_ImmutableString, 33, "illegal radix in integer constant"); l_85= _sendv(s_size_5f_value_5f_, 3, v_ImmutableString, 35, "illegal digit in integer constant: "); _libid->method(v_Integer, s_readFrom_base_, (_imp_t)Integer__readFrom_base_); _leave(); }