/* generated by Id 1.1 at ,$ */ /* with the command: -I../stage1/ -I../st80 -c ExecNode.st -o ../stage2/ExecNode.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_tag= 0; static oop s_collect_= 0; static oop s_last= 0; static oop s_println_= 0; static oop s_pop= 0; static oop s_hasExports= 0; static oop s_ifTrue_ifFalse_= 0; static oop s_initialiseVariable_= 0; static oop s_initialiseVariable_location_= 0; static oop s_endSequence_= 0; static oop s_declareTemporary_= 0; static oop s_isFree= 0; static oop s_defineTemporary_= 0; static oop s_requireType_at_= 0; static oop s__5fdebugName= 0; static oop s_size_5f_value_5f_= 0; static oop s_declareTemporary_position_= 0; static oop s_function_5f_arity_5f_outer_state_nlr_5f_= 0; static oop s_encodeBody_= 0; static oop s_endBlock= 0; static oop s_beginBlock= 0; static oop s_genDeclaration_= 0; static oop s_genDefinition_= 0; static oop s_name= 0; static oop s_generate_= 0; static oop s_genImplementation_= 0; static oop s_genImplementation_in_= 0; static oop s_genInitialisation_= 0; static oop s_genInitialisation_into_= 0; static oop s_beginSequence_= 0; static oop s_createStateVector_inScope_constructor_= 0; static oop s_stateVectorSize= 0; static oop s_new_5f_= 0; static oop s_declareStack_= 0; static oop s__5fsizeof= 0; static oop s_stackSize= 0; static oop s_defineStack_= 0; static oop s_notNil= 0; static oop s_printIndent_= 0; static oop s_println= 0; static oop s_value_5f_= 0; static oop s__5fimport_= 0; static oop s_do_= 0; static oop s_blocks= 0; static oop s_ifFalse_= 0; static oop s__5fslots= 0; static oop s_ifTrue_= 0; static oop s__2b= 0; static oop s_location= 0; static oop s_isEmpty= 0; static oop s_literals= 0; static oop s_addTo_= 0; static oop s_addExec_= 0; static oop s_encode_= 0; static struct _Selector { const char *name; oop *addr; } _Selectors[]= { { "tag", &s_tag }, { "collect:", &s_collect_ }, { "last", &s_last }, { "println:", &s_println_ }, { "pop", &s_pop }, { "hasExports", &s_hasExports }, { "ifTrue:ifFalse:", &s_ifTrue_ifFalse_ }, { "initialiseVariable:", &s_initialiseVariable_ }, { "initialiseVariable:location:", &s_initialiseVariable_location_ }, { "endSequence:", &s_endSequence_ }, { "declareTemporary:", &s_declareTemporary_ }, { "isFree", &s_isFree }, { "defineTemporary:", &s_defineTemporary_ }, { "requireType:at:", &s_requireType_at_ }, { "_debugName", &s__5fdebugName }, { "size_:value_:", &s_size_5f_value_5f_ }, { "declareTemporary:position:", &s_declareTemporary_position_ }, { "function_:arity_:outer:state:nlr_:", &s_function_5f_arity_5f_outer_state_nlr_5f_ }, { "encodeBody:", &s_encodeBody_ }, { "endBlock", &s_endBlock }, { "beginBlock", &s_beginBlock }, { "genDeclaration:", &s_genDeclaration_ }, { "genDefinition:", &s_genDefinition_ }, { "name", &s_name }, { "generate:", &s_generate_ }, { "genImplementation:", &s_genImplementation_ }, { "genImplementation:in:", &s_genImplementation_in_ }, { "genInitialisation:", &s_genInitialisation_ }, { "genInitialisation:into:", &s_genInitialisation_into_ }, { "beginSequence:", &s_beginSequence_ }, { "createStateVector:inScope:constructor:", &s_createStateVector_inScope_constructor_ }, { "stateVectorSize", &s_stateVectorSize }, { "new_:", &s_new_5f_ }, { "declareStack:", &s_declareStack_ }, { "_sizeof", &s__5fsizeof }, { "stackSize", &s_stackSize }, { "defineStack:", &s_defineStack_ }, { "notNil", &s_notNil }, { "printIndent:", &s_printIndent_ }, { "println", &s_println }, { "value_:", &s_value_5f_ }, { "_import:", &s__5fimport_ }, { "do:", &s_do_ }, { "blocks", &s_blocks }, { "ifFalse:", &s_ifFalse_ }, { "_slots", &s__5fslots }, { "ifTrue:", &s_ifTrue_ }, { "+", &s__2b }, { "location", &s_location }, { "isEmpty", &s_isEmpty }, { "literals", &s_literals }, { "addTo:", &s_addTo_ }, { "addExec:", &s_addExec_ }, { "encode:", &s_encode_ }, { 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_OrderedCollection { struct _vtable *_vtable[0]; oop v_array; oop v_firstIndex; oop v_lastIndex; }; struct t_SequenceNode { struct _vtable *_vtable[0]; oop v_position; oop v_location; oop v_temporaries; oop v_statements; oop v_scope; oop v_literals; oop v_blocks; }; struct t_ExecNode { struct _vtable *_vtable[0]; oop v_position; oop v_location; oop v_temporaries; oop v_statements; oop v_scope; oop v_literals; oop v_blocks; oop v_stateConstructor; }; static oop l_6= 0; static oop l_23= 0; static oop l_24= 0; static oop l_25= 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_ParseNode= 0; static oop v_SequenceNode= 0; static oop v_ExecNode= 0; static size_t ExecNode___5fsizeof(oop _closure, oop v_self) { return sizeof(struct t_ExecNode); } static char *ExecNode___5fdebugName(oop _closure, oop v_self) { return "ExecNode"; } static struct __slotinfo *ExecNode___5fslots(oop _closure, oop v_self) { static struct __slotinfo info[]= { { "position", 0, 4 }, { "location", 4, 4 }, { "temporaries", 8, 4 }, { "statements", 12, 4 }, { "scope", 16, 4 }, { "literals", 20, 4 }, { "blocks", 24, 4 }, { "stateConstructor", 28, 4 }, { 0, 0, 0 } }; return &info[0]; } static struct __methodinfo __info1= { "addTo:", "ExecNode", "/Users/piumarta/src/idst/object/idc/ExecNode.st", 0, 33, 38, 0 }; static oop ExecNode__addTo_(oop v__closure, oop v_stateful_self, oop v_self, oop v_client) { _enter(&__info1); oop _1= 0; oop _2= 0; _line(33); _1= v_client; _2= v_self; _line(35); _1=_sendv(s_addExec_, 2, _1, _2); _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info3= { "[] encode:", "ExecNode", "/Users/piumarta/src/idst/object/idc/ExecNode.st", 0, 38, 55, &__info1 }; static oop b_3(oop v__closure, oop v__self, oop v_tmp) { _enter(&__info3); oop _1= 0; oop _2= 0; oop _3= 0; _line(44); _1= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1]; /* encoder */ _2= v_tmp; _3= ((struct t_ExecNode *)((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[2])->v_position; /* position */ _line(44); _1=_sendv(s_declareTemporary_position_, 3, _1, _2, _3); _leave(); return _1; _leave(); } static struct __methodinfo __info4= { "[] encode:", "ExecNode", "/Users/piumarta/src/idst/object/idc/ExecNode.st", 0, 38, 55, &__info3 }; static oop b_4(oop v__closure, oop v__self, oop v_stmt) { _enter(&__info4); oop _1= 0; oop _2= 0; _line(45); _1= v_stmt; _2= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1]; /* encoder */ _line(46); _1=_sendv(s_encode_, 2, _1, _2); _1= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1]; /* encoder */ _line(47); _1=_sendv(s_pop, 1, _1); _leave(); return _1; _leave(); } static struct __methodinfo __info5= { "[] encode:", "ExecNode", "/Users/piumarta/src/idst/object/idc/ExecNode.st", 0, 38, 55, &__info4 }; static oop b_5(oop v__closure, oop v__self, oop v_block) { _enter(&__info5); oop _1= 0; oop _2= 0; _line(49); _1= v_block; _2= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1]; /* encoder */ _line(49); _1=_sendv(s_encodeBody_, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info2= { "encode:", "ExecNode", "/Users/piumarta/src/idst/object/idc/ExecNode.st", 0, 38, 55, &__info5 }; static oop ExecNode__encode_(oop v__closure, oop v_stateful_self, oop v_self, oop v_encoder) { _enter(&__info2); oop _state1= _sendv(s_new_5f_, 2, v__vector, 11); oop _1= 0; oop _2= 0; oop _3= 0; ((oop *)_state1)[2]= v_stateful_self; ((oop *)_state1)[1]= v_encoder; _line(38); _1= ((oop *)_state1)[1]; /* encoder */ _line(40); _1=_sendv(s_beginBlock, 1, _1); ((struct t_ExecNode *)((oop *)_state1)[2])->v_scope= _1; /* scope */ _1= ((struct t_ExecNode *)((oop *)_state1)[2])->v_temporaries; /* temporaries */ /* Scope('tmp'->ArgumentVariableNode) */ /* Scope('encoder'->ArgumentVariableNode 'position'->SlotVariableNode 'location'->SlotVariableNode 'stateful_self'->ArgumentVariableNode 'temporaries'->SlotVariableNode 'scope'->SlotVariableNode 'stateConstructor'->SlotVariableNode 'self'->ArgumentVariableNode 'literals'->SlotVariableNode 'blocks'->SlotVariableNode 'statements'->SlotVariableNode) */ /* nil */ /* 2 */ /* 1 */ _2= _sendv(s_function_5f_arity_5f_outer_state_nlr_5f_, 6, v_BlockClosure, (oop)b_3, 1, 0, ((oop *)_state1), 0); _line(44); _1=_sendv(s_collect_, 2, _1, _2); ((struct t_ExecNode *)((oop *)_state1)[2])->v_temporaries= _1; /* temporaries */ _1= ((struct t_ExecNode *)((oop *)_state1)[2])->v_statements; /* statements */ /* Scope('stmt'->ArgumentVariableNode) */ /* Scope('encoder'->ArgumentVariableNode 'position'->SlotVariableNode 'location'->SlotVariableNode 'stateful_self'->ArgumentVariableNode 'temporaries'->SlotVariableNode 'scope'->SlotVariableNode 'stateConstructor'->SlotVariableNode 'self'->ArgumentVariableNode 'literals'->SlotVariableNode 'blocks'->SlotVariableNode 'statements'->SlotVariableNode) */ /* nil */ /* 2 */ /* 1 */ _2= _sendv(s_function_5f_arity_5f_outer_state_nlr_5f_, 6, v_BlockClosure, (oop)b_4, 1, 0, ((oop *)_state1), 0); _line(45); _1=_sendv(s_do_, 2, _1, _2); _1= ((struct t_ExecNode *)((oop *)_state1)[2])->v_scope; /* scope */ _line(49); _1=_sendv(s_blocks, 1, _1); /* Scope('block'->ArgumentVariableNode) */ /* Scope('encoder'->ArgumentVariableNode 'position'->SlotVariableNode 'location'->SlotVariableNode 'stateful_self'->ArgumentVariableNode 'temporaries'->SlotVariableNode 'scope'->SlotVariableNode 'stateConstructor'->SlotVariableNode 'self'->ArgumentVariableNode 'literals'->SlotVariableNode 'blocks'->SlotVariableNode 'statements'->SlotVariableNode) */ /* nil */ /* 2 */ /* 1 */ _2= _sendv(s_function_5f_arity_5f_outer_state_nlr_5f_, 6, v_BlockClosure, (oop)b_5, 1, 0, ((oop *)_state1), 0); _line(49); _1=_sendv(s_do_, 2, _1, _2); _1= ((oop *)_state1)[1]; /* encoder */ _line(50); _1=_sendv(s_endBlock, 1, _1); _1= ((oop *)_state1)[1]; /* encoder */ _line(51); _1=_sendv(s_literals, 1, _1); ((struct t_ExecNode *)((oop *)_state1)[2])->v_literals= _1; /* literals */ /* ifTrue: */ _1= 0; _2= ((struct t_ExecNode *)((oop *)_state1)[2])->v_scope; /* scope */ _line(52); _2=_sendv(s_hasExports, 1, _2); if (!_2) goto _l1; { _1= ((oop *)_state1)[1]; /* encoder */ _2= l_6; _3= ((struct t_ExecNode *)((oop *)_state1)[2])->v_position; /* position */ _line(52); _1=_sendv(s_requireType_at_, 3, _1, _2, _3); ((struct t_ExecNode *)((oop *)_state1)[2])->v_stateConstructor= _1; /* stateConstructor */ } _l1:; _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info8= { "[] genDeclaration:", "ExecNode", "/Users/piumarta/src/idst/object/idc/ExecNode.st", 0, 55, 61, &__info2 }; static oop b_8(oop v__closure, oop v__self, oop v_literal) { _enter(&__info8); oop _1= 0; oop _2= 0; _line(57); _1= v_literal; _2= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1]; /* gen */ _line(57); _1=_sendv(s_genDeclaration_, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info9= { "[] genDeclaration:", "ExecNode", "/Users/piumarta/src/idst/object/idc/ExecNode.st", 0, 55, 61, &__info8 }; static oop b_9(oop v__closure, oop v__self, oop v_block) { _enter(&__info9); oop _1= 0; oop _2= 0; _line(58); _1= v_block; _2= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1]; /* gen */ _line(58); _1=_sendv(s_genDeclaration_, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info7= { "genDeclaration:", "ExecNode", "/Users/piumarta/src/idst/object/idc/ExecNode.st", 0, 55, 61, &__info9 }; static oop ExecNode__genDeclaration_(oop v__closure, oop v_stateful_self, oop v_self, oop v_gen) { _enter(&__info7); oop _state1= _sendv(s_new_5f_, 2, v__vector, 2); oop _1= 0; oop _2= 0; ((oop *)_state1)[1]= v_gen; _line(55); _1= ((struct t_ExecNode *)v_stateful_self)->v_literals; /* Scope('literal'->ArgumentVariableNode) */ /* Scope('gen'->ArgumentVariableNode 'position'->SlotVariableNode 'location'->SlotVariableNode 'stateful_self'->ArgumentVariableNode 'temporaries'->SlotVariableNode 'scope'->SlotVariableNode 'stateConstructor'->SlotVariableNode 'self'->ArgumentVariableNode 'literals'->SlotVariableNode 'blocks'->SlotVariableNode 'statements'->SlotVariableNode) */ /* nil */ /* 2 */ /* 1 */ _2= _sendv(s_function_5f_arity_5f_outer_state_nlr_5f_, 6, v_BlockClosure, (oop)b_8, 1, 0, ((oop *)_state1), 0); _line(57); _1=_sendv(s_do_, 2, _1, _2); _1= ((struct t_ExecNode *)v_stateful_self)->v_scope; _line(58); _1=_sendv(s_blocks, 1, _1); /* Scope('block'->ArgumentVariableNode) */ /* Scope('gen'->ArgumentVariableNode 'position'->SlotVariableNode 'location'->SlotVariableNode 'stateful_self'->ArgumentVariableNode 'temporaries'->SlotVariableNode 'scope'->SlotVariableNode 'stateConstructor'->SlotVariableNode 'self'->ArgumentVariableNode 'literals'->SlotVariableNode 'blocks'->SlotVariableNode 'statements'->SlotVariableNode) */ /* nil */ /* 2 */ /* 1 */ _2= _sendv(s_function_5f_arity_5f_outer_state_nlr_5f_, 6, v_BlockClosure, (oop)b_9, 1, 0, ((oop *)_state1), 0); _line(58); _1=_sendv(s_do_, 2, _1, _2); _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info11= { "[] genDefinition:", "ExecNode", "/Users/piumarta/src/idst/object/idc/ExecNode.st", 0, 61, 67, &__info7 }; static oop b_11(oop v__closure, oop v__self, oop v_literal) { _enter(&__info11); oop _1= 0; oop _2= 0; _line(63); _1= v_literal; _2= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1]; /* gen */ _line(63); _1=_sendv(s_genDefinition_, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info12= { "[] genDefinition:", "ExecNode", "/Users/piumarta/src/idst/object/idc/ExecNode.st", 0, 61, 67, &__info11 }; static oop b_12(oop v__closure, oop v__self, oop v_block) { _enter(&__info12); oop _1= 0; oop _2= 0; _line(64); _1= v_block; _2= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1]; /* gen */ _line(64); _1=_sendv(s_genDefinition_, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info10= { "genDefinition:", "ExecNode", "/Users/piumarta/src/idst/object/idc/ExecNode.st", 0, 61, 67, &__info12 }; static oop ExecNode__genDefinition_(oop v__closure, oop v_stateful_self, oop v_self, oop v_gen) { _enter(&__info10); oop _state1= _sendv(s_new_5f_, 2, v__vector, 2); oop _1= 0; oop _2= 0; ((oop *)_state1)[1]= v_gen; _line(61); _1= ((struct t_ExecNode *)v_stateful_self)->v_literals; /* Scope('literal'->ArgumentVariableNode) */ /* Scope('gen'->ArgumentVariableNode 'position'->SlotVariableNode 'location'->SlotVariableNode 'stateful_self'->ArgumentVariableNode 'temporaries'->SlotVariableNode 'scope'->SlotVariableNode 'stateConstructor'->SlotVariableNode 'self'->ArgumentVariableNode 'literals'->SlotVariableNode 'blocks'->SlotVariableNode 'statements'->SlotVariableNode) */ /* nil */ /* 2 */ /* 1 */ _2= _sendv(s_function_5f_arity_5f_outer_state_nlr_5f_, 6, v_BlockClosure, (oop)b_11, 1, 0, ((oop *)_state1), 0); _line(63); _1=_sendv(s_do_, 2, _1, _2); _1= ((struct t_ExecNode *)v_stateful_self)->v_scope; _line(64); _1=_sendv(s_blocks, 1, _1); /* Scope('block'->ArgumentVariableNode) */ /* Scope('gen'->ArgumentVariableNode 'position'->SlotVariableNode 'location'->SlotVariableNode 'stateful_self'->ArgumentVariableNode 'temporaries'->SlotVariableNode 'scope'->SlotVariableNode 'stateConstructor'->SlotVariableNode 'self'->ArgumentVariableNode 'literals'->SlotVariableNode 'blocks'->SlotVariableNode 'statements'->SlotVariableNode) */ /* nil */ /* 2 */ /* 1 */ _2= _sendv(s_function_5f_arity_5f_outer_state_nlr_5f_, 6, v_BlockClosure, (oop)b_12, 1, 0, ((oop *)_state1), 0); _line(64); _1=_sendv(s_do_, 2, _1, _2); _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info14= { "[] genImplementation:", "ExecNode", "/Users/piumarta/src/idst/object/idc/ExecNode.st", 0, 67, 72, &__info10 }; static oop b_14(oop v__closure, oop v__self, oop v_block) { _enter(&__info14); oop _1= 0; oop _2= 0; oop _3= 0; _line(69); _1= v_block; _2= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1]; /* gen */ _3= v_nil; _line(69); _1=_sendv(s_genImplementation_in_, 3, _1, _2, _3); _leave(); return _1; _leave(); } static struct __methodinfo __info13= { "genImplementation:", "ExecNode", "/Users/piumarta/src/idst/object/idc/ExecNode.st", 0, 67, 72, &__info14 }; static oop ExecNode__genImplementation_(oop v__closure, oop v_stateful_self, oop v_self, oop v_gen) { _enter(&__info13); oop _state1= _sendv(s_new_5f_, 2, v__vector, 2); oop _1= 0; oop _2= 0; ((oop *)_state1)[1]= v_gen; _line(67); _1= ((struct t_ExecNode *)v_stateful_self)->v_scope; _line(69); _1=_sendv(s_blocks, 1, _1); /* Scope('block'->ArgumentVariableNode) */ /* Scope('gen'->ArgumentVariableNode 'position'->SlotVariableNode 'location'->SlotVariableNode 'stateful_self'->ArgumentVariableNode 'temporaries'->SlotVariableNode 'scope'->SlotVariableNode 'stateConstructor'->SlotVariableNode 'self'->ArgumentVariableNode 'literals'->SlotVariableNode 'blocks'->SlotVariableNode 'statements'->SlotVariableNode) */ /* nil */ /* 2 */ /* 1 */ _2= _sendv(s_function_5f_arity_5f_outer_state_nlr_5f_, 6, v_BlockClosure, (oop)b_14, 1, 0, ((oop *)_state1), 0); _line(69); _1=_sendv(s_do_, 2, _1, _2); _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info15= { "genInitialisation:", "ExecNode", "/Users/piumarta/src/idst/object/idc/ExecNode.st", 0, 72, 77, &__info13 }; static oop ExecNode__genInitialisation_(oop v__closure, oop v_stateful_self, oop v_self, oop v_gen) { _enter(&__info15); oop _1= 0; oop _2= 0; oop _3= 0; _line(72); _1= v_self; _2= v_gen; _3= v_nil; _line(74); _1=_sendv(s_genInitialisation_into_, 3, _1, _2, _3); _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info17= { "[] genInitialisation:into:", "ExecNode", "/Users/piumarta/src/idst/object/idc/ExecNode.st", 0, 77, 98, &__info15 }; static oop b_17(oop v__closure, oop v__self, oop v_literal) { _enter(&__info17); oop _1= 0; oop _2= 0; _line(79); _1= v_literal; _2= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1]; /* gen */ _line(79); _1=_sendv(s_genInitialisation_, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info18= { "[] genInitialisation:into:", "ExecNode", "/Users/piumarta/src/idst/object/idc/ExecNode.st", 0, 77, 98, &__info17 }; static oop b_18(oop v__closure, oop v__self, oop v_block) { _enter(&__info18); oop _1= 0; oop _2= 0; _line(80); _1= v_block; _2= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1]; /* gen */ _line(80); _1=_sendv(s_genInitialisation_, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info19= { "[] genInitialisation:into:", "ExecNode", "/Users/piumarta/src/idst/object/idc/ExecNode.st", 0, 77, 98, &__info18 }; static oop b_19(oop v__closure, oop v__self, oop v_temp) { _enter(&__info19); oop _1= 0; oop _2= 0; _line(83); /* ifFalse: */ _1= 0; _2= v_temp; _line(83); _2=_sendv(s_isFree, 1, _2); if (_2) goto _l2; { _1= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1]; /* gen */ _2= v_temp; _line(83); _1=_sendv(s_declareTemporary_, 2, _1, _2); } _l2:; _leave(); return _1; _leave(); } static struct __methodinfo __info20= { "[] genInitialisation:into:", "ExecNode", "/Users/piumarta/src/idst/object/idc/ExecNode.st", 0, 77, 98, &__info19 }; static oop b_20(oop v__closure, oop v__self, oop v_temp) { _enter(&__info20); oop _1= 0; oop _2= 0; _line(85); /* ifFalse: */ _1= 0; _2= v_temp; _line(85); _2=_sendv(s_isFree, 1, _2); if (_2) goto _l3; { _1= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1]; /* gen */ _2= v_temp; _line(85); _1=_sendv(s_defineTemporary_, 2, _1, _2); } _l3:; _leave(); return _1; _leave(); } static struct __methodinfo __info21= { "[] genInitialisation:into:", "ExecNode", "/Users/piumarta/src/idst/object/idc/ExecNode.st", 0, 77, 98, &__info20 }; static oop b_21(oop v__closure, oop v__self, oop v_stmt) { _enter(&__info21); oop _1= 0; oop _2= 0; _line(88); _1= v_stmt; _2= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1]; /* gen */ _line(88); _1=_sendv(s_generate_, 2, _1, _2); _leave(); return _1; _leave(); } static struct __methodinfo __info16= { "genInitialisation:into:", "ExecNode", "/Users/piumarta/src/idst/object/idc/ExecNode.st", 0, 77, 98, &__info21 }; static oop ExecNode__genInitialisation_into_(oop v__closure, oop v_stateful_self, oop v_self, oop v_gen, oop v_definitionNode) { _enter(&__info16); oop _state1= _sendv(s_new_5f_, 2, v__vector, 2); oop _1= 0; oop _2= 0; oop _3= 0; oop _4= 0; ((oop *)_state1)[1]= v_gen; _line(77); _1= ((struct t_ExecNode *)v_stateful_self)->v_literals; /* Scope('literal'->ArgumentVariableNode) */ /* Scope('gen'->ArgumentVariableNode 'position'->SlotVariableNode 'location'->SlotVariableNode 'temporaries'->SlotVariableNode 'definitionNode'->ArgumentVariableNode 'stateful_self'->ArgumentVariableNode 'scope'->SlotVariableNode 'self'->ArgumentVariableNode 'literals'->SlotVariableNode 'stateConstructor'->SlotVariableNode 'blocks'->SlotVariableNode 'statements'->SlotVariableNode) */ /* nil */ /* 2 */ /* 1 */ _2= _sendv(s_function_5f_arity_5f_outer_state_nlr_5f_, 6, v_BlockClosure, (oop)b_17, 1, 0, ((oop *)_state1), 0); _line(79); _1=_sendv(s_do_, 2, _1, _2); _1= ((struct t_ExecNode *)v_stateful_self)->v_scope; _line(80); _1=_sendv(s_blocks, 1, _1); /* Scope('block'->ArgumentVariableNode) */ /* Scope('gen'->ArgumentVariableNode 'position'->SlotVariableNode 'location'->SlotVariableNode 'temporaries'->SlotVariableNode 'definitionNode'->ArgumentVariableNode 'stateful_self'->ArgumentVariableNode 'scope'->SlotVariableNode 'self'->ArgumentVariableNode 'literals'->SlotVariableNode 'stateConstructor'->SlotVariableNode 'blocks'->SlotVariableNode 'statements'->SlotVariableNode) */ /* nil */ /* 2 */ /* 1 */ _2= _sendv(s_function_5f_arity_5f_outer_state_nlr_5f_, 6, v_BlockClosure, (oop)b_18, 1, 0, ((oop *)_state1), 0); _line(80); _1=_sendv(s_do_, 2, _1, _2); _1= ((oop *)_state1)[1]; /* gen */ _2= v_self; _line(81); _1=_sendv(s_beginSequence_, 2, _1, _2); /* ifTrue: */ _1= 0; _2= ((struct t_ExecNode *)v_stateful_self)->v_scope; _line(82); _2=_sendv(s_hasExports, 1, _2); if (!_2) goto _l4; { _1= ((oop *)_state1)[1]; /* gen */ _2= ((struct t_ExecNode *)v_stateful_self)->v_scope; _line(82); _2=_sendv(s_stateVectorSize, 1, _2); _3= ((struct t_ExecNode *)v_stateful_self)->v_scope; _line(82); _3=_sendv(s_tag, 1, _3); _4= ((struct t_ExecNode *)v_stateful_self)->v_stateConstructor; _line(82); _1=_sendv(s_createStateVector_inScope_constructor_, 4, _1, _2, _3, _4); } _l4:; _1= ((struct t_ExecNode *)v_stateful_self)->v_temporaries; /* Scope('temp'->ArgumentVariableNode) */ /* Scope('gen'->ArgumentVariableNode 'position'->SlotVariableNode 'location'->SlotVariableNode 'temporaries'->SlotVariableNode 'definitionNode'->ArgumentVariableNode 'stateful_self'->ArgumentVariableNode 'scope'->SlotVariableNode 'self'->ArgumentVariableNode 'literals'->SlotVariableNode 'stateConstructor'->SlotVariableNode 'blocks'->SlotVariableNode 'statements'->SlotVariableNode) */ /* nil */ /* 2 */ /* 1 */ _2= _sendv(s_function_5f_arity_5f_outer_state_nlr_5f_, 6, v_BlockClosure, (oop)b_19, 1, 0, ((oop *)_state1), 0); _line(83); _1=_sendv(s_do_, 2, _1, _2); _1= ((oop *)_state1)[1]; /* gen */ _2= ((struct t_ExecNode *)v_stateful_self)->v_scope; _line(84); _2=_sendv(s_stackSize, 1, _2); _line(84); _1=_sendv(s_declareStack_, 2, _1, _2); _1= ((struct t_ExecNode *)v_stateful_self)->v_temporaries; /* Scope('temp'->ArgumentVariableNode) */ /* Scope('gen'->ArgumentVariableNode 'position'->SlotVariableNode 'location'->SlotVariableNode 'temporaries'->SlotVariableNode 'definitionNode'->ArgumentVariableNode 'stateful_self'->ArgumentVariableNode 'scope'->SlotVariableNode 'self'->ArgumentVariableNode 'literals'->SlotVariableNode 'stateConstructor'->SlotVariableNode 'blocks'->SlotVariableNode 'statements'->SlotVariableNode) */ /* nil */ /* 2 */ /* 1 */ _2= _sendv(s_function_5f_arity_5f_outer_state_nlr_5f_, 6, v_BlockClosure, (oop)b_20, 1, 0, ((oop *)_state1), 0); _line(85); _1=_sendv(s_do_, 2, _1, _2); _1= ((oop *)_state1)[1]; /* gen */ _2= ((struct t_ExecNode *)v_stateful_self)->v_scope; _line(86); _2=_sendv(s_stackSize, 1, _2); _line(86); _1=_sendv(s_defineStack_, 2, _1, _2); _1= ((struct t_ExecNode *)v_stateful_self)->v_statements; /* Scope('stmt'->ArgumentVariableNode) */ /* Scope('gen'->ArgumentVariableNode 'position'->SlotVariableNode 'location'->SlotVariableNode 'temporaries'->SlotVariableNode 'definitionNode'->ArgumentVariableNode 'stateful_self'->ArgumentVariableNode 'scope'->SlotVariableNode 'self'->ArgumentVariableNode 'literals'->SlotVariableNode 'stateConstructor'->SlotVariableNode 'blocks'->SlotVariableNode 'statements'->SlotVariableNode) */ /* nil */ /* 2 */ /* 1 */ _2= _sendv(s_function_5f_arity_5f_outer_state_nlr_5f_, 6, v_BlockClosure, (oop)b_21, 1, 0, ((oop *)_state1), 0); _line(88); _1=_sendv(s_do_, 2, _1, _2); /* ifTrue: */ _1= 0; _2= v_definitionNode; _line(90); _2=_sendv(s_notNil, 1, _2); if (!_2) goto _l5; { /* ifTrue:ifFalse: */ _1= ((struct t_ExecNode *)v_stateful_self)->v_statements; _line(92); _1=_sendv(s_isEmpty, 1, _1); if (!_1) goto _l6; { _1= ((oop *)_state1)[1]; /* gen */ _2= v_definitionNode; _line(93); _2=_sendv(s_name, 1, _2); _line(93); _1=_sendv(s_initialiseVariable_, 2, _1, _2); } goto _l7; _l6:; { _1= ((oop *)_state1)[1]; /* gen */ _2= v_definitionNode; _line(94); _2=_sendv(s_name, 1, _2); _3= ((struct t_ExecNode *)v_stateful_self)->v_statements; _line(94); _3=_sendv(s_last, 1, _3); _line(94); _3=_sendv(s_location, 1, _3); _line(94); _1=_sendv(s_initialiseVariable_location_, 3, _1, _2, _3); } _l7:; } _l5:; _1= ((oop *)_state1)[1]; /* gen */ _2= v_self; _line(95); _1=_sendv(s_endSequence_, 2, _1, _2); _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info22= { "println:", "ExecNode", "/Users/piumarta/src/idst/object/idc/ExecNode.st", 0, 98, 105, &__info16 }; static oop ExecNode__println_(oop v__closure, oop v_stateful_self, oop v_self, oop v_indent) { _enter(&__info22); oop _1= 0; oop _2= 0; oop _3= 0; _line(98); _1= v_self; _2= v_indent; _line(100); _1=_sendv(s_printIndent_, 2, _1, _2); _1= l_23; _line(101); _1=_sendv(s_println, 1, _1); _1= v_self; _2= v_indent; _3= l_24; { 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(102); _1=_superv(v_SequenceNode, s_println_, 2, _1, _2); _1= l_25; _line(103); _1=_sendv(s_println, 1, _1); _1= v_self; _leave(); return _1; _leave(); } static struct __methodinfo __info= { "__id__init__", "", "ExecNode.st", 0, 0, 0, &__info22 }; void __id__init__ExecNode(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, "SequenceNode", "__id__init__SequenceNode"); 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_ParseNode= _libid->import("ParseNode"); v_SequenceNode= _libid->import("SequenceNode"); v_ExecNode= _libid->proto2(v_SequenceNode, ExecNode___5fsizeof(0, 0)); _libid->method(v_ExecNode, s__5fsizeof, (_imp_t)ExecNode___5fsizeof); _libid->method(v_ExecNode, s__5fdebugName, (_imp_t)ExecNode___5fdebugName); _libid->method(v_ExecNode, s__5fslots, (_imp_t)ExecNode___5fslots); _libid->export("ExecNode", v_ExecNode); _libid->method(v_ExecNode, s_addTo_, (_imp_t)ExecNode__addTo_); l_6= _sendv(s_size_5f_value_5f_, 3, v_ImmutableString, 6, "vector"); _libid->method(v_ExecNode, s_encode_, (_imp_t)ExecNode__encode_); _libid->method(v_ExecNode, s_genDeclaration_, (_imp_t)ExecNode__genDeclaration_); _libid->method(v_ExecNode, s_genDefinition_, (_imp_t)ExecNode__genDefinition_); _libid->method(v_ExecNode, s_genImplementation_, (_imp_t)ExecNode__genImplementation_); _libid->method(v_ExecNode, s_genInitialisation_, (_imp_t)ExecNode__genInitialisation_); _libid->method(v_ExecNode, s_genInitialisation_into_, (_imp_t)ExecNode__genInitialisation_into_); l_23= _sendv(s_size_5f_value_5f_, 3, v_ImmutableString, 6, "Exec ["); l_24= _sendv(s_value_5f_, 2, v_SmallInteger, 1); l_25= _sendv(s_size_5f_value_5f_, 3, v_ImmutableString, 1, "]"); _libid->method(v_ExecNode, s_println_, (_imp_t)ExecNode__println_); _leave(); }