#include "M3Runtime.h" typedef struct { int tc; char* str; int len; } TXT; PRIVATE TXT txt1 = { 3, "FIRST", 6}; PRIVATE TXT txt2 = { 3, "argument cannot be an open array type", 38}; PRIVATE TXT txt3 = { 3, "argument must be a type or array", 33}; PRIVATE TXT txt4 = { 3, "empty enumeration type", 23}; PRIVATE TXT txt5 = { 3, "argument must be an ordinal type, array type or array", 54 }; PRIVATE TXT txt6 = { 3, "@ = @;\012", 8}; #line 14 "../Interfaces/Expr.i3" #define t5 ADDRESS #define t74 void #define t67 ADDRESS typedef struct { TYPE self; int private; } t67_methods; #define t67_msize (sizeof (t67_methods)) typedef struct { ADDRESS methods; } t67_fields; #define t67_size (sizeof (t67_fields)) #define TC67 TC_UNTRACED_ROOT IMPORT TYPE TC_UNTRACED_ROOT; IMPORT char VS_UNTRACED_ROOT__3e0964513fd6da20; #line 16 "../Interfaces/M3.i3" #define t4 ADDRESS #define TC4 TC_M3__Expr IMPORT TYPE TC_M3__Expr; #line 16 IMPORT char VS_M3__Expr__8ae39aaa2d432477; #line 37 ".ROOT/.boots/corelib/Interfaces/Text.i3" typedef struct { char* elts; int size[1]; } t69; #line 14 "../Interfaces/Expr.i3" #define t40 t69 #define TC5 TC_Expr__List IMPORT TYPE TC_Expr__List; #line 14 IMPORT char VS_Expr__List__3f87eceb2b9a246a; #line 17 "../Interfaces/Scope.i3" #define t30 ADDRESS #define t15 ADDRESS #define TC15 TC_M3__Value IMPORT TYPE TC_M3__Value; #line 15 "../Interfaces/M3.i3" IMPORT char VS_M3__Value__6f64cf9c2cae25fb; #line 17 "../Interfaces/Scope.i3" #define t33 t69 #define TC30 TC_Scope__ValueList IMPORT TYPE TC_Scope__ValueList; #line 17 IMPORT char VS_Scope__ValueList__64bf053e22e4e53c; #define t35 ADDRESS typedef int t2; #define TC35 TC_ADDRESS IMPORT TYPE TC_ADDRESS; IMPORT char VS_ADDRESS__30f7308738738b44; #line 16 "../Interfaces/Type.i3" #define t37 ADDRESS #define t44 t69 #define TC37 TC_Type__Map IMPORT TYPE TC_Type__Map; #line 16 IMPORT char VS_Type__Map__41dd9f4b33104fce; #define t42 ADDRESS #define t3 ADDRESS #define TC3 TC_M3__Type IMPORT TYPE TC_M3__Type; #line 18 "../Interfaces/M3.i3" IMPORT char VS_M3__Type__4d87bc25311f81d2; #line 17 "../Interfaces/Type.i3" typedef struct { t42 _next; t3 _type; } t43; #define TC42 TC_Type__List IMPORT TYPE TC_Type__List; #line 17 IMPORT char VS_Type__List__5791758e343becc1; #define t56 ADDRESS #define TC56 TC_REFANY IMPORT TYPE TC_REFANY; IMPORT char VS_REFANY__4b8748e831fc107a; #define t75 ADDRESS #define TC75 TC_NULL IMPORT TYPE TC_NULL; IMPORT char VS_NULL__fb50c7d53bec30dc; #line 106 "First.m3" typedef t74 (*t1)(); #line 90 typedef t4 (*t6)(); #line 19 "../Interfaces/M3.i3" #define t7 ADDRESS #define TC7 TC_M3__Temp IMPORT TYPE TC_M3__Temp; #line 19 IMPORT char VS_M3__Temp__450b691937f03dae; #line 77 "First.m3" typedef t7 (*t8)(); #define t9 ADDRESS #define TC9 TC_TEXT IMPORT TYPE TC_TEXT; IMPORT char VS_TEXT__b7a92447326386f5; #define t9_MapProc TC_TEXT->mapProc typedef t3 (*t10)(); #line 17 "../Interfaces/CallExpr.i3" #define t11 ADDRESS #define TC11 TC_CallExpr__MethodList IMPORT TYPE TC_CallExpr__MethodList; #line 17 IMPORT char VS_CallExpr__MethodList__7e87c2d720444b71; typedef unsigned char t12; #line 22 "../Interfaces/IntegerExpr.i3" typedef t12 (*t13)(); #line 14 "../Interfaces/M3.i3" #define t14 ADDRESS #define TC14 TC_M3__Scope IMPORT TYPE TC_M3__Scope; #line 14 IMPORT char VS_M3__Scope__6e6d8848308d8a2d; #line 13 "../Interfaces/String.i3" #define t16 ADDRESS #define TC16 TC_String__T IMPORT TYPE TC_String__T; #line 13 IMPORT char VS_String__T__3a6c7dc12615e4ee; #line 15 "../Interfaces/Token.i3" typedef unsigned char t46; #line 45 typedef struct { int elts[4]; } t17; #line 29 "../Interfaces/ArrayType.i3" typedef t2 (*t18)(); #line 14 "../Interfaces/String.i3" typedef struct { t16 _module; t16 _item; } t19; #line 27 "../Interfaces/Emit.i3" typedef signed_char t20; #line 63 typedef t20 (*t21)(); #line 19 "../Interfaces/String.i3" typedef signed_char t52; #line 65 "../Interfaces/Token.i3" #define t45 t69 typedef struct { t16 elts[100]; } t53; #line 17 "../Interfaces/String.i3" typedef struct { t2 _top; t53 _stk; } t22; #line 16 "../Interfaces/Variable.i3" #define t23 ADDRESS #define TC23 TC_Variable__T IMPORT TYPE TC_Variable__T; #line 16 IMPORT char VS_Variable__T__be7ead4a3afd8be5; typedef double t24; typedef unsigned char t25; #line 37 "../Interfaces/Procedure.i3" #define t26 t69 #define t27 ADDRESS #define TC27 TC_Procedure__T IMPORT TYPE TC_Procedure__T; #line 15 IMPORT char VS_Procedure__T__be7ead4a3afd8be5; #line 14 "../Interfaces/Decl.i3" typedef struct { t16 _alias; t12 _isExternal; t12 _isInline; t12 _isUnused; t12 _isObsolete; } t28; #line 24 "../Interfaces/Variable.i3" typedef t23 (*t29)(); #line 38 "../Interfaces/Scope.i3" typedef t15 (*t31)(); #line 31 typedef t14 (*t32)(); #line 27 "../Interfaces/CallExpr.i3" typedef t11 (*t34)(); #define t57 ADDRESS typedef struct { TYPE self; int private; } t57_methods; #define t57_msize (sizeof (t57_methods)) typedef struct { ADDRESS methods; } t57_fields; #define t57_size (sizeof (t57_fields)) #define TC57 TC_ROOT IMPORT TYPE TC_ROOT; IMPORT char VS_ROOT__349f58f628be0ac6; #define t57_MapProc TC_ROOT->mapProc #define t36 ADDRESS #define TC36 TC_Wr__T IMPORT TYPE TC_Wr__T; #line 90 ".ROOT/.boots/corelib/Interfaces/Wr.i3" IMPORT char VS_Wr__T__2555b70b3f7780b1; #define t36_MapProc TC_Wr__T->mapProc typedef unsigned char t38; #line 40 "../Interfaces/Value.i3" typedef t38 (*t39)(); #line 121 "../Interfaces/Type.i3" typedef t37 (*t41)(); #line 65 "../Interfaces/Token.i3" typedef struct { t16 elts[97]; } t47; typedef int t48; #line 37 "../Interfaces/String.i3" typedef t9 (*t49)(); #line 34 typedef t16 (*t50)(); #line 28 #define t51 t69 typedef t48 (*t54)(); #line 91 ".ROOT/.boots/corelib/Interfaces/Wr.i3" typedef unsigned char t55; #line 15 ".ROOT/.boots/corelib/Interfaces/Thread.i3" #define t58 ADDRESS #define TC58 TC_Thread__T IMPORT TYPE TC_Thread__T; #line 15 IMPORT char VS_Thread__T__2555b70b3f7780b1; #define t58_MapProc TC_Thread__T->mapProc typedef t56 (*t59)(); #define t60 ADDRESS #define TC60 TC_Thread__Condition IMPORT TYPE TC_Thread__Condition; #line 21 IMPORT char VS_Thread__Condition__26d5968239e08f4e; #define t60_MapProc TC_Thread__Condition->mapProc #define t61 ADDRESS #define TC61 TC_MUTEX IMPORT TYPE TC_MUTEX; IMPORT char VS_MUTEX__1f9d4e89391ab815; #define t61_MapProc TC_MUTEX->mapProc typedef t58 (*t62)(); #line 23 #define t63 ADDRESS #line 23 typedef struct { t59 _apply; } t63_methods; #define t63_msize (sizeof (t63_methods)) typedef struct { #line 23 int filler; } t63_fields; #define t63_size (sizeof (t63_fields)) #define TC63 TC_Thread__Closure IMPORT TYPE TC_Thread__Closure; #line 23 IMPORT char VS_Thread__Closure__7fb5c6232c5a658a; #define t63_MapProc TC_Thread__Closure->mapProc typedef t60 (*t64)(); typedef t61 (*t65)(); #line 28 #define t66 ADDRESS #line 28 typedef struct { int filler; } t66_methods; #define t66_msize (sizeof (t66_methods)) typedef struct { #line 28 t48 _stackSize; } t66_fields; #define t66_size (sizeof (t66_fields)) #define TC66 TC_Thread__SizedClosure IMPORT TYPE TC_Thread__SizedClosure; #line 28 IMPORT char VS_Thread__SizedClosure__8a46717d2eae7b07; #define t66_MapProc TC_Thread__SizedClosure->mapProc #define t68 ADDRESS #define TC68 TC_M3__Stmt IMPORT TYPE TC_M3__Stmt; #line 17 "../Interfaces/M3.i3" IMPORT char VS_M3__Stmt__376b307627fc1f2f; #line 67 ".ROOT/.boots/corelib/Interfaces/Text.i3" typedef signed_char t70; typedef t70 (*t71)(); #line 23 typedef t25 (*t72)(); typedef CLOSURE t73; typedef float t76; #line 9 "First.m3" IMPORT INITLINK* Text__init; IMPORT INITLINK* Temp__init; IMPORT INITLINK* IntegerExpr__init; IMPORT INITLINK* EnumType__init; #line 9 IMPORT INITLINK* Int__init; IMPORT INITLINK* TypeExpr__init; IMPORT INITLINK* ArrayType__init; IMPORT INITLINK* Error__init; #line 9 IMPORT INITLINK* Emit__init; IMPORT INITLINK* Procedure__init; IMPORT INITLINK* Type__init; IMPORT INITLINK* Expr__init; IMPORT INITLINK* CallExpr__init; #line 9 IMPORT INITLINK* First__init; IMPORT TYPE TC_Text__T; IMPORT char VS_Text__T__fc4b369f3ab271fd; IMPORT TYPE TC_Temp__T; #line 9 IMPORT char VS_Temp__T__3a6c7dc12615e4ee; IMPORT t7 _Temp__AllocEmpty (); IMPORT char VS_Temp__AllocEmpty__20296f6d2a78c948; #line 9 IMPORT t4 _IntegerExpr__New (); IMPORT char VS_IntegerExpr__New__864172512ee81acd; IMPORT t12 _EnumType__Is (); IMPORT char VS_EnumType__Is__2cef67ea2861a0e7; #line 9 IMPORT t3 _Int__T; IMPORT char VS_Int__T__1062912139372387; IMPORT t12 _TypeExpr__Split (); IMPORT char VS_TypeExpr__Split__f3b91e1b2487bd66; #line 9 IMPORT t12 _ArrayType__Split (); IMPORT char VS_ArrayType__Split__b3402f88270f8053; IMPORT t74 _Error__ID (); IMPORT char VS_Error__ID__b86d646b21a8cf59; #line 9 IMPORT char VS_Emit__MaxStream__cf0a0e8934c9c9f3; IMPORT TYPE TC_Emit__Format; IMPORT char VS_Emit__Format__bc4a2b083b93bbd7; #line 9 IMPORT t74 _Emit__OpTI (); IMPORT char VS_Emit__OpTI__af828b1c28578815; IMPORT t74 _Procedure__Define (); IMPORT char VS_Procedure__Define__23155a563959ddb7; #line 9 IMPORT TYPE TC_Type__T; IMPORT char VS_Type__T__2446b70b3f7780a5; IMPORT t2 _Type__Number (); IMPORT char VS_Type__Number__f5ca10923ed3cf22; #line 9 IMPORT t74 _Type__GetBounds (); IMPORT char VS_Type__GetBounds__9a241b2b3c98ad98; IMPORT TYPE TC_Expr__T; IMPORT char VS_Expr__T__2446b70b3f7780a5; #line 9 IMPORT t3 _Expr__TypeOf (); IMPORT char VS_Expr__TypeOf__fef0a11b388c64fa; IMPORT t11 _CallExpr__NewMethodList (); IMPORT char VS_CallExpr__NewMethodList__1e86caa631267427; #line 9 IMPORT t12 _CallExpr__IsNever (); IMPORT char VS_CallExpr__IsNever__ed0ffc703e490927; EXPORT t74 _First__Initialize (); #line 9 EXPORT char VS_First__Initialize__aa48053130d2827d = '\0'; EXPORT t3 _First__DoBind (); EXPORT char VS_First__DoBind__beb1cf943080cb30 = '\0'; #line 9 EXPORT t74 _First__DoCheck (); EXPORT char VS_First__DoCheck__58418e952d2534ed = '\0'; PRIVATE t11 _First__Z; PRIVATE t3 _First__Bind (); #line 9 PRIVATE t74 _First__Check (); PRIVATE t7 _First__Compile (); PRIVATE t4 _First__Fold (); #line 18 "First.m3" PRIVATE t3 _First__Bind (_proc, _args) t4 _proc; t5 _args; { t3 z2; #line 18 "First.m3" { auto t3 __result; { CHECKSTACKOVERFLOW; z2 = _First__DoBind (_args); __result = z2; return __result; } } }; #line 23 "First.m3" EXPORT t3 _First__DoBind (_args) t5 _args; { t5 z1; t2 z3; t2 z4; t3 z2; t12 z5; #line 23 "First.m3" { auto t4 _e; auto t3 _t; auto t3 _index; auto t3 _element; auto t3 __result; { CHECKSTACKOVERFLOW; NILCHECKB (z1 = _args); { register t69* array = & (*((t40*) z1)); z4 = 0 ; if (z4 >= (array->size[0])) RANGEFAULT; #line 26 z3 = (int)(array->elts + (z4 * 4)); }; _e = (*(t4*)z3); z2 = _Expr__TypeOf (_e); _t = z2; z5 = _ArrayType__Split (_t, &_index, &_element); if (z5) { z5 = (_index == 0); if (z5) { _index = _Int__T; goto if_2_end; }; if_2_end: /**/; goto if_1_end; }; z5 = _TypeExpr__Split (_e, &_t); #line 29 if (z5) { z5 = _ArrayType__Split (_t, &_index, &_element); if (z5) { z5 = (_index == 0); if (z5) { _index = _Int__T; goto if_4_end; }; if_4_end: /**/; goto if_3_end; }; _index = _t; if_3_end: /**/; goto if_1_end; }; _index = _Int__T; if_1_end: /**/; __result = _index; return __result; } } }; #line 42 "First.m3" PRIVATE t74 _First__Check (_proc, _args) t4 _proc; t5 * _args; { #line 42 "First.m3" { { CHECKSTACKOVERFLOW; _First__DoCheck (((ADDRESS)(& txt1.str)), (*_args)); } } }; #line 47 "First.m3" EXPORT t74 _First__DoCheck (_name, _args) t9 _name; t5 _args; { t5 z1; t2 z3; t2 z4; t3 z2; t12 z5; #line 47 "First.m3" { auto t4 _e; auto t3 _t; auto t3 _index; auto t3 _element; { CHECKSTACKOVERFLOW; NILCHECKB (z1 = _args); { register t69* array = & (*((t40*) z1)); z4 = 0 ; if (z4 >= (array->size[0])) RANGEFAULT; #line 50 z3 = (int)(array->elts + (z4 * 4)); }; _e = (*(t4*)z3); z2 = _Expr__TypeOf (_e); _t = z2; z5 = _ArrayType__Split (_t, &_index, &_element); if (z5) { z5 = (_index == 0); if (z5) { _index = _Int__T; goto if_6_end; }; if_6_end: /**/; goto if_5_end; }; z5 = _TypeExpr__Split (_e, &_t); #line 53 if (z5) { z5 = _ArrayType__Split (_t, &_index, &_element); if (z5) { z5 = (_index == 0); if (z5) { _Error__ID (_name, ((ADDRESS)(& txt2.str))); _index = _Int__T; goto if_8_end; }; if_8_end: /**/; goto if_7_end; }; _index = _t; if_7_end: /**/; goto if_5_end; }; _Error__ID (_name, ((ADDRESS)(& txt3.str))); _index = _Int__T; if_5_end: /**/; z5 = _EnumType__Is (_index); if (z5) { z3 = _Type__Number (_index); z5 = (z3 <= 0 ); if (z5) { _Error__ID (_name, ((ADDRESS)(& txt4.str))); goto if_10_end; }; if_10_end: /**/; goto if_9_end; }; z3 = _Type__Number (_index); #line 69 z5 = (z3 < 0 ); if (z5) { _Error__ID (_name, ((ADDRESS)(& txt5.str))); goto if_9_end; }; if_9_end: /**/; } } }; #line 77 "First.m3" PRIVATE t7 _First__Compile (_proc, _args) t4 _proc; t5 _args; { t5 z1; t2 z3; t2 z4; t12 z5; t12 z0; t3 z2; t7 z6; #line 77 "First.m3" { auto t4 _e; auto t2 _min; auto t2 _max; auto t3 _t; auto t3 _index; auto t3 _element; auto t7 _x; auto t7 __result; { CHECKSTACKOVERFLOW; NILCHECKB (z1 = _args); { register t69* array = & (*((t40*) z1)); z4 = 0 ; if (z4 >= (array->size[0])) RANGEFAULT; #line 80 z3 = (int)(array->elts + (z4 * 4)); }; _e = (*(t4*)z3); z5 = _TypeExpr__Split (_e, &_t); z0 = ! z5; if (z0) { z2 = _Expr__TypeOf (_e); _t = z2; goto if_11_end; }; if_11_end: /**/; z5 = _ArrayType__Split (_t, &_index, &_element); if (z5) { _t = _index; goto if_12_end; }; if_12_end: /**/; _Type__GetBounds (_t, &_min, &_max); z5 = (_t == 0); if (z5) { _min = 0 ; goto if_13_end; }; if_13_end: /**/; z6 = _Temp__AllocEmpty (_Int__T, 0 ); _x = z6; _Emit__OpTI (((ADDRESS)(& txt6.str)), _x, _min); __result = _x; return __result; } } }; #line 90 "First.m3" PRIVATE t4 _First__Fold (_proc, _args) t4 _proc; t5 _args; { t5 z2; t2 z4; t2 z5; t12 z3; t12 z6; t12 z0; t5 z7; t3 z8; t4 z9; #line 90 "First.m3" { auto t3 _t; auto t3 _elem; auto t2 _min; auto t2 _max; auto t4 __result; { CHECKSTACKOVERFLOW; NILCHECKB (z2 = _args); { register t69* array = & (*((t40*) z2)); z5 = 0 ; if (z5 >= (array->size[0])) RANGEFAULT; #line 93 z4 = (int)(array->elts + (z5 * 4)); }; z3 = _TypeExpr__Split ((*(t4*)z4), &_t); if (z3) { z6 = _ArrayType__Split (_t, &_t, &_elem); z0 = 0; if (z6) { z3 = (_t == 0); z0 = z3; }; if (z0) { __result = 0; return __result; #line 94 }; goto if_14_end; }; NILCHECKB (z7 = _args); { register t69* array = & (*((t40*) z7)); z5 = 0 ; if (z5 >= (array->size[0])) RANGEFAULT; z4 = (int)(array->elts + (z5 * 4)); #line 96 }; z8 = _Expr__TypeOf ((*(t4*)z4)); z3 = _ArrayType__Split (z8, &_t, &_elem); if (z3) { z3 = (_t == 0); if (z3) { z9 = _IntegerExpr__New ( 0 ); __result = z9; return __result; }; goto if_16_end; }; #line 97 __result = 0; return __result; if_16_end: /**/; if_14_end: /**/; _Type__GetBounds (_t, &_min, &_max); z9 = _IntegerExpr__New (_min); __result = z9; return __result; } } }; #line 106 "First.m3" EXPORT t74 _First__Initialize () { t11 z10; #line 106 "First.m3" { { CHECKSTACKOVERFLOW; z10 = _CallExpr__NewMethodList ( 1 , 1 , 1 , _First__Bind, _First__Check, _First__Compile, _First__Fold, _CallExpr__IsNever, _CallExpr__IsNever); #line 108 _First__Z = z10; _Procedure__Define (((ADDRESS)(& txt1.str)), _First__Z, 0); } } }; PRIVATE int init_done = -1; #line 111 "First.m3" PRIVATE void First__initProc (g) int g; { #line 111 "First.m3" if (init_done >= g) return; init_done = g; INITIALIZE (& First__init); INITIALIZE (& Text__init); INITIALIZE (& Temp__init); #line 111 INITIALIZE (& IntegerExpr__init); INITIALIZE (& EnumType__init); INITIALIZE (& Int__init); INITIALIZE (& TypeExpr__init); #line 111 INITIALIZE (& ArrayType__init); INITIALIZE (& Error__init); INITIALIZE (& Emit__init); INITIALIZE (& Procedure__init); INITIALIZE (& Type__init); #line 111 INITIALIZE (& Expr__init); INITIALIZE (& CallExpr__init); return; }; PRIVATE INITLINK me_0 ={(INITLINK*)NIL, 0, First__initProc}; static char* VSimports[] = { &VS_Text__T__fc4b369f3ab271fd, &VS_Temp__T__3a6c7dc12615e4ee, &VS_Temp__AllocEmpty__20296f6d2a78c948, &VS_IntegerExpr__New__864172512ee81acd, &VS_EnumType__Is__2cef67ea2861a0e7, &VS_Int__T__1062912139372387, &VS_TypeExpr__Split__f3b91e1b2487bd66, &VS_ArrayType__Split__b3402f88270f8053, &VS_Error__ID__b86d646b21a8cf59, &VS_Emit__MaxStream__cf0a0e8934c9c9f3, &VS_Emit__Format__bc4a2b083b93bbd7, &VS_Emit__OpTI__af828b1c28578815, &VS_Procedure__T__be7ead4a3afd8be5, &VS_Procedure__Define__23155a563959ddb7, &VS_Type__T__2446b70b3f7780a5, &VS_Type__Map__41dd9f4b33104fce, &VS_Type__List__5791758e343becc1, &VS_Type__Number__f5ca10923ed3cf22, &VS_Type__GetBounds__9a241b2b3c98ad98, &VS_Expr__T__2446b70b3f7780a5, &VS_Expr__List__3f87eceb2b9a246a, &VS_Expr__TypeOf__fef0a11b388c64fa, &VS_CallExpr__MethodList__7e87c2d720444b71, &VS_CallExpr__NewMethodList__1e86caa631267427, &VS_CallExpr__IsNever__ed0ffc703e490927, NIL }; void First__MLink (phase) int phase; { switch (phase) { case 0: { me_0.link = First__init; First__init = & me_0; break; }; case 1: { break; }; case 2: { break; }; }; };