#include "M3Runtime.h" typedef struct { int tc; char* str; int len; } TXT; PRIVATE TXT txt1 = { 3, "LOOPHOLE: first argument cannot be an open array", 49 }; PRIVATE TXT txt2 = { 3, "LOOPHOLE: two dimensional open arrays not supported", 52 }; PRIVATE TXT txt3 = { 3, "LOOPHOLE: expresion\047s size incompatible with type\047s", 52 }; PRIVATE TXT txt4 = { 3, "LOOPHOLE: expression\047s size differs from type\047s", 48 }; PRIVATE TXT txt5 = { 3, "@.elts = (char*) (& @);\012", 25}; PRIVATE TXT txt6 = { 3, "@.size[0] = @;\012", 16}; PRIVATE TXT txt7 = { 3, "@ = @;\012", 8}; PRIVATE TXT txt8 = { 3, "(*((t@*)(& @)))", 16}; PRIVATE TXT txt9 = { 3, "LOOPHOLE ", 10}; #line 16 "../Interfaces/Type.i3" #define t2 ADDRESS #define t73 void typedef int t7; #line 116 ".ROOT/.boots/corelib/Interfaces/Wr.i3" typedef struct { char* elts; int size[1]; } t57; #line 16 "../Interfaces/Type.i3" #define t42 t57 #define TC2 TC_Type__Map IMPORT TYPE TC_Type__Map; #line 16 IMPORT char VS_Type__Map__41dd9f4b33104fce; #define t13 ADDRESS #define TC13 TC_NULL IMPORT TYPE TC_NULL; IMPORT char VS_NULL__fb50c7d53bec30dc; #line 17 "../Interfaces/Scope.i3" #define t30 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 15 "../Interfaces/M3.i3" #define t24 ADDRESS #define TC24 TC_M3__Value IMPORT TYPE TC_M3__Value; #line 15 IMPORT char VS_M3__Value__6f64cf9c2cae25fb; #line 17 "../Interfaces/Scope.i3" #define t33 t57 #define TC30 TC_Scope__ValueList IMPORT TYPE TC_Scope__ValueList; #line 17 IMPORT char VS_Scope__ValueList__64bf053e22e4e53c; #line 14 "./Expr.i3" #define t37 ADDRESS #define t8 ADDRESS #define TC8 TC_M3__Expr IMPORT TYPE TC_M3__Expr; #line 16 "../Interfaces/M3.i3" IMPORT char VS_M3__Expr__8ae39aaa2d432477; #line 14 "./Expr.i3" #define t38 t57 #define TC37 TC_Expr__List IMPORT TYPE TC_Expr__List; #line 14 IMPORT char VS_Expr__List__3f87eceb2b9a246a; #line 17 "../Interfaces/Type.i3" #define t40 ADDRESS #define t11 ADDRESS #define TC11 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 { t40 _next; t11 _type; } t41; #define TC40 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 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 t10 ADDRESS #define TC10 TC_M3__Temp IMPORT TYPE TC_M3__Temp; #line 19 IMPORT char VS_M3__Temp__450b691937f03dae; #line 31 "./ExprRep.i3" typedef t10 (*t12)(); #line 24 typedef t8 (*t9)(); typedef unsigned char t5; #line 44 typedef t5 (*t6)(); #line 17 "CastExpr.m3" typedef struct { int filler; } t3_methods; #define t3_msize (sizeof (t3_methods)) typedef struct { #line 17 t8 _expr; t11 _tipe; } t3_fields; #define t3_size (sizeof (t3_fields)) PRIVATE void t3_InitProc (); #line 17 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 17 t3_size, t3_msize, NIL, 0, 0, t3_InitProc, t3_SetupProc, t3_PrintProc, "", 1325278543, 708608858}; PRIVATE TYPE TC3 = &t3_TC; #line 32 "../Interfaces/ArrayType.i3" typedef t11 (*t14)(); #line 29 typedef t7 (*t15)(); #line 15 "../Interfaces/Token.i3" typedef unsigned char t44; #line 45 typedef struct { int elts[4]; } t16; #define t17 ADDRESS #define TC17 TC_TEXT IMPORT TYPE TC_TEXT; IMPORT char VS_TEXT__b7a92447326386f5; #define t17_MapProc TC_TEXT->mapProc #define t18 ADDRESS #define TC18 TC_String__T IMPORT TYPE TC_String__T; #line 13 "../Interfaces/String.i3" IMPORT char VS_String__T__3a6c7dc12615e4ee; typedef struct { t18 _module; t18 _item; } t19; #line 27 "../Interfaces/Emit.i3" typedef signed_char t20; #line 63 typedef t20 (*t21)(); #line 19 "../Interfaces/String.i3" typedef signed_char t50; #line 65 "../Interfaces/Token.i3" #define t43 t57 typedef struct { t18 elts[100]; } t51; #line 17 "../Interfaces/String.i3" typedef struct { t7 _top; t51 _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 t25; typedef unsigned char t26; #line 14 "../Interfaces/M3.i3" #define t27 ADDRESS #define TC27 TC_M3__Scope IMPORT TYPE TC_M3__Scope; #line 14 IMPORT char VS_M3__Scope__6e6d8848308d8a2d; #line 24 "../Interfaces/Variable.i3" typedef t23 (*t28)(); #line 14 "../Interfaces/Decl.i3" typedef struct { t18 _alias; t5 _isExternal; t5 _isInline; t5 _isUnused; t5 _isObsolete; } t29; #line 38 "../Interfaces/Scope.i3" typedef t24 (*t31)(); #line 31 typedef t27 (*t32)(); #line 18 "../Interfaces/Value.i3" typedef unsigned char t34; #line 40 typedef t34 (*t35)(); #line 13 "./ExprRep.i3" #define t36 ADDRESS #line 13 typedef struct { t4 _bind; t4 _check; t4 _write; t6 _isEqual; t9 _evaluate; t4 _getBounds; t6 _isWritable; t6 _isDesignator; #line 13 t6 _isZeroes; t4 _genLiteral; t4 _fprint; t12 _compile; } t36_methods; #define t36_msize (sizeof (t36_methods)) typedef struct { #line 13 t7 _origin; t11 _type; t5 _bound; t5 _inCheck; t5 _checked; } t36_fields; #define t36_size (sizeof (t36_fields)) #define TC36 TC_M3__Expr typedef t2 (*t39)(); #line 65 "../Interfaces/Token.i3" typedef struct { t18 elts[97]; } t45; typedef int t46; #line 37 "../Interfaces/String.i3" typedef t17 (*t47)(); #line 34 typedef t18 (*t48)(); #line 28 #define t49 t57 typedef signed_char t53; #line 67 ".ROOT/.boots/corelib/Interfaces/Text.i3" typedef t53 (*t54)(); #line 26 typedef t46 (*t55)(); #line 23 typedef t26 (*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 t46 _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 t74; #line 11 "CastExpr.m3" IMPORT INITLINK* ArrayType__init; IMPORT INITLINK* Wr__init; IMPORT INITLINK* Temp__init; IMPORT INITLINK* Error__init; IMPORT INITLINK* Emit__init; #line 11 IMPORT INITLINK* String__init; IMPORT INITLINK* Type__init; IMPORT INITLINK* ExprRep__init; IMPORT INITLINK* Expr__init; IMPORT INITLINK* CastExpr__init; #line 11 IMPORT t5 _ArrayType__Split (); IMPORT char VS_ArrayType__Split__b3402f88270f8053; IMPORT t11 _ArrayType__OpenImpl (); IMPORT char VS_ArrayType__OpenImpl__fe61729235c79eff; #line 11 IMPORT EXCEPTION_NAME _Thread__Alerted; IMPORT char VS_Thread__Alerted__fc88feb43485af46; IMPORT EXCEPTION_NAME _Wr__Failure; #line 11 IMPORT char VS_Wr__Failure__5f82cfb43dabf527; IMPORT EXCEPTION_NAME _Wr__Error; IMPORT char VS_Wr__Error__c367253d3ed4fd15; #line 11 IMPORT t73 _Wr__PutText (); IMPORT char VS_Wr__PutText__e034dab73a793846; IMPORT TYPE TC_Temp__T; IMPORT char VS_Temp__T__3a6c7dc12615e4ee; #line 11 IMPORT t10 _Temp__AllocEmpty (); IMPORT char VS_Temp__AllocEmpty__20296f6d2a78c948; IMPORT t10 _Temp__AllocMacro (); IMPORT char VS_Temp__AllocMacro__0d68005335e03ba8; #line 11 IMPORT t10 _Temp__Alloc (); IMPORT char VS_Temp__Alloc__0b946c9d3ec0974e; IMPORT t73 _Temp__Free (); IMPORT char VS_Temp__Free__3b952a2225c26846; #line 11 IMPORT t73 _Temp__Depend (); IMPORT char VS_Temp__Depend__11ca183d3fa8461d; IMPORT t73 _Error__Msg (); IMPORT char VS_Error__Msg__4d119a332467757f; #line 11 IMPORT char VS_Emit__MaxStream__cf0a0e8934c9c9f3; IMPORT TYPE TC_Emit__Format; IMPORT char VS_Emit__Format__bc4a2b083b93bbd7; #line 11 IMPORT t73 _Emit__OpTT (); IMPORT char VS_Emit__OpTT__cba0ce912431e01c; IMPORT t73 _Emit__OpTI (); IMPORT char VS_Emit__OpTI__af828b1c28578815; #line 11 IMPORT t73 _Emit__OpIT (); IMPORT char VS_Emit__OpIT__1322d0f925e21d92; IMPORT TYPE TC_Type__T; IMPORT char VS_Type__T__2446b70b3f7780a5; #line 11 IMPORT t11 _Type__Bind (); IMPORT char VS_Type__Bind__3443ccd12eedb9e8; IMPORT t7 _Type__Size (); IMPORT char VS_Type__Size__2f4d980e28adf05b; #line 11 IMPORT t73 _Type__GetBounds (); IMPORT char VS_Type__GetBounds__9a241b2b3c98ad98; IMPORT t5 _Type__SameImpl (); IMPORT char VS_Type__SameImpl__9a0ca0e12e96a5ea; #line 11 IMPORT t5 _Type__IsEqual (); IMPORT char VS_Type__IsEqual__4098bc3f32325d05; IMPORT t73 _Type__Check (); IMPORT char VS_Type__Check__3c8ceb09206ee440; #line 11 IMPORT t7 _Type__Name (); IMPORT char VS_Type__Name__f99416972257a869; IMPORT t73 _Type__Fingerprint (); IMPORT char VS_Type__Fingerprint__0d24a3463c25e166; #line 11 IMPORT t73 _ExprRep__Init (); IMPORT char VS_ExprRep__Init__8b7fff3e227cebab; IMPORT t73 _ExprRep__NoBind (); IMPORT char VS_ExprRep__NoBind__e7d0d3dd3d703c08; #line 11 IMPORT t73 _ExprRep__NoCheck (); IMPORT char VS_ExprRep__NoCheck__c11b54bc361794fa; IMPORT t8 _ExprRep__NoValue (); IMPORT char VS_ExprRep__NoValue__8ccc143224598a66; #line 11 IMPORT t73 _ExprRep__NoBounds (); IMPORT char VS_ExprRep__NoBounds__b64bb146289ee4f0; IMPORT t5 _ExprRep__IsNever (); IMPORT char VS_ExprRep__IsNever__8f1a069b301903c8; #line 11 IMPORT t5 _ExprRep__NeverEq (); IMPORT char VS_ExprRep__NeverEq__dfdc2412249ccb65; IMPORT t73 _ExprRep__NoWriter (); IMPORT char VS_ExprRep__NoWriter__a97bb1a23bbf506e; #line 11 IMPORT t73 _ExprRep__NoLiteral (); IMPORT char VS_ExprRep__NoLiteral__6c9c90073f496f67; IMPORT TYPE TC_Expr__T; IMPORT char VS_Expr__T__2446b70b3f7780a5; #line 11 IMPORT t73 _Expr__Bind (); IMPORT char VS_Expr__Bind__7e2752da3eaf56eb; IMPORT t11 _Expr__TypeOf (); IMPORT char VS_Expr__TypeOf__fef0a11b388c64fa; #line 11 IMPORT t8 _Expr__ConstValue (); IMPORT char VS_Expr__ConstValue__ce4fd448218fe483; IMPORT t73 _Expr__GetBounds (); IMPORT char VS_Expr__GetBounds__b20ec781333da5e4; #line 11 IMPORT t5 _Expr__IsDesignator (); IMPORT char VS_Expr__IsDesignator__e3556614321cb906; IMPORT t5 _Expr__IsWritable (); IMPORT char VS_Expr__IsWritable__85b9bb292e4a0f55; #line 11 IMPORT t73 _Expr__TypeCheck (); IMPORT char VS_Expr__TypeCheck__af9aa9073729e7f7; IMPORT t10 _Expr__Compile (); IMPORT char VS_Expr__Compile__a7e0cc4029a2ec76; #line 11 IMPORT t5 _Expr__IsEqual (); IMPORT char VS_Expr__IsEqual__062d8b2c385e35a9; IMPORT t73 _Expr__Fingerprint (); IMPORT char VS_Expr__Fingerprint__50ce687c31d90a5b; #line 11 EXPORT t8 _CastExpr__New (); EXPORT char VS_CastExpr__New__4a559a192846469c = '\0'; PRIVATE TYPE TC_CastExpr__P; PRIVATE t73 _CastExpr__Bind (); #line 11 PRIVATE t73 _CastExpr__Check (); PRIVATE t5 _CastExpr__EqCheck (); PRIVATE t10 _CastExpr__Compile (); PRIVATE t73 _CastExpr__Writer (); #line 11 PRIVATE t8 _CastExpr__Fold (); PRIVATE t73 _CastExpr__Bounder (); PRIVATE t5 _CastExpr__IsDesignator (); PRIVATE t5 _CastExpr__IsWritable (); #line 11 PRIVATE t73 _CastExpr__FPrinter (); IMPORT char VS_M3__Expr__58bf709e39adf1f7; #line 35 "CastExpr.m3" EXPORT t8 _CastExpr__New (_a, _t) t8 _a; t11 _t; { t3 z0; t3 z2; #line 35 "CastExpr.m3" { auto t3 _p; auto t8 __result; { ZERO1 (& _p); #line 35 CHECKSTACKOVERFLOW; { register char** ptr = (char**) UNEWOBJ (TC3); z0 = (t3) ptr; }; _p = z0; _ExprRep__Init (_p); NILCHECKA (z2 = _p); (((t3_fields*)(z2+(0+t36_size+t70_size)))->_expr) = _a; NILCHECKA (z2 = _p); (((t3_fields*)(z2+(0+t36_size+t70_size)))->_tipe) = _t; __result = _p; return __result; } } }; #line 45 "CastExpr.m3" PRIVATE t73 _CastExpr__Bind (_p) t3 _p; { t3 z2; t11 z3; t3 z1; #line 45 "CastExpr.m3" { { CHECKSTACKOVERFLOW; NILCHECKA (z2 = _p); _Expr__Bind ((((t3_fields*)(z2+(0+t36_size+t70_size)))->_expr)); NILCHECKA (z2 = _p); z3 = _Type__Bind ((((t3_fields*)(z2+(0+t36_size+t70_size)))->_tipe)); NILCHECKA (z1 = _p); (((t3_fields*)(z1+(0+t36_size+t70_size)))->_tipe) = z3; NILCHECKA (z1 = _p); (((t36_fields*)(z1+(0+t70_size)))->_type) = (((t3_fields*)(z1+(0+t36_size+t70_size)))->_tipe); #line 49 } } }; #line 52 "CastExpr.m3" PRIVATE t73 _CastExpr__Check (_p) t3 _p; { t3 z2; t11 z3; t5 z4; t5 z0; t7 z5; t5 z6; t7 z7; t7 z8; #line 52 "CastExpr.m3" { auto t11 _u; auto t11 _index; auto t11 _elt; auto t11 _elt2; auto t7 _sz0; auto t7 _sz1; { CHECKSTACKOVERFLOW; NILCHECKA (z2 = _p); _Expr__TypeCheck ((((t3_fields*)(z2+(0+t36_size+t70_size)))->_expr)); NILCHECKA (z2 = _p); _Type__Check ((((t3_fields*)(z2+(0+t36_size+t70_size)))->_tipe)); NILCHECKA (z2 = _p); z3 = _Expr__TypeOf ((((t3_fields*)(z2+(0+t36_size+t70_size)))->_expr)); _u = z3; z4 = _ArrayType__Split (_u, &_index, &_elt); z0 = 0; if (z4) { z4 = (_index == 0); z0 = z4; }; if (z0) { _Error__Msg (((ADDRESS)(& txt1.str))); goto if_1_end; }; if_1_end: /**/; z5 = _Type__Size (_u); _sz0 = z5; NILCHECKA (z2 = _p); z6 = _ArrayType__Split ((((t3_fields*)(z2+(0+t36_size+t70_size)))->_tipe), &_index, &_elt); z0 = 0; #line 62 if (z6) { z4 = (_index == 0); z0 = z4; }; if (z0) { z4 = _ArrayType__Split (_elt, &_index, &_elt2); z0 = 0; if (z4) { z4 = (_index == 0); z0 = z4; }; if (z0) { _Error__Msg (((ADDRESS)(& txt2.str))); goto if_3_end; }; if_3_end: /**/; z5 = _Type__Size (_elt); _sz1 = z5; z4 = (_sz1 <= 0 ); z0 = 1; if (! z4) { z5 = _sz0; z7 = _sz1; z8 = z5 - (z7 * (IDIV (z5, z7))); z4 = (z8 != 0 ); #line 68 z0 = z4; }; if (z0) { _Error__Msg (((ADDRESS)(& txt3.str))); goto if_4_end; }; if_4_end: /**/; goto if_2_end; }; NILCHECKA (z2 = _p); z5 = _Type__Size ((((t3_fields*)(z2+(0+t36_size+t70_size)))->_tipe)); _sz1 = z5; z4 = (_sz0 != _sz1); if (z4) { _Error__Msg (((ADDRESS)(& txt4.str))); goto if_5_end; }; if_5_end: /**/; if_2_end: /**/; } } }; #line 80 "CastExpr.m3" PRIVATE t5 _CastExpr__EqCheck (_a, _e) t3 _a; t8 _e; { t3 z2; t3 z4; t5 z5; t5 z0; t3 z3; t3 z6; #line 80 "CastExpr.m3" { auto t5 __result; { ZERO1B (& __result); CHECKSTACKOVERFLOW; { register ADDRESS ref = (ADDRESS) _e; register int tc = TYPECODE (ref); if (tc == 0) goto tc0_0; if (ISSUBTYPE (tc, TC3)) goto tc0_1; #line 82 goto tc0_else; tc0_0:; __result = 0 ; return __result; tc0_1:; { auto t3 _b; { ZERO1 (& _b); #line 83 _b = (t3) ref; NILCHECKA (z2 = _a); NILCHECKA (z4 = _b); z5 = _Type__IsEqual ((((t3_fields*)(z2+(0+t36_size+t70_size)))->_tipe), (((t3_fields*)(z4+(0+t36_size+t70_size)))->_tipe)); #line 84 z0 = 0; if (z5) { NILCHECKA (z3 = _a); NILCHECKA (z6 = _b); z5 = _Expr__IsEqual ((((t3_fields*)(z3+(0+t36_size+t70_size)))->_expr), (((t3_fields*)(z6+(0+t36_size+t70_size)))->_expr)); #line 84 z0 = z5; }; __result = z0; return __result; } } tc0_else:; __result = 0 ; return __result; tc0_exit:; }; } } }; #line 90 "CastExpr.m3" PRIVATE t10 _CastExpr__Compile (_p) t3 _p; { t3 z1; t11 z2; t5 z3; t10 z4; t5 z5; t5 z0; t11 z6; t7 z7; t7 z8; t7 z9; #line 90 "CastExpr.m3" { auto t11 _t; auto t11 _u; auto t11 _index; auto t11 _elt; auto t8 _e; auto t10 _t1; auto t10 _t2; auto t10 _t3; auto t10 __result; #line 90 { CHECKSTACKOVERFLOW; NILCHECKA (z1 = _p); _e = (((t3_fields*)(z1+(0+t36_size+t70_size)))->_expr); z2 = _Expr__TypeOf (_e); _u = z2; NILCHECKA (z1 = _p); _t = (((t3_fields*)(z1+(0+t36_size+t70_size)))->_tipe); z3 = _Type__SameImpl (_u, _t); if (z3) { z4 = _Expr__Compile (_e); __result = z4; return __result; }; z5 = _ArrayType__Split (_t, &_index, &_elt); z0 = 0; #line 97 if (z5) { z3 = (_index == 0); z0 = z3; }; if (z0) { z4 = _Expr__Compile (_e); _t2 = z4; z6 = _ArrayType__OpenImpl (_t); z4 = _Temp__AllocEmpty (z6, 1 ); _t1 = z4; _Emit__OpTT (((ADDRESS)(& txt5.str)), _t1, _t2); z7 = _Type__Size (_u); z8 = _Type__Size (_elt); z9 = IDIV (z7, z8); _Emit__OpTI (((ADDRESS)(& txt6.str)), _t1, z9); _Temp__Free (_t2); __result = _t1; return __result; }; z3 = _Expr__IsDesignator (_e); z0 = ! z3; if (z0) { z4 = _Expr__Compile (_e); _t2 = z4; z4 = _Temp__Alloc (_e); _t1 = z4; _Emit__OpTT (((ADDRESS)(& txt7.str)), _t1, _t2); _Temp__Free (_t2); z4 = _Temp__AllocMacro (_p, 1 ); _t3 = z4; _Temp__Depend (_t3, _t1); __result = _t3; return __result; }; z4 = _Expr__Compile (_e); _t1 = z4; z4 = _Temp__AllocMacro (_p, 1 ); _t3 = z4; _Temp__Depend (_t3, _t1); __result = _t3; return __result; } } }; #line 122 "CastExpr.m3" PRIVATE t73 _CastExpr__Writer (_p, _t1, _t2) t3 _p; t10 _t1; t10 _t2; { t3 z4; t7 z5; #line 122 "CastExpr.m3" { { CHECKSTACKOVERFLOW; NILCHECKA (z4 = _p); z5 = _Type__Name ((((t3_fields*)(z4+(0+t36_size+t70_size)))->_tipe)); _Emit__OpIT (((ADDRESS)(& txt8.str)), z5, _t1); #line 124 } } }; #line 127 "CastExpr.m3" PRIVATE t8 _CastExpr__Fold (_p) t3 _p; { t3 z2; t8 z3; t5 z4; #line 127 "CastExpr.m3" { auto t8 _e; auto t8 __result; { CHECKSTACKOVERFLOW; NILCHECKA (z2 = _p); z3 = _Expr__ConstValue ((((t3_fields*)(z2+(0+t36_size+t70_size)))->_expr)); _e = z3; z4 = (_e == 0); if (z4) { __result = 0; return __result; }; NILCHECKA (z2 = _p); (((t3_fields*)(z2+(0+t36_size+t70_size)))->_expr) = _e; __result = _p; return __result; } } }; #line 136 "CastExpr.m3" PRIVATE t73 _CastExpr__Bounder (_p, _min, _max) t3 _p; t7 * _min; t7 * _max; { t3 z2; t7 z3; t7 z4; #line 136 "CastExpr.m3" { auto t7 _min1; auto t7 _max1; { CHECKSTACKOVERFLOW; NILCHECKA (z2 = _p); _Expr__GetBounds ((((t3_fields*)(z2+(0+t36_size+t70_size)))->_expr), &(*_min), &(*_max)); NILCHECKA (z2 = _p); _Type__GetBounds ((((t3_fields*)(z2+(0+t36_size+t70_size)))->_tipe), &_min1, &_max1); z3 = (*_min); z4 = _min1; if (z3 < z4) z3 = z4; (*_min) = z3; z3 = (*_max); z4 = _max1; if (z3 > z4) z3 = z4; (*_max) = z3; } } }; #line 145 "CastExpr.m3" PRIVATE t5 _CastExpr__IsDesignator (_p) t3 _p; { t3 z2; t5 z3; #line 145 "CastExpr.m3" { auto t5 __result; { ZERO1B (& __result); CHECKSTACKOVERFLOW; NILCHECKA (z2 = _p); z3 = _Expr__IsDesignator ((((t3_fields*)(z2+(0+t36_size+t70_size)))->_expr)); __result = z3; return __result; #line 147 } } }; #line 150 "CastExpr.m3" PRIVATE t5 _CastExpr__IsWritable (_p) t3 _p; { t3 z2; t5 z3; #line 150 "CastExpr.m3" { auto t5 __result; { ZERO1B (& __result); CHECKSTACKOVERFLOW; NILCHECKA (z2 = _p); z3 = _Expr__IsWritable ((((t3_fields*)(z2+(0+t36_size+t70_size)))->_expr)); __result = z3; return __result; #line 152 } } }; #line 155 "CastExpr.m3" PRIVATE t73 _CastExpr__FPrinter (_p, _map, _wr) t3 _p; t2 _map; t1 _wr; { t3 z2; #line 155 "CastExpr.m3" { { CHECKSTACKOVERFLOW; _Wr__PutText (_wr, ((ADDRESS)(& txt9.str))); NILCHECKA (z2 = _p); _Expr__Fingerprint ((((t3_fields*)(z2+(0+t36_size+t70_size)))->_expr), _map, _wr); NILCHECKA (z2 = _p); _Type__Fingerprint ((((t3_fields*)(z2+(0+t36_size+t70_size)))->_tipe), _map, _wr); } } }; PRIVATE int init_done = -1; #line 159 "CastExpr.m3" PRIVATE void CastExpr__initProc (g) int g; { #line 159 "CastExpr.m3" if (init_done >= g) return; init_done = g; INITIALIZE (& CastExpr__init); INITIALIZE (& ArrayType__init); INITIALIZE (& Wr__init); #line 159 INITIALIZE (& Temp__init); INITIALIZE (& Error__init); INITIALIZE (& Emit__init); INITIALIZE (& String__init); INITIALIZE (& Type__init); #line 159 INITIALIZE (& ExprRep__init); INITIALIZE (& Expr__init); return; }; #line 159 "CastExpr.m3" PRIVATE void t3_InitProc (obj) char* obj; { register t3_fields* p; #line 159 "CastExpr.m3" CHECKSTACKOVERFLOW; p = (t3_fields*) (obj + TC8->datasize); }; #line 159 "CastExpr.m3" PRIVATE void t3_SetupProc () { register int* p; #line 159 "CastExpr.m3" t3_TC.datasize += TC8->datasize; t3_TC.methodsize += TC8->methodsize; p = (int*) UALLOC (t3_TC.methodsize); COPY (TC8->defaultMethods, p, (TC8->methodsize)); #line 159 p[0] = (int)(& t3_TC); p[1] = 0; ((t36_methods*) (((char*)p) + TC70->methodsize))->_bind = _CastExpr__Bind; ((t36_methods*) (((char*)p) + TC70->methodsize))->_check = _CastExpr__Check; #line 159 ((t36_methods*) (((char*)p) + TC70->methodsize))->_compile = _CastExpr__Compile; ((t36_methods*) (((char*)p) + TC70->methodsize))->_evaluate = _CastExpr__Fold; #line 159 ((t36_methods*) (((char*)p) + TC70->methodsize))->_fprint = _CastExpr__FPrinter; ((t36_methods*) (((char*)p) + TC70->methodsize))->_write = _CastExpr__Writer; #line 159 ((t36_methods*) (((char*)p) + TC70->methodsize))->_isEqual = _CastExpr__EqCheck; ((t36_methods*) (((char*)p) + TC70->methodsize))->_getBounds = _CastExpr__Bounder; #line 159 ((t36_methods*) (((char*)p) + TC70->methodsize))->_isWritable = _CastExpr__IsWritable; ((t36_methods*) (((char*)p) + TC70->methodsize))->_isDesignator = _CastExpr__IsDesignator; #line 159 ((t36_methods*) (((char*)p) + TC70->methodsize))->_isZeroes = _ExprRep__IsNever; ((t36_methods*) (((char*)p) + TC70->methodsize))->_genLiteral = _ExprRep__NoLiteral; #line 159 t3_TC.defaultMethods = (char*) p; }; #line 159 "CastExpr.m3" PRIVATE void t3_PrintProc (obj) char *obj; { t3_fields* o; #line 159 "CastExpr.m3" CHECKSTACKOVERFLOW; if (TC8->printProc != 0) {TC8->printProc (obj); } fprintf (stderr, "{%s} ", TC3->brand); o = (t3_fields*) (obj + TC8->datasize); #line 159 fprintf (stderr, "expr = %#x", o->_expr); fprintf (stderr, ", "); fprintf (stderr, "tipe = %#x", o->_tipe); fprintf (stderr, ", "); #line 159 }; PRIVATE INITLINK me_0 ={(INITLINK*)NIL, 0, CastExpr__initProc}; static char* VSimports[] = { &VS_ArrayType__Split__b3402f88270f8053, &VS_ArrayType__OpenImpl__fe61729235c79eff, &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_Error__Msg__4d119a332467757f, &VS_Emit__MaxStream__cf0a0e8934c9c9f3, &VS_Emit__Format__bc4a2b083b93bbd7, &VS_Emit__OpTT__cba0ce912431e01c, &VS_Emit__OpTI__af828b1c28578815, &VS_Emit__OpIT__1322d0f925e21d92, &VS_String__T__3a6c7dc12615e4ee, &VS_Type__T__2446b70b3f7780a5, &VS_Type__Map__41dd9f4b33104fce, &VS_Type__List__5791758e343becc1, &VS_Type__Bind__3443ccd12eedb9e8, &VS_Type__Size__2f4d980e28adf05b, &VS_Type__GetBounds__9a241b2b3c98ad98, &VS_Type__SameImpl__9a0ca0e12e96a5ea, &VS_Type__IsEqual__4098bc3f32325d05, &VS_Type__Check__3c8ceb09206ee440, &VS_Type__Name__f99416972257a869, &VS_Type__Fingerprint__0d24a3463c25e166, &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_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__IsEqual__062d8b2c385e35a9, &VS_Expr__Fingerprint__50ce687c31d90a5b, NIL }; void CastExpr__MLink (phase) int phase; { switch (phase) { case 0: { me_0.link = CastExpr__init; CastExpr__init = & me_0; t3_TC = t3_TC_init; REGISTERTYPE (TC3); break; }; case 1: { t3_TC.parent = TC_M3__Expr; break; }; case 2: { break; }; }; };