#include "M3Runtime.h" typedef struct { int tc; char* str; int len; } TXT; PRIVATE TXT txt1 = { 3, "subscripted expression is not an array", 39}; PRIVATE TXT txt2 = { 3, "open arrays must be indexed by integer expressions", 51 }; PRIVATE TXT txt3 = { 3, "incompatible array index", 25}; PRIVATE TXT txt4 = { 3, "{\001\012register t@* array = & @;\012", 30}; PRIVATE TXT txt5 = { 3, "@ = @;\012", 8}; PRIVATE TXT txt6 = { 3, "if (@ >= (array->size[0])) RANGEFAULT;\012", 40}; PRIVATE TXT txt7 = { 3, "@ = (int)", 10}; PRIVATE TXT txt8 = { 3, "(array->elts + (@ * @));\012", 26}; PRIVATE TXT txt9 = { 3, "\002};\012", 5}; PRIVATE TXT txt10 = { 3, "@.size[@] = ", 13}; PRIVATE TXT txt11 = { 3, "array->size[@];\012", 17}; PRIVATE TXT txt12 = { 3, "@.elts = array->elts + (@ * ", 29}; PRIVATE TXT txt13 = { 3, "(array->size[@]) * ", 20}; PRIVATE TXT txt14 = { 3, "@);\012", 5}; PRIVATE TXT txt15 = { 3, "(@.elts[@])", 12}; PRIVATE TXT txt16 = { 3, "(*(t@*)@)", 10}; PRIVATE TXT txt17 = { 3, "[] ", 4}; #line 16 "../Interfaces/Type.i3" #define t2 ADDRESS #define t73 void typedef int t9; #line 116 ".ROOT/.boots/corelib/Interfaces/Wr.i3" typedef struct { char* elts; int size[1]; } t57; #line 16 "../Interfaces/Type.i3" #define t43 t57 #define TC2 TC_Type__Map IMPORT TYPE TC_Type__Map; #line 16 IMPORT char VS_Type__Map__41dd9f4b33104fce; #line 14 "./Expr.i3" #define t18 ADDRESS #define t70 ADDRESS typedef struct { TYPE self; int private; } t70_methods; #define t70_msize (sizeof (t70_methods)) typedef struct { ADDRESS methods; } t70_fields; #define t70_size (sizeof (t70_fields)) #define TC70 TC_UNTRACED_ROOT IMPORT TYPE TC_UNTRACED_ROOT; IMPORT char VS_UNTRACED_ROOT__3e0964513fd6da20; #line 16 "../Interfaces/M3.i3" #define t5 ADDRESS #define TC5 TC_M3__Expr IMPORT TYPE TC_M3__Expr; #line 16 IMPORT char VS_M3__Expr__8ae39aaa2d432477; #line 14 "./Expr.i3" #define t39 t57 #define TC18 TC_Expr__List IMPORT TYPE TC_Expr__List; #line 14 IMPORT char VS_Expr__List__3f87eceb2b9a246a; #line 17 "../Interfaces/Scope.i3" #define t32 ADDRESS #define t19 ADDRESS #define TC19 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 t35 t57 #define TC32 TC_Scope__ValueList IMPORT TYPE TC_Scope__ValueList; #line 17 IMPORT char VS_Scope__ValueList__64bf053e22e4e53c; #line 17 "../Interfaces/Type.i3" #define t41 ADDRESS #define t10 ADDRESS #define TC10 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 { t41 _next; t10 _type; } t42; #define TC41 TC_Type__List IMPORT TYPE TC_Type__List; #line 17 IMPORT char VS_Type__List__5791758e343becc1; #define t52 ADDRESS #define TC52 TC_ADDRESS IMPORT TYPE TC_ADDRESS; IMPORT char VS_ADDRESS__30f7308738738b44; #define t59 ADDRESS #define TC59 TC_REFANY IMPORT TYPE TC_REFANY; IMPORT char VS_REFANY__4b8748e831fc107a; #define t74 ADDRESS #define TC74 TC_NULL IMPORT TYPE TC_NULL; IMPORT char VS_NULL__fb50c7d53bec30dc; #define t60 ADDRESS typedef struct { TYPE self; int private; } t60_methods; #define t60_msize (sizeof (t60_methods)) typedef struct { ADDRESS methods; } t60_fields; #define t60_size (sizeof (t60_fields)) #define TC60 TC_ROOT IMPORT TYPE TC_ROOT; IMPORT char VS_ROOT__349f58f628be0ac6; #define t60_MapProc TC_ROOT->mapProc #define t1 ADDRESS #define TC1 TC_Wr__T IMPORT TYPE TC_Wr__T; #line 90 ".ROOT/.boots/corelib/Interfaces/Wr.i3" IMPORT char VS_Wr__T__2555b70b3f7780b1; #define t1_MapProc TC_Wr__T->mapProc #define t3 ADDRESS #line 65 "../Interfaces/Emit.i3" typedef t73 (*t4)(); #line 19 "../Interfaces/M3.i3" #define t11 ADDRESS #define TC11 TC_M3__Temp IMPORT TYPE TC_M3__Temp; #line 19 IMPORT char VS_M3__Temp__450b691937f03dae; #line 31 "./ExprRep.i3" typedef t11 (*t12)(); #line 24 typedef t5 (*t6)(); typedef unsigned char t7; #line 14 "./ArrayExpr.i3" typedef t7 (*t8)(); #line 13 "./ExprAB.i3" #define t13 ADDRESS #line 13 typedef struct { int filler; } t13_methods; #define t13_msize (sizeof (t13_methods)) typedef struct { #line 13 t5 _a; t5 _b; } t13_fields; #define t13_size (sizeof (t13_fields)) #define TC13 TC_ExprAB__T IMPORT TYPE TC_ExprAB__T; #line 13 IMPORT char VS_ExprAB__T__4de31144393ed1be; #line 18 "SubscriptExpr.m3" typedef struct { int filler; } t3_methods; #define t3_msize (sizeof (t3_methods)) typedef struct { #line 18 int filler; } t3_fields; #define t3_size (sizeof (t3_fields)) PRIVATE void t3_InitProc (); #line 18 PRIVATE void t3_SetupProc (); PRIVATE void t3_PrintProc (); PRIVATE typecell t3_TC; PRIVATE typecell t3_TC_init = {0, 0, 0, 0, 0, (PROC)NIL, #line 18 t3_size, t3_msize, NIL, 0, 0, t3_InitProc, t3_SetupProc, t3_PrintProc, "", -1553817874, 574780916}; PRIVATE TYPE TC3 = &t3_TC; #line 13 "../Interfaces/String.i3" #define t14 ADDRESS #define TC14 TC_String__T IMPORT TYPE TC_String__T; #line 13 IMPORT char VS_String__T__3a6c7dc12615e4ee; #line 16 "../Interfaces/RefType.i3" typedef t10 (*t15)(); #line 14 typedef t14 (*t16)(); #line 15 "../Interfaces/Token.i3" typedef unsigned char t45; #line 45 typedef struct { int elts[4]; } t17; #line 14 "../Interfaces/EnumElt.i3" typedef t9 (*t20)(); #line 12 typedef t19 (*t21)(); #line 27 "../Interfaces/Emit.i3" typedef signed_char t22; #line 63 typedef t22 (*t23)(); #define t24 ADDRESS #define TC24 TC_TEXT IMPORT TYPE TC_TEXT; IMPORT char VS_TEXT__b7a92447326386f5; #define t24_MapProc TC_TEXT->mapProc typedef signed_char t50; #line 65 "../Interfaces/Token.i3" #define t44 t57 typedef struct { t14 elts[100]; } t51; #line 17 "../Interfaces/String.i3" typedef struct { t9 _top; t51 _stk; } t25; #line 16 "../Interfaces/Variable.i3" #define t26 ADDRESS #define TC26 TC_Variable__T IMPORT TYPE TC_Variable__T; #line 16 IMPORT char VS_Variable__T__be7ead4a3afd8be5; typedef double t27; typedef unsigned char t28; #line 14 "../Interfaces/M3.i3" #define t29 ADDRESS #define TC29 TC_M3__Scope IMPORT TYPE TC_M3__Scope; #line 14 IMPORT char VS_M3__Scope__6e6d8848308d8a2d; #line 24 "../Interfaces/Variable.i3" typedef t26 (*t30)(); #line 14 "../Interfaces/Decl.i3" typedef struct { t14 _alias; t7 _isExternal; t7 _isInline; t7 _isUnused; t7 _isObsolete; } t31; #line 14 "../Interfaces/String.i3" typedef struct { t14 _module; t14 _item; } t33; #line 31 "../Interfaces/Scope.i3" typedef t29 (*t34)(); #line 18 "../Interfaces/Value.i3" typedef unsigned char t36; #line 40 typedef t36 (*t37)(); #line 13 "./ExprRep.i3" #define t38 ADDRESS #line 13 typedef struct { t4 _bind; t4 _check; t4 _write; t8 _isEqual; t6 _evaluate; t4 _getBounds; t8 _isWritable; t8 _isDesignator; #line 13 t8 _isZeroes; t4 _genLiteral; t4 _fprint; t12 _compile; } t38_methods; #define t38_msize (sizeof (t38_methods)) typedef struct { #line 13 t9 _origin; t10 _type; t7 _bound; t7 _inCheck; t7 _checked; } t38_fields; #define t38_size (sizeof (t38_fields)) #define TC38 TC_M3__Expr typedef t2 (*t40)(); #line 65 "../Interfaces/Token.i3" typedef struct { t14 elts[97]; } t46; typedef int t47; #line 37 "../Interfaces/String.i3" typedef t24 (*t48)(); #line 28 #define t49 t57 typedef signed_char t53; #line 67 ".ROOT/.boots/corelib/Interfaces/Text.i3" typedef t53 (*t54)(); #line 26 typedef t47 (*t55)(); #line 23 typedef t28 (*t56)(); #line 91 ".ROOT/.boots/corelib/Interfaces/Wr.i3" typedef unsigned char t58; #line 15 ".ROOT/.boots/corelib/Interfaces/Thread.i3" #define t61 ADDRESS #define TC61 TC_Thread__T IMPORT TYPE TC_Thread__T; #line 15 IMPORT char VS_Thread__T__2555b70b3f7780b1; #define t61_MapProc TC_Thread__T->mapProc typedef t59 (*t62)(); #define t63 ADDRESS #define TC63 TC_Thread__Condition IMPORT TYPE TC_Thread__Condition; #line 21 IMPORT char VS_Thread__Condition__26d5968239e08f4e; #define t63_MapProc TC_Thread__Condition->mapProc #define t64 ADDRESS #define TC64 TC_MUTEX IMPORT TYPE TC_MUTEX; IMPORT char VS_MUTEX__1f9d4e89391ab815; #define t64_MapProc TC_MUTEX->mapProc typedef t61 (*t65)(); #line 23 #define t66 ADDRESS #line 23 typedef struct { t62 _apply; } t66_methods; #define t66_msize (sizeof (t66_methods)) typedef struct { #line 23 int filler; } t66_fields; #define t66_size (sizeof (t66_fields)) #define TC66 TC_Thread__Closure IMPORT TYPE TC_Thread__Closure; #line 23 IMPORT char VS_Thread__Closure__7fb5c6232c5a658a; #define t66_MapProc TC_Thread__Closure->mapProc typedef t63 (*t67)(); typedef t64 (*t68)(); #line 28 #define t69 ADDRESS #line 28 typedef struct { int filler; } t69_methods; #define t69_msize (sizeof (t69_methods)) typedef struct { #line 28 t47 _stackSize; } t69_fields; #define t69_size (sizeof (t69_fields)) #define TC69 TC_Thread__SizedClosure IMPORT TYPE TC_Thread__SizedClosure; #line 28 IMPORT char VS_Thread__SizedClosure__8a46717d2eae7b07; #define t69_MapProc TC_Thread__SizedClosure->mapProc #define t71 ADDRESS #define TC71 TC_M3__Stmt IMPORT TYPE TC_M3__Stmt; #line 17 "../Interfaces/M3.i3" IMPORT char VS_M3__Stmt__376b307627fc1f2f; typedef CLOSURE t72; typedef float t75; #line 10 "SubscriptExpr.m3" IMPORT INITLINK* Wr__init; IMPORT INITLINK* Temp__init; IMPORT INITLINK* DerefExpr__init; IMPORT INITLINK* RefType__init; #line 10 IMPORT INITLINK* Target__init; IMPORT INITLINK* IntegerExpr__init; IMPORT INITLINK* SubtractExpr__init; IMPORT INITLINK* CheckExpr__init; #line 10 IMPORT INITLINK* OpenArray__init; IMPORT INITLINK* ArrayExpr__init; IMPORT INITLINK* String__init; IMPORT INITLINK* EnumElt__init; #line 10 IMPORT INITLINK* Emit__init; IMPORT INITLINK* Int__init; IMPORT INITLINK* Type__init; IMPORT INITLINK* Error__init; IMPORT INITLINK* ArrayType__init; #line 10 IMPORT INITLINK* ExprRep__init; IMPORT INITLINK* ExprAB__init; IMPORT INITLINK* Expr__init; IMPORT INITLINK* SubscriptExpr__init; #line 10 IMPORT EXCEPTION_NAME _Thread__Alerted; IMPORT char VS_Thread__Alerted__fc88feb43485af46; IMPORT EXCEPTION_NAME _Wr__Failure; #line 10 IMPORT char VS_Wr__Failure__5f82cfb43dabf527; IMPORT EXCEPTION_NAME _Wr__Error; IMPORT char VS_Wr__Error__c367253d3ed4fd15; #line 10 IMPORT t73 _Wr__PutText (); IMPORT char VS_Wr__PutText__e034dab73a793846; IMPORT TYPE TC_Temp__T; IMPORT char VS_Temp__T__3a6c7dc12615e4ee; #line 10 IMPORT t11 _Temp__AllocEmpty (); IMPORT char VS_Temp__AllocEmpty__20296f6d2a78c948; IMPORT t11 _Temp__AllocMacro (); IMPORT char VS_Temp__AllocMacro__0d68005335e03ba8; #line 10 IMPORT t11 _Temp__Alloc (); IMPORT char VS_Temp__Alloc__0b946c9d3ec0974e; IMPORT t73 _Temp__Free (); IMPORT char VS_Temp__Free__3b952a2225c26846; #line 10 IMPORT t73 _Temp__Depend (); IMPORT char VS_Temp__Depend__11ca183d3fa8461d; IMPORT t5 _DerefExpr__New (); IMPORT char VS_DerefExpr__New__344f21aa225a201e; #line 10 IMPORT t7 _RefType__Is (); IMPORT char VS_RefType__Is__9788d4183ade3fd0; IMPORT char VS_Target__CHARSIZE__bfc83af22ccab4e4; #line 10 IMPORT t5 _IntegerExpr__New (); IMPORT char VS_IntegerExpr__New__864172512ee81acd; IMPORT t5 _SubtractExpr__New (); IMPORT char VS_SubtractExpr__New__557c96a3390757a2; #line 10 IMPORT t5 _CheckExpr__New (); IMPORT char VS_CheckExpr__New__a74553ee326c8302; IMPORT t5 _CheckExpr__NewLower (); IMPORT char VS_CheckExpr__NewLower__5e10e5102119d155; #line 10 IMPORT t5 _CheckExpr__NewUpper (); IMPORT char VS_CheckExpr__NewUpper__0c1ccd9a3f5bc373; IMPORT t7 _ArrayExpr__Subscript (); #line 10 IMPORT char VS_ArrayExpr__Subscript__15d9ea723b5ed3bc; IMPORT char VS_Emit__MaxStream__cf0a0e8934c9c9f3; IMPORT TYPE TC_Emit__Format; #line 10 IMPORT char VS_Emit__Format__bc4a2b083b93bbd7; IMPORT t73 _Emit__Op (); IMPORT char VS_Emit__Op__072646cc27c8ae10; IMPORT t73 _Emit__OpI (); #line 10 IMPORT char VS_Emit__OpI__02cb878634bb9f49; IMPORT t73 _Emit__OpT (); IMPORT char VS_Emit__OpT__764bdffe21d249e8; IMPORT t73 _Emit__OpTT (); #line 10 IMPORT char VS_Emit__OpTT__cba0ce912431e01c; IMPORT t73 _Emit__OpTI (); IMPORT char VS_Emit__OpTI__af828b1c28578815; IMPORT t73 _Emit__OpIT (); #line 10 IMPORT char VS_Emit__OpIT__1322d0f925e21d92; IMPORT t10 _Int__T; IMPORT char VS_Int__T__1062912139372387; IMPORT TYPE TC_Type__T; #line 10 IMPORT char VS_Type__T__2446b70b3f7780a5; IMPORT t9 _Type__Size (); IMPORT char VS_Type__Size__2f4d980e28adf05b; IMPORT t73 _Type__GetBounds (); #line 10 IMPORT char VS_Type__GetBounds__9a241b2b3c98ad98; IMPORT t10 _Type__Base (); IMPORT char VS_Type__Base__2bebd0333659a92c; #line 10 IMPORT t9 _Type__Name (); IMPORT char VS_Type__Name__f99416972257a869; IMPORT t7 _Type__IsSubtype (); IMPORT char VS_Type__IsSubtype__8591fba5245cb882; #line 10 IMPORT t73 _Error__Msg (); IMPORT char VS_Error__Msg__4d119a332467757f; IMPORT t7 _ArrayType__Split (); IMPORT char VS_ArrayType__Split__b3402f88270f8053; #line 10 IMPORT t10 _ArrayType__OpenImpl (); IMPORT char VS_ArrayType__OpenImpl__fe61729235c79eff; IMPORT t9 _ArrayType__OpenDepth (); #line 10 IMPORT char VS_ArrayType__OpenDepth__0aca628230da93d9; IMPORT t73 _ExprRep__Init (); IMPORT char VS_ExprRep__Init__8b7fff3e227cebab; #line 10 IMPORT t73 _ExprRep__NoBind (); IMPORT char VS_ExprRep__NoBind__e7d0d3dd3d703c08; IMPORT t73 _ExprRep__NoCheck (); IMPORT char VS_ExprRep__NoCheck__c11b54bc361794fa; #line 10 IMPORT t5 _ExprRep__NoValue (); IMPORT char VS_ExprRep__NoValue__8ccc143224598a66; IMPORT t73 _ExprRep__NoBounds (); IMPORT char VS_ExprRep__NoBounds__b64bb146289ee4f0; #line 10 IMPORT t7 _ExprRep__IsNever (); IMPORT char VS_ExprRep__IsNever__8f1a069b301903c8; IMPORT t7 _ExprRep__NeverEq (); IMPORT char VS_ExprRep__NeverEq__dfdc2412249ccb65; #line 10 IMPORT t73 _ExprRep__NoWriter (); IMPORT char VS_ExprRep__NoWriter__a97bb1a23bbf506e; IMPORT t73 _ExprRep__NoLiteral (); IMPORT char VS_ExprRep__NoLiteral__6c9c90073f496f67; #line 10 IMPORT t73 _ExprAB__Bind (); IMPORT char VS_ExprAB__Bind__b38b69303e15f944; IMPORT t7 _ExprAB__EqCheck (); IMPORT char VS_ExprAB__EqCheck__4b21927f20e25ebf; #line 10 IMPORT TYPE TC_Expr__T; IMPORT char VS_Expr__T__2446b70b3f7780a5; IMPORT t73 _Expr__Bind (); IMPORT char VS_Expr__Bind__7e2752da3eaf56eb; #line 10 IMPORT t10 _Expr__TypeOf (); IMPORT char VS_Expr__TypeOf__fef0a11b388c64fa; IMPORT t5 _Expr__ConstValue (); IMPORT char VS_Expr__ConstValue__ce4fd448218fe483; #line 10 IMPORT t73 _Expr__GetBounds (); IMPORT char VS_Expr__GetBounds__b20ec781333da5e4; IMPORT t7 _Expr__IsDesignator (); IMPORT char VS_Expr__IsDesignator__e3556614321cb906; #line 10 IMPORT t7 _Expr__IsWritable (); IMPORT char VS_Expr__IsWritable__85b9bb292e4a0f55; IMPORT t73 _Expr__TypeCheck (); IMPORT char VS_Expr__TypeCheck__af9aa9073729e7f7; #line 10 IMPORT t11 _Expr__Compile (); IMPORT char VS_Expr__Compile__a7e0cc4029a2ec76; IMPORT t73 _Expr__Fingerprint (); IMPORT char VS_Expr__Fingerprint__50ce687c31d90a5b; #line 10 EXPORT t5 _SubscriptExpr__New (); EXPORT char VS_SubscriptExpr__New__233fed2b234c5b11 = '\0'; PRIVATE TYPE TC_SubscriptExpr__P; #line 10 PRIVATE t73 _SubscriptExpr__Bind (); PRIVATE t73 _SubscriptExpr__Check (); PRIVATE t11 _SubscriptExpr__Compile (); PRIVATE t73 _SubscriptExpr__Writer (); #line 10 PRIVATE t7 _SubscriptExpr__IsDesignator (); PRIVATE t7 _SubscriptExpr__IsWritable (); PRIVATE t5 _SubscriptExpr__Fold (); #line 10 PRIVATE t73 _SubscriptExpr__FPrinter (); IMPORT char VS_M3__Expr__58bf709e39adf1f7; IMPORT char VS_M3__Expr__58bf709e39adf1f7; #line 10 #line 34 "SubscriptExpr.m3" EXPORT t5 _SubscriptExpr__New (_a, _b) t5 _a; t5 _b; { t3 z0; t3 z2; #line 34 "SubscriptExpr.m3" { auto t3 _p; auto t5 __result; { ZERO1 (& _p); #line 34 CHECKSTACKOVERFLOW; { register char** ptr = (char**) UNEWOBJ (TC3); z0 = (t3) ptr; }; _p = z0; _ExprRep__Init (_p); NILCHECKA (z2 = _p); (((t13_fields*)(z2+(0+t38_size+t70_size)))->_a) = _a; NILCHECKA (z2 = _p); (((t13_fields*)(z2+(0+t38_size+t70_size)))->_b) = _b; __result = _p; return __result; } } }; #line 44 "SubscriptExpr.m3" PRIVATE t73 _SubscriptExpr__Bind (_p) t3 _p; { t3 z2; t3 z3; t10 z4; t10 z1; t7 z5; t5 z6; #line 44 "SubscriptExpr.m3" { auto t10 _ta; auto t10 _ti; auto t10 _te; { CHECKSTACKOVERFLOW; NILCHECKA (z2 = _p); _Expr__Bind ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_a)); NILCHECKA (z2 = _p); _Expr__Bind ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_b)); NILCHECKA (z3 = _p); z4 = _Expr__TypeOf ((((t13_fields*)(z3+(0+t38_size+t70_size)))->_a)); z1 = _Type__Base (z4); _ta = z1; z5 = _RefType__Is (_ta); if (z5) { NILCHECKA (z2 = _p); z6 = _DerefExpr__New ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_a)); NILCHECKA (z2 = _p); #line 53 (((t13_fields*)(z2+(0+t38_size+t70_size)))->_a) = z6; NILCHECKA (z2 = _p); _Expr__Bind ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_a)); NILCHECKA (z3 = _p); z4 = _Expr__TypeOf ((((t13_fields*)(z3+(0+t38_size+t70_size)))->_a)); z1 = _Type__Base (z4); #line 55 _ta = z1; goto if_1_end; }; if_1_end: /**/; z5 = _ArrayType__Split (_ta, &_ti, &_te); if (z5) { NILCHECKA (z2 = _p); (((t38_fields*)(z2+(0+t70_size)))->_type) = _te; goto if_2_end; }; NILCHECKA (z2 = _p); (((t38_fields*)(z2+(0+t70_size)))->_type) = _Int__T; if_2_end: /**/; } } }; #line 64 "SubscriptExpr.m3" PRIVATE t73 _SubscriptExpr__Check (_p) t3 _p; { t3 z2; t3 z3; t10 z4; t10 z1; t7 z5; t7 z0; t5 z6; t5 z7; t9 z8; #line 64 "SubscriptExpr.m3" { auto t10 _ta; auto t10 _tb; auto t10 _ti; auto t10 _te; auto t9 _mini; auto t9 _maxi; auto t9 _minb; auto t9 _maxb; { CHECKSTACKOVERFLOW; NILCHECKA (z2 = _p); _Expr__TypeCheck ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_a)); NILCHECKA (z2 = _p); _Expr__TypeCheck ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_b)); NILCHECKA (z3 = _p); z4 = _Expr__TypeOf ((((t13_fields*)(z3+(0+t38_size+t70_size)))->_a)); z1 = _Type__Base (z4); _ta = z1; NILCHECKA (z2 = _p); z4 = _Expr__TypeOf ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_b)); _tb = z4; z5 = _ArrayType__Split (_ta, &_ti, &_te); z0 = ! z5; if (z0) { _Error__Msg (((ADDRESS)(& txt1.str))); return; }; _Type__GetBounds (_ti, &_mini, &_maxi); NILCHECKA (z2 = _p); _Expr__GetBounds ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_b), &_minb, &_maxb); z5 = (_ti == 0); if (z5) { z5 = _Type__IsSubtype (_tb, _Int__T); if (z5) { z5 = (_minb < 0 ); if (z5) { NILCHECKA (z2 = _p); z6 = _CheckExpr__NewLower ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_b), 0 ); NILCHECKA (z2 = _p); #line 82 (((t13_fields*)(z2+(0+t38_size+t70_size)))->_b) = z6; NILCHECKA (z2 = _p); _Expr__Bind ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_b)); NILCHECKA (z2 = _p); _Expr__TypeCheck ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_b)); goto if_6_end; }; #line 84 if_6_end: /**/; goto if_5_end; }; _Error__Msg (((ADDRESS)(& txt2.str))); if_5_end: /**/; goto if_4_end; }; z4 = _Type__Base (_ti); z5 = _Type__IsSubtype (_tb, z4); if (z5) { z5 = (_mini != 0 ); if (z5) { NILCHECKA (z2 = _p); z6 = _IntegerExpr__New (_mini); z7 = _SubtractExpr__New ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_b), z6); #line 93 NILCHECKA (z2 = _p); (((t13_fields*)(z2+(0+t38_size+t70_size)))->_b) = z7; NILCHECKA (z2 = _p); _Expr__Bind ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_b)); NILCHECKA (z2 = _p); _Expr__TypeCheck ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_b)); goto if_7_end; }; if_7_end: /**/; z5 = (_minb < _mini); z0 = 0; if (z5) { z5 = (_maxb > _maxi); z0 = z5; }; if (z0) { NILCHECKA (z2 = _p); z8 = _maxi - _mini; z6 = _CheckExpr__New ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_b), 0 , z8); #line 98 NILCHECKA (z2 = _p); (((t13_fields*)(z2+(0+t38_size+t70_size)))->_b) = z6; NILCHECKA (z2 = _p); _Expr__Bind ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_b)); NILCHECKA (z2 = _p); _Expr__TypeCheck ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_b)); goto if_8_end; }; z5 = (_minb < _mini); #line 100 if (z5) { NILCHECKA (z2 = _p); z6 = _CheckExpr__NewLower ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_b), 0 ); NILCHECKA (z2 = _p); #line 102 (((t13_fields*)(z2+(0+t38_size+t70_size)))->_b) = z6; NILCHECKA (z2 = _p); _Expr__Bind ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_b)); NILCHECKA (z2 = _p); _Expr__TypeCheck ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_b)); goto if_8_end; }; z5 = (_maxb > _maxi); #line 104 if (z5) { NILCHECKA (z2 = _p); z8 = _maxi - _mini; z6 = _CheckExpr__NewUpper ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_b), z8); #line 106 NILCHECKA (z2 = _p); (((t13_fields*)(z2+(0+t38_size+t70_size)))->_b) = z6; NILCHECKA (z2 = _p); _Expr__Bind ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_b)); NILCHECKA (z2 = _p); _Expr__TypeCheck ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_b)); goto if_8_end; }; if_8_end: /**/; #line 108 goto if_4_end; }; _Error__Msg (((ADDRESS)(& txt3.str))); if_4_end: /**/; } } }; #line 116 "SubscriptExpr.m3" PRIVATE t11 _SubscriptExpr__Compile (_p) t3 _p; { t3 z3; t10 z4; t10 z1; t9 z2; t11 z5; t7 z6; t9 z7; t9 z8; t7 z9; #line 116 "SubscriptExpr.m3" { auto t10 _ta; auto t10 _ti; auto t10 _te; auto t9 _zz; auto t9 _depth; auto t11 _t1; auto t11 _t2; auto t11 _t3; auto t11 _t4; #line 116 auto t11 _t5; auto t11 __result; { CHECKSTACKOVERFLOW; NILCHECKA (z3 = _p); z4 = _Expr__TypeOf ((((t13_fields*)(z3+(0+t38_size+t70_size)))->_a)); z1 = _Type__Base (z4); _ta = z1; z2 = _ArrayType__OpenDepth (_ta); _depth = z2; NILCHECKA (z3 = _p); z5 = _Expr__Compile ((((t13_fields*)(z3+(0+t38_size+t70_size)))->_a)); _t2 = z5; NILCHECKA (z3 = _p); z5 = _Expr__Compile ((((t13_fields*)(z3+(0+t38_size+t70_size)))->_b)); _t3 = z5; z6 = (_depth == 0 ); if (z6) { z5 = _Temp__AllocMacro (_p, 1 ); _t1 = z5; _Temp__Depend (_t1, _t2); _Temp__Depend (_t1, _t3); __result = _t1; return __result; }; z6 = (_depth == 1 ); if (z6) { { { auto t7 _b; { ZERO1B (& _b); z6 = _ArrayType__Split (_ta, &_ti, &_te); _b = z6; if (!_b) ASSERTFAULT; } } }; z5 = _Temp__AllocEmpty (_Int__T, 0 ); _t5 = z5; NILCHECKA (z3 = _p); z5 = _Temp__Alloc ((((t13_fields*)(z3+(0+t38_size+t70_size)))->_b)); _t4 = z5; z4 = _ArrayType__OpenImpl (_ta); z2 = _Type__Name (z4); _zz = z2; _Emit__OpIT (((ADDRESS)(& txt4.str)), _zz, _t2); _Emit__OpTT (((ADDRESS)(& txt5.str)), _t4, _t3); _Emit__OpT (((ADDRESS)(& txt6.str)), _t4); _Emit__OpT (((ADDRESS)(& txt7.str)), _t5); z7 = _Type__Size (_te); z8 = IDIV (z7, 8 ); _Emit__OpTI (((ADDRESS)(& txt8.str)), _t4, z8); _Emit__Op (((ADDRESS)(& txt9.str))); _Temp__Free (_t2); _Temp__Free (_t3); _Temp__Free (_t4); z5 = _Temp__AllocMacro (_p, 1 ); _t1 = z5; _Temp__Depend (_t1, _t5); __result = _t1; return __result; }; { { auto t7 _b; { ZERO1B (& _b); z6 = _ArrayType__Split (_ta, &_ti, &_te); _b = z6; if (!_b) ASSERTFAULT; } } }; z4 = _ArrayType__OpenImpl (_te); z5 = _Temp__AllocEmpty (z4, 1 ); _t1 = z5; NILCHECKA (z3 = _p); z5 = _Temp__Alloc ((((t13_fields*)(z3+(0+t38_size+t70_size)))->_b)); _t4 = z5; z4 = _ArrayType__OpenImpl (_ta); z2 = _Type__Name (z4); _zz = z2; _Emit__OpIT (((ADDRESS)(& txt4.str)), _zz, _t2); _Emit__OpTT (((ADDRESS)(& txt5.str)), _t4, _t3); _Emit__OpT (((ADDRESS)(& txt6.str)), _t4); { int from, to, index; from = 1 ; z2 = _depth - 1 ; to = z2; { auto t9 _i; { for (index = from; index <= to; index += 1) { #line 162 _i = (t9) index; z7 = _i - 1 ; _Emit__OpTI (((ADDRESS)(& txt10.str)), _t1, z7); _Emit__OpI (((ADDRESS)(& txt11.str)), _i); } } }; }; _Emit__OpTT (((ADDRESS)(& txt12.str)), _t1, _t4); { int from, to, index; from = 1 ; z2 = _depth - 1 ; to = z2; { auto t9 _i; { for (index = from; index <= to; index += 1) { #line 167 _i = (t9) index; _Emit__OpI (((ADDRESS)(& txt13.str)), _i); { { auto t7 _b; { ZERO1B (& _b); z4 = _Type__Base (_te); z6 = _ArrayType__Split (z4, &_ti, &_te); _b = z6; z6 = 0; if (_b) { z9 = (_ti == 0); z6 = z9; }; if (!z6) ASSERTFAULT; } } }; } } }; }; z7 = _Type__Size (_te); z8 = IDIV (z7, 8 ); _Emit__OpI (((ADDRESS)(& txt14.str)), z8); _Emit__Op (((ADDRESS)(& txt9.str))); _Temp__Free (_t2); _Temp__Free (_t3); _Temp__Free (_t4); __result = _t1; return __result; } } }; #line 181 "SubscriptExpr.m3" PRIVATE t73 _SubscriptExpr__Writer (_p, _t1, _t2) t3 _p; t11 _t1; t11 _t2; { t3 z3; t10 z4; t10 z1; t9 z2; t7 z5; t3 z6; t9 z7; #line 181 "SubscriptExpr.m3" { auto t10 _ta; auto t9 _depth; { CHECKSTACKOVERFLOW; NILCHECKA (z3 = _p); z4 = _Expr__TypeOf ((((t13_fields*)(z3+(0+t38_size+t70_size)))->_a)); z1 = _Type__Base (z4); _ta = z1; z2 = _ArrayType__OpenDepth (_ta); _depth = z2; z5 = (_depth == 0 ); if (z5) { _Emit__OpTT (((ADDRESS)(& txt15.str)), _t1, _t2); goto if_10_end; }; z5 = (_depth == 1 ); if (z5) { NILCHECKA (z6 = _p); z7 = _Type__Name ((((t38_fields*)(z6+(0+t70_size)))->_type)); _Emit__OpIT (((ADDRESS)(& txt16.str)), z7, _t1); #line 189 goto if_10_end; }; if (! 0 ) ASSERTFAULT; if_10_end: /**/; } } }; #line 195 "SubscriptExpr.m3" PRIVATE t7 _SubscriptExpr__IsDesignator (_p) t3 _p; { t3 z2; t7 z3; #line 195 "SubscriptExpr.m3" { auto t7 __result; { ZERO1B (& __result); CHECKSTACKOVERFLOW; NILCHECKA (z2 = _p); z3 = _Expr__IsDesignator ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_a)); __result = z3; return __result; #line 197 } } }; #line 200 "SubscriptExpr.m3" PRIVATE t7 _SubscriptExpr__IsWritable (_p) t3 _p; { t3 z2; t7 z3; #line 200 "SubscriptExpr.m3" { auto t7 __result; { ZERO1B (& __result); CHECKSTACKOVERFLOW; NILCHECKA (z2 = _p); z3 = _Expr__IsWritable ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_a)); __result = z3; return __result; #line 202 } } }; #line 205 "SubscriptExpr.m3" PRIVATE t5 _SubscriptExpr__Fold (_p) t3 _p; { t3 z2; t5 z3; t7 z4; t7 z0; #line 205 "SubscriptExpr.m3" { auto t5 _e1; auto t5 _e2; auto t5 _e3; auto t5 __result; { CHECKSTACKOVERFLOW; NILCHECKA (z2 = _p); z3 = _Expr__ConstValue ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_a)); _e1 = z3; NILCHECKA (z2 = _p); z3 = _Expr__ConstValue ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_b)); _e2 = z3; _e3 = (t5) 0; z4 = (_e1 == 0); z0 = 1; if (! z4) { z4 = (_e2 == 0); z0 = z4; }; if (z0) { goto if_11_end; }; z4 = _ArrayExpr__Subscript (_e1, _e2, &_e3); #line 211 if (z4) { goto if_11_end; }; if_11_end: /**/; __result = _e3; return __result; } } }; #line 217 "SubscriptExpr.m3" PRIVATE t73 _SubscriptExpr__FPrinter (_p, _map, _wr) t3 _p; t2 _map; t1 _wr; { t3 z2; #line 217 "SubscriptExpr.m3" { { CHECKSTACKOVERFLOW; _Wr__PutText (_wr, ((ADDRESS)(& txt17.str))); NILCHECKA (z2 = _p); _Expr__Fingerprint ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_a), _map, _wr); NILCHECKA (z2 = _p); _Expr__Fingerprint ((((t13_fields*)(z2+(0+t38_size+t70_size)))->_b), _map, _wr); } } }; PRIVATE int init_done = -1; #line 221 "SubscriptExpr.m3" PRIVATE void SubscriptExpr__initProc (g) int g; { #line 221 "SubscriptExpr.m3" if (init_done >= g) return; init_done = g; INITIALIZE (& SubscriptExpr__init); INITIALIZE (& Wr__init); INITIALIZE (& Temp__init); #line 221 INITIALIZE (& DerefExpr__init); INITIALIZE (& RefType__init); INITIALIZE (& Target__init); INITIALIZE (& IntegerExpr__init); #line 221 INITIALIZE (& SubtractExpr__init); INITIALIZE (& CheckExpr__init); INITIALIZE (& OpenArray__init); INITIALIZE (& ArrayExpr__init); #line 221 INITIALIZE (& String__init); INITIALIZE (& EnumElt__init); INITIALIZE (& Emit__init); INITIALIZE (& Int__init); INITIALIZE (& Type__init); #line 221 INITIALIZE (& Error__init); INITIALIZE (& ArrayType__init); INITIALIZE (& ExprRep__init); INITIALIZE (& ExprAB__init); INITIALIZE (& Expr__init); #line 221 return; }; #line 221 "SubscriptExpr.m3" PRIVATE void t3_InitProc (obj) char* obj; { register t3_fields* p; #line 221 "SubscriptExpr.m3" CHECKSTACKOVERFLOW; p = (t3_fields*) (obj + TC13->datasize); }; #line 221 "SubscriptExpr.m3" PRIVATE void t3_SetupProc () { register int* p; #line 221 "SubscriptExpr.m3" t3_TC.datasize += TC13->datasize; t3_TC.methodsize += TC13->methodsize; p = (int*) UALLOC (t3_TC.methodsize); COPY (TC13->defaultMethods, p, (TC13->methodsize)); #line 221 p[0] = (int)(& t3_TC); p[1] = 0; ((t38_methods*) (((char*)p) + TC70->methodsize))->_bind = _SubscriptExpr__Bind; ((t38_methods*) (((char*)p) + TC70->methodsize))->_check = _SubscriptExpr__Check; #line 221 ((t38_methods*) (((char*)p) + TC70->methodsize))->_compile = _SubscriptExpr__Compile; ((t38_methods*) (((char*)p) + TC70->methodsize))->_evaluate = _SubscriptExpr__Fold; #line 221 ((t38_methods*) (((char*)p) + TC70->methodsize))->_fprint = _SubscriptExpr__FPrinter; ((t38_methods*) (((char*)p) + TC70->methodsize))->_write = _SubscriptExpr__Writer; #line 221 ((t38_methods*) (((char*)p) + TC70->methodsize))->_isEqual = _ExprAB__EqCheck; ((t38_methods*) (((char*)p) + TC70->methodsize))->_getBounds = _ExprRep__NoBounds; #line 221 ((t38_methods*) (((char*)p) + TC70->methodsize))->_isWritable = _SubscriptExpr__IsWritable; ((t38_methods*) (((char*)p) + TC70->methodsize))->_isDesignator = _SubscriptExpr__IsDesignator; #line 221 ((t38_methods*) (((char*)p) + TC70->methodsize))->_isZeroes = _ExprRep__IsNever; ((t38_methods*) (((char*)p) + TC70->methodsize))->_genLiteral = _ExprRep__NoLiteral; #line 221 t3_TC.defaultMethods = (char*) p; }; #line 221 "SubscriptExpr.m3" PRIVATE void t3_PrintProc (obj) char *obj; { t3_fields* o; #line 221 "SubscriptExpr.m3" CHECKSTACKOVERFLOW; if (TC13->printProc != 0) {TC13->printProc (obj); } fprintf (stderr, "{%s} ", TC3->brand); o = (t3_fields*) (obj + TC13->datasize); #line 221 }; PRIVATE INITLINK me_0 ={(INITLINK*)NIL, 0, SubscriptExpr__initProc}; static char* VSimports[] = { &VS_Thread__Alerted__fc88feb43485af46, &VS_Wr__T__2555b70b3f7780b1, &VS_Wr__Failure__5f82cfb43dabf527, &VS_Wr__Error__c367253d3ed4fd15, &VS_Wr__PutText__e034dab73a793846, &VS_Temp__T__3a6c7dc12615e4ee, &VS_Temp__AllocEmpty__20296f6d2a78c948, &VS_Temp__AllocMacro__0d68005335e03ba8, &VS_Temp__Alloc__0b946c9d3ec0974e, &VS_Temp__Free__3b952a2225c26846, &VS_Temp__Depend__11ca183d3fa8461d, &VS_DerefExpr__New__344f21aa225a201e, &VS_RefType__Is__9788d4183ade3fd0, &VS_Target__CHARSIZE__bfc83af22ccab4e4, &VS_IntegerExpr__New__864172512ee81acd, &VS_SubtractExpr__New__557c96a3390757a2, &VS_CheckExpr__New__a74553ee326c8302, &VS_CheckExpr__NewLower__5e10e5102119d155, &VS_CheckExpr__NewUpper__0c1ccd9a3f5bc373, &VS_ArrayExpr__Subscript__15d9ea723b5ed3bc, &VS_String__T__3a6c7dc12615e4ee, &VS_Emit__MaxStream__cf0a0e8934c9c9f3, &VS_Emit__Format__bc4a2b083b93bbd7, &VS_Emit__Op__072646cc27c8ae10, &VS_Emit__OpI__02cb878634bb9f49, &VS_Emit__OpT__764bdffe21d249e8, &VS_Emit__OpTT__cba0ce912431e01c, &VS_Emit__OpTI__af828b1c28578815, &VS_Emit__OpIT__1322d0f925e21d92, &VS_Int__T__1062912139372387, &VS_Type__T__2446b70b3f7780a5, &VS_Type__Map__41dd9f4b33104fce, &VS_Type__List__5791758e343becc1, &VS_Type__Size__2f4d980e28adf05b, &VS_Type__GetBounds__9a241b2b3c98ad98, &VS_Type__Base__2bebd0333659a92c, &VS_Type__Name__f99416972257a869, &VS_Type__IsSubtype__8591fba5245cb882, &VS_Error__Msg__4d119a332467757f, &VS_ArrayType__Split__b3402f88270f8053, &VS_ArrayType__OpenImpl__fe61729235c79eff, &VS_ArrayType__OpenDepth__0aca628230da93d9, &VS_ExprRep__Init__8b7fff3e227cebab, &VS_ExprRep__NoBind__e7d0d3dd3d703c08, &VS_ExprRep__NoCheck__c11b54bc361794fa, &VS_ExprRep__NoValue__8ccc143224598a66, &VS_ExprRep__NoBounds__b64bb146289ee4f0, &VS_ExprRep__IsNever__8f1a069b301903c8, &VS_ExprRep__NeverEq__dfdc2412249ccb65, &VS_ExprRep__NoWriter__a97bb1a23bbf506e, &VS_ExprRep__NoLiteral__6c9c90073f496f67, &VS_ExprAB__T__4de31144393ed1be, &VS_ExprAB__Bind__b38b69303e15f944, &VS_ExprAB__EqCheck__4b21927f20e25ebf, &VS_Expr__T__2446b70b3f7780a5, &VS_Expr__List__3f87eceb2b9a246a, &VS_Expr__Bind__7e2752da3eaf56eb, &VS_Expr__TypeOf__fef0a11b388c64fa, &VS_Expr__ConstValue__ce4fd448218fe483, &VS_Expr__GetBounds__b20ec781333da5e4, &VS_Expr__IsDesignator__e3556614321cb906, &VS_Expr__IsWritable__85b9bb292e4a0f55, &VS_Expr__TypeCheck__af9aa9073729e7f7, &VS_Expr__Compile__a7e0cc4029a2ec76, &VS_Expr__Fingerprint__50ce687c31d90a5b, NIL }; void SubscriptExpr__MLink (phase) int phase; { switch (phase) { case 0: { me_0.link = SubscriptExpr__init; SubscriptExpr__init = & me_0; t3_TC = t3_TC_init; REGISTERTYPE (TC3); break; }; case 1: { t3_TC.parent = TC_ExprAB__T; break; }; case 2: { break; }; }; };