/* generated by Id 1.1 at ,$ */ /* with the command: -I../stage1/ -I../st80 -c ReturnNode.st -o ../stage2/ReturnNode.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_noteNLR= 0; static oop s_value_5f_= 0; static oop s__5fimport_= 0; static oop s_println_= 0; static oop s__5fslots= 0; static oop s_ifTrue_= 0; static oop s_scope= 0; static oop s__2b= 0; static oop s_genReturn_= 0; static oop s_hasVarargs= 0; static oop s_location= 0; static oop s_withValue_position_= 0; static oop s_withPosition_= 0; static oop s_isReturnNode= 0; static oop s__5fdebugName= 0; static oop s_endVariadic= 0; static oop s_debugReturn_= 0; static oop s__3e= 0; static oop s_ifTrue_ifFalse_= 0; static oop s_genNonLocalReturn_= 0; static oop s_printIndent_= 0; static oop s_size_5f_value_5f_= 0; static oop s_encode_= 0; static oop s_generate_= 0; static oop s__5fsizeof= 0; static oop s_println= 0; static oop s_level= 0; static struct _Selector { const char *name; oop *addr; } _Selectors[]= { { "noteNLR", &s_noteNLR }, { "value_:", &s_value_5f_ }, { "_import:", &s__5fimport_ }, { "println:", &s_println_ }, { "_slots", &s__5fslots }, { "ifTrue:", &s_ifTrue_ }, { "scope", &s_scope }, { "+", &s__2b }, { "genReturn:", &s_genReturn_ }, { "hasVarargs", &s_hasVarargs }, { "location", &s_location }, { "withValue:position:", &s_withValue_position_ }, { "withPosition:", &s_withPosition_ }, { "isReturnNode", &s_isReturnNode }, { "_debugName", &s__5fdebugName }, { "endVariadic", &s_endVariadic }, { "debugReturn:", &s_debugReturn_ }, { ">", &s__3e }, { "ifTrue:ifFalse:", &s_ifTrue_ifFalse_ }, { "genNonLocalReturn:", &s_genNonLocalReturn_ }, { "printIndent:", &s_printIndent_ }, { "size_:value_:", &s_size_5f_value_5f_ }, { "encode:", &s_encode_ }, { "generate:", &s_generate_ }, { "_sizeof", &s__5fsizeof }, { "println", &s_println }, { "level", &s_level }, { 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_ParseNode { struct _vtable *_vtable[0]; oop v_position; oop v_location; }; struct t_ReturnNode { struct _vtable *_vtable[0]; oop v_position; oop v_location; oop v_value; oop v_nonLocal; oop v_variadic; }; static oop l_5= 0; static oop l_8= 0; static oop l_9= 0; struct t_LocalReturnNode { struct _vtable *_vtable[0]; oop v_position; oop v_location; oop v_value; oop v_nonLocal; oop v_variadic; }; static oop l_12= 0; static oop l_13= 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_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_true= 0; static oop v_false= 0; static oop v_ParseNode= 0; static oop v_ReturnNode= 0; static oop v_LocalReturnNode= 0; static size_t ReturnNode___5fsizeof(oop _closure, oop v_self) { return sizeof(struct t_ReturnNode); } static char *ReturnNode___5fdebugName(oop _closure, oop v_self) { return "ReturnNode"; } static struct __slotinfo *ReturnNode___5fslots(oop _closure, oop v_self) { static struct __slotinfo info[]= { { "position", 0, 4 }, { "location", 4, 4 }, { "value", 8, 4 }, { "nonLocal", 12, 4 }, { "variadic", 16, 4 }, { 0, 0, 0 } }; return &info[0]; } static struct __methodinfo __info1= { "isReturnNode", "ParseNode", "/Users/piumarta/src/idst/object/idc/ReturnNode.st", 0, 24, 25, 0 }; static oop ParseNode__isReturnNode(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info1); oop _1= 0; _line(24); _1= v_false; _leave(); return _1; _leave(); } static struct __methodinfo __info2= { "isReturnNode", "ReturnNode", "/Users/piumarta/src/idst/object/idc/ReturnNode.st", 0, 25, 27, &__info1 }; static oop ReturnNode__isReturnNode(oop v__closure, oop v_stateful_self, oop v_self) { _enter(&__info2); oop _1= 0; _line(25); _1= v_true; _leave(); return _1; _leave(); } static struct __methodinfo __info3= { "withValue:position:", "ReturnNode", "/Users/piumarta/src/idst/object/idc/ReturnNode.st", 0, 27, 35, &__info2 }; static oop ReturnNode__withValue_position_(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNode, oop v_aPosition) { _enter(&__info3); oop _1= 0; oop _2= 0; _line(27); _1= v_self; _2= v_aPosition; _line(29); _1=_sendv(s_withPosition_, 2, _1, _2); v_self= _1; v_stateful_self= _1; _1= v_aNode; ((struct t_ReturnNode *)v_stateful_self)->v_value= _1; _1= v_false; ((struct t_ReturnNode *)v_stateful_self)->v_nonLocal= _1; _1= v_false; ((struct t_ReturnNode *)v_stateful_self)->v_variadic= _1; _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info4= { "encode:", "ReturnNode", "/Users/piumarta/src/idst/object/idc/ReturnNode.st", 0, 35, 43, &__info3 }; static oop ReturnNode__encode_(oop v__closure, oop v_stateful_self, oop v_self, oop v_encoder) { _enter(&__info4); oop _1= 0; oop _2= 0; oop _3= 0; _line(35); _1= ((struct t_ReturnNode *)v_stateful_self)->v_value; _2= v_encoder; _line(37); _sendv(s_encode_, 2, _1, _2); _1=_sendv(s_location, 1, _1); ((struct t_ReturnNode *)v_stateful_self)->v_location= _1; /* ifTrue: */ _1= 0; _2= v_encoder; _line(39); _2=_sendv(s_level, 1, _2); _3= l_5; if (1 & (long)_2) { _2= (((long)_2 > (long)_3) ? v_true : v_false); } else _2= _sendv(s__3e, 2, _2, _3); ((struct t_ReturnNode *)v_stateful_self)->v_nonLocal= _2; if (!_2) goto _l1; { _1= v_encoder; _line(39); _1=_sendv(s_noteNLR, 1, _1); } _l1:; _1= v_encoder; _line(40); _1=_sendv(s_scope, 1, _1); _line(40); _1=_sendv(s_hasVarargs, 1, _1); ((struct t_ReturnNode *)v_stateful_self)->v_variadic= _1; _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info6= { "generate:", "ReturnNode", "/Users/piumarta/src/idst/object/idc/ReturnNode.st", 0, 43, 51, &__info4 }; static oop ReturnNode__generate_(oop v__closure, oop v_stateful_self, oop v_self, oop v_gen) { _enter(&__info6); oop _1= 0; oop _2= 0; _line(43); _1= ((struct t_ReturnNode *)v_stateful_self)->v_value; _2= v_gen; _line(45); _1=_sendv(s_generate_, 2, _1, _2); /* ifTrue: */ _1= 0; _2= ((struct t_ReturnNode *)v_stateful_self)->v_variadic; if (!_2) goto _l2; { _1= v_gen; _line(46); _1=_sendv(s_endVariadic, 1, _1); } _l2:; _1= v_gen; _2= ((struct t_ReturnNode *)v_stateful_self)->v_position; _line(47); _1=_sendv(s_debugReturn_, 2, _1, _2); /* ifTrue:ifFalse: */ _1= ((struct t_ReturnNode *)v_stateful_self)->v_nonLocal; if (!_1) goto _l3; { _1= v_gen; _2= ((struct t_ReturnNode *)v_stateful_self)->v_value; _line(48); _1=_sendv(s_genNonLocalReturn_, 2, _1, _2); } goto _l4; _l3:; { _1= v_gen; _2= ((struct t_ReturnNode *)v_stateful_self)->v_value; _line(48); _1=_sendv(s_genReturn_, 2, _1, _2); } _l4:; _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info7= { "println:", "ReturnNode", "/Users/piumarta/src/idst/object/idc/ReturnNode.st", 0, 51, 59, &__info6 }; static oop ReturnNode__println_(oop v__closure, oop v_stateful_self, oop v_self, oop v_indent) { _enter(&__info7); oop _1= 0; oop _2= 0; oop _3= 0; _line(51); _1= v_self; _2= v_indent; _line(53); _1=_sendv(s_printIndent_, 2, _1, _2); _1= l_8; _line(54); _1=_sendv(s_println, 1, _1); _1= ((struct t_ReturnNode *)v_stateful_self)->v_value; _2= v_indent; _3= l_9; { 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(55); _1=_sendv(s_println_, 2, _1, _2); _1= v_self; _leave(); return _1; _leave(); } static size_t LocalReturnNode___5fsizeof(oop _closure, oop v_self) { return sizeof(struct t_LocalReturnNode); } static char *LocalReturnNode___5fdebugName(oop _closure, oop v_self) { return "LocalReturnNode"; } static struct __slotinfo *LocalReturnNode___5fslots(oop _closure, oop v_self) { static struct __slotinfo info[]= { { "position", 0, 4 }, { "location", 4, 4 }, { "value", 8, 4 }, { "nonLocal", 12, 4 }, { "variadic", 16, 4 }, { 0, 0, 0 } }; return &info[0]; } static struct __methodinfo __info10= { "encode:", "LocalReturnNode", "/Users/piumarta/src/idst/object/idc/ReturnNode.st", 0, 63, 69, &__info7 }; static oop LocalReturnNode__encode_(oop v__closure, oop v_stateful_self, oop v_self, oop v_encoder) { _enter(&__info10); oop _1= 0; oop _2= 0; _line(63); _1= ((struct t_LocalReturnNode *)v_stateful_self)->v_value; _2= v_encoder; _line(65); _1=_sendv(s_encode_, 2, _1, _2); ((struct t_LocalReturnNode *)v_stateful_self)->v_value= _1; _1= v_encoder; _line(66); _1=_sendv(s_scope, 1, _1); _line(66); _1=_sendv(s_hasVarargs, 1, _1); ((struct t_LocalReturnNode *)v_stateful_self)->v_variadic= _1; _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info11= { "println:", "LocalReturnNode", "/Users/piumarta/src/idst/object/idc/ReturnNode.st", 0, 69, 75, &__info10 }; static oop LocalReturnNode__println_(oop v__closure, oop v_stateful_self, oop v_self, oop v_indent) { _enter(&__info11); oop _1= 0; oop _2= 0; oop _3= 0; _line(69); _1= v_self; _2= v_indent; _line(71); _1=_sendv(s_printIndent_, 2, _1, _2); _1= l_12; _line(72); _1=_sendv(s_println, 1, _1); _1= ((struct t_LocalReturnNode *)v_stateful_self)->v_value; _2= v_indent; _3= l_13; { 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(73); _1=_sendv(s_println_, 2, _1, _2); _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info= { "__id__init__", "", "ReturnNode.st", 0, 0, 0, &__info11 }; void __id__init__ReturnNode(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, "ParseNode", "__id__init__ParseNode"); 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_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_true= _libid->import("true"); v_false= _libid->import("false"); v_ParseNode= _libid->import("ParseNode"); v_ReturnNode= _libid->proto2(v_ParseNode, ReturnNode___5fsizeof(0, 0)); _libid->method(v_ReturnNode, s__5fsizeof, (_imp_t)ReturnNode___5fsizeof); _libid->method(v_ReturnNode, s__5fdebugName, (_imp_t)ReturnNode___5fdebugName); _libid->method(v_ReturnNode, s__5fslots, (_imp_t)ReturnNode___5fslots); _libid->export("ReturnNode", v_ReturnNode); _libid->method(v_ParseNode, s_isReturnNode, (_imp_t)ParseNode__isReturnNode); _libid->method(v_ReturnNode, s_isReturnNode, (_imp_t)ReturnNode__isReturnNode); _libid->method(v_ReturnNode, s_withValue_position_, (_imp_t)ReturnNode__withValue_position_); l_5= _sendv(s_value_5f_, 2, v_SmallInteger, 1); _libid->method(v_ReturnNode, s_encode_, (_imp_t)ReturnNode__encode_); _libid->method(v_ReturnNode, s_generate_, (_imp_t)ReturnNode__generate_); l_8= _sendv(s_size_5f_value_5f_, 3, v_ImmutableString, 6, "Return"); l_9= _sendv(s_value_5f_, 2, v_SmallInteger, 1); _libid->method(v_ReturnNode, s_println_, (_imp_t)ReturnNode__println_); v_LocalReturnNode= _libid->proto2(v_ReturnNode, LocalReturnNode___5fsizeof(0, 0)); _libid->method(v_LocalReturnNode, s__5fsizeof, (_imp_t)LocalReturnNode___5fsizeof); _libid->method(v_LocalReturnNode, s__5fdebugName, (_imp_t)LocalReturnNode___5fdebugName); _libid->method(v_LocalReturnNode, s__5fslots, (_imp_t)LocalReturnNode___5fslots); _libid->export("LocalReturnNode", v_LocalReturnNode); _libid->method(v_LocalReturnNode, s_encode_, (_imp_t)LocalReturnNode__encode_); l_12= _sendv(s_size_5f_value_5f_, 3, v_ImmutableString, 11, "LocalReturn"); l_13= _sendv(s_value_5f_, 2, v_SmallInteger, 1); _libid->method(v_LocalReturnNode, s_println_, (_imp_t)LocalReturnNode__println_); _leave(); }