#include "M3Runtime.h" typedef struct { int tc; char* str; int len; } TXT; PRIVATE TXT txt1 = { 3, "ABS", 4}; PRIVATE TXT txt2 = { 3, "ABS: wrong argument type", 25}; PRIVATE TXT txt3 = { 3, "@ = @;\012", 8}; PRIVATE TXT txt4 = { 3, "if (@ < 0) @ = - @;\012", 21}; PRIVATE TXT txt5 = { 3, "if (@ < 0.0) @ = - @;\012", 23}; #line 14 "../Interfaces/Expr.i3" #define t5 ADDRESS #define t75 void #define t72 ADDRESS typedef struct { TYPE self; int private; } t72_methods; #define t72_msize (sizeof (t72_methods)) typedef struct { ADDRESS methods; } t72_fields; #define t72_size (sizeof (t72_fields)) #define TC72 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 116 ".ROOT/.boots/corelib/Interfaces/Wr.i3" typedef struct { char* elts; int size[1]; } t59; #line 14 "../Interfaces/Expr.i3" #define t41 t59 #define TC5 TC_Expr__List IMPORT TYPE TC_Expr__List; #line 14 IMPORT char VS_Expr__List__3f87eceb2b9a246a; #line 17 "../Interfaces/Scope.i3" #define t31 ADDRESS #define t24 ADDRESS #define TC24 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 t34 t59 #define TC31 TC_Scope__ValueList IMPORT TYPE TC_Scope__ValueList; #line 17 IMPORT char VS_Scope__ValueList__64bf053e22e4e53c; #define t36 ADDRESS typedef int t3; #define TC36 TC_ADDRESS IMPORT TYPE TC_ADDRESS; IMPORT char VS_ADDRESS__30f7308738738b44; #line 16 "../Interfaces/Type.i3" #define t38 ADDRESS #define t46 t59 #define TC38 TC_Type__Map IMPORT TYPE TC_Type__Map; #line 16 IMPORT char VS_Type__Map__41dd9f4b33104fce; #define t44 ADDRESS #define t8 ADDRESS #define TC8 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 { t44 _next; t8 _type; } t45; #define TC44 TC_Type__List IMPORT TYPE TC_Type__List; #line 17 IMPORT char VS_Type__List__5791758e343becc1; #define t61 ADDRESS #define TC61 TC_REFANY IMPORT TYPE TC_REFANY; IMPORT char VS_REFANY__4b8748e831fc107a; #define t76 ADDRESS #define TC76 TC_NULL IMPORT TYPE TC_NULL; IMPORT char VS_NULL__fb50c7d53bec30dc; #line 70 "Abs.m3" typedef t75 (*t1)(); typedef double t2; #line 50 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 34 "Abs.m3" typedef t7 (*t9)(); #line 20 typedef t8 (*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/LongrealExpr.i3" typedef t12 (*t13)(); #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/Variable.i3" #define t15 ADDRESS #define TC15 TC_Variable__T IMPORT TYPE TC_Variable__T; #line 16 IMPORT char VS_Variable__T__be7ead4a3afd8be5; #line 14 "../Interfaces/VarExpr.i3" typedef t15 (*t16)(); #line 15 "../Interfaces/Reel.i3" typedef t14 (*t17)(); #line 14 typedef t2 (*t18)(); #define t19 ADDRESS #define TC19 TC_TEXT IMPORT TYPE TC_TEXT; IMPORT char VS_TEXT__b7a92447326386f5; #define t19_MapProc TC_TEXT->mapProc typedef struct { #line 14 "../Interfaces/String.i3" t14 _module; t14 _item; } t20; #line 27 "../Interfaces/Emit.i3" typedef signed_char t21; #line 63 typedef t21 (*t22)(); #line 19 "../Interfaces/String.i3" typedef signed_char t53; #line 65 "../Interfaces/Token.i3" #define t47 t59 typedef struct { t14 elts[100]; } t54; #line 17 "../Interfaces/String.i3" typedef struct { t3 _top; t54 _stk; } t23; typedef unsigned char t25; #line 37 "../Interfaces/Procedure.i3" #define t26 t59 #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 { t14 _alias; t12 _isExternal; t12 _isInline; t12 _isUnused; t12 _isObsolete; } t28; #line 15 "../Interfaces/Token.i3" typedef unsigned char t48; #line 45 typedef struct { int elts[4]; } t29; #line 14 "../Interfaces/M3.i3" #define t30 ADDRESS #define TC30 TC_M3__Scope IMPORT TYPE TC_M3__Scope; #line 14 IMPORT char VS_M3__Scope__6e6d8848308d8a2d; #line 38 "../Interfaces/Scope.i3" typedef t24 (*t32)(); #line 31 typedef t30 (*t33)(); #line 27 "../Interfaces/CallExpr.i3" typedef t11 (*t35)(); #define t62 ADDRESS typedef struct { TYPE self; int private; } t62_methods; #define t62_msize (sizeof (t62_methods)) typedef struct { ADDRESS methods; } t62_fields; #define t62_size (sizeof (t62_fields)) #define TC62 TC_ROOT IMPORT TYPE TC_ROOT; IMPORT char VS_ROOT__349f58f628be0ac6; #define t62_MapProc TC_ROOT->mapProc #define t37 ADDRESS #define TC37 TC_Wr__T IMPORT TYPE TC_Wr__T; #line 90 ".ROOT/.boots/corelib/Interfaces/Wr.i3" IMPORT char VS_Wr__T__2555b70b3f7780b1; #define t37_MapProc TC_Wr__T->mapProc typedef unsigned char t39; #line 40 "../Interfaces/Value.i3" typedef t39 (*t40)(); #line 121 "../Interfaces/Type.i3" typedef t38 (*t42)(); #line 97 typedef t3 (*t43)(); #line 65 "../Interfaces/Token.i3" typedef struct { t14 elts[97]; } t49; typedef int t50; #line 37 "../Interfaces/String.i3" typedef t19 (*t51)(); #line 28 #define t52 t59 typedef signed_char t55; #line 67 ".ROOT/.boots/corelib/Interfaces/Text.i3" typedef t55 (*t56)(); #line 26 typedef t50 (*t57)(); #line 23 typedef t25 (*t58)(); #line 91 ".ROOT/.boots/corelib/Interfaces/Wr.i3" typedef unsigned char t60; #line 15 ".ROOT/.boots/corelib/Interfaces/Thread.i3" #define t63 ADDRESS #define TC63 TC_Thread__T IMPORT TYPE TC_Thread__T; #line 15 IMPORT char VS_Thread__T__2555b70b3f7780b1; #define t63_MapProc TC_Thread__T->mapProc typedef t61 (*t64)(); #define t65 ADDRESS #define TC65 TC_Thread__Condition IMPORT TYPE TC_Thread__Condition; #line 21 IMPORT char VS_Thread__Condition__26d5968239e08f4e; #define t65_MapProc TC_Thread__Condition->mapProc #define t66 ADDRESS #define TC66 TC_MUTEX IMPORT TYPE TC_MUTEX; IMPORT char VS_MUTEX__1f9d4e89391ab815; #define t66_MapProc TC_MUTEX->mapProc typedef t63 (*t67)(); #line 23 #define t68 ADDRESS #line 23 typedef struct { t64 _apply; } t68_methods; #define t68_msize (sizeof (t68_methods)) typedef struct { #line 23 int filler; } t68_fields; #define t68_size (sizeof (t68_fields)) #define TC68 TC_Thread__Closure IMPORT TYPE TC_Thread__Closure; #line 23 IMPORT char VS_Thread__Closure__7fb5c6232c5a658a; #define t68_MapProc TC_Thread__Closure->mapProc typedef t65 (*t69)(); typedef t66 (*t70)(); #line 28 #define t71 ADDRESS #line 28 typedef struct { int filler; } t71_methods; #define t71_msize (sizeof (t71_methods)) typedef struct { #line 28 t50 _stackSize; } t71_fields; #define t71_size (sizeof (t71_fields)) #define TC71 TC_Thread__SizedClosure IMPORT TYPE TC_Thread__SizedClosure; #line 28 IMPORT char VS_Thread__SizedClosure__8a46717d2eae7b07; #define t71_MapProc TC_Thread__SizedClosure->mapProc #define t73 ADDRESS #define TC73 TC_M3__Stmt IMPORT TYPE TC_M3__Stmt; #line 17 "../Interfaces/M3.i3" IMPORT char VS_M3__Stmt__376b307627fc1f2f; typedef CLOSURE t74; typedef float t77; #line 10 "Abs.m3" IMPORT INITLINK* Temp__init; IMPORT INITLINK* LongrealExpr__init; IMPORT INITLINK* RealExpr__init; IMPORT INITLINK* IntegerExpr__init; #line 10 IMPORT INITLINK* VarExpr__init; IMPORT INITLINK* Longreal__init; IMPORT INITLINK* Reel__init; IMPORT INITLINK* Int__init; #line 10 IMPORT INITLINK* Error__init; IMPORT INITLINK* Emit__init; IMPORT INITLINK* Procedure__init; IMPORT INITLINK* Type__init; #line 10 IMPORT INITLINK* Expr__init; IMPORT INITLINK* CallExpr__init; IMPORT INITLINK* Abs__init; IMPORT TYPE TC_Temp__T; IMPORT char VS_Temp__T__3a6c7dc12615e4ee; #line 10 IMPORT t7 _Temp__AllocEmpty (); IMPORT char VS_Temp__AllocEmpty__20296f6d2a78c948; IMPORT t75 _Temp__Free (); IMPORT char VS_Temp__Free__3b952a2225c26846; #line 10 IMPORT t4 _LongrealExpr__New (); IMPORT char VS_LongrealExpr__New__eccb05e538e7dc41; IMPORT t12 _LongrealExpr__Split (); #line 10 IMPORT char VS_LongrealExpr__Split__abe22fcb25f108c6; IMPORT t4 _RealExpr__New (); IMPORT char VS_RealExpr__New__99e36a77349ac542; #line 10 IMPORT t12 _RealExpr__Split (); IMPORT char VS_RealExpr__Split__0ceea1bc35e7091e; IMPORT t4 _IntegerExpr__New (); IMPORT char VS_IntegerExpr__New__864172512ee81acd; #line 10 IMPORT t12 _IntegerExpr__Split (); IMPORT char VS_IntegerExpr__Split__132919062838cba6; IMPORT t8 _Longreal__T; IMPORT char VS_Longreal__T__5097042c20911d85; #line 10 IMPORT t8 _Reel__T; IMPORT char VS_Reel__T__254c3c852237b326; IMPORT t8 _Int__T; IMPORT char VS_Int__T__1062912139372387; #line 10 IMPORT t75 _Error__Msg (); IMPORT char VS_Error__Msg__4d119a332467757f; IMPORT char VS_Emit__MaxStream__cf0a0e8934c9c9f3; #line 10 IMPORT TYPE TC_Emit__Format; IMPORT char VS_Emit__Format__bc4a2b083b93bbd7; IMPORT t75 _Emit__OpTT (); IMPORT char VS_Emit__OpTT__cba0ce912431e01c; #line 10 IMPORT t75 _Emit__OpTTT (); IMPORT char VS_Emit__OpTTT__91a3dd742690c5b9; IMPORT t75 _Procedure__Define (); IMPORT char VS_Procedure__Define__23155a563959ddb7; #line 10 IMPORT TYPE TC_Type__T; IMPORT char VS_Type__T__2446b70b3f7780a5; IMPORT t8 _Type__Base (); IMPORT char VS_Type__Base__2bebd0333659a92c; #line 10 IMPORT TYPE TC_Expr__T; IMPORT char VS_Expr__T__2446b70b3f7780a5; IMPORT t8 _Expr__TypeOf (); IMPORT char VS_Expr__TypeOf__fef0a11b388c64fa; #line 10 IMPORT t4 _Expr__ConstValue (); IMPORT char VS_Expr__ConstValue__ce4fd448218fe483; IMPORT t7 _Expr__Compile (); IMPORT char VS_Expr__Compile__a7e0cc4029a2ec76; #line 10 IMPORT t11 _CallExpr__NewMethodList (); IMPORT char VS_CallExpr__NewMethodList__1e86caa631267427; IMPORT t12 _CallExpr__IsNever (); #line 10 IMPORT char VS_CallExpr__IsNever__ed0ffc703e490927; EXPORT t75 _Abs__Initialize (); EXPORT char VS_Abs__Initialize__066de7143aeaf9ef = '\0'; #line 10 PRIVATE t11 _Abs__Z; PRIVATE t8 _Abs__Bind (); PRIVATE t75 _Abs__Check (); PRIVATE t7 _Abs__Compile (); PRIVATE t4 _Abs__Fold (); #line 10 #line 20 "Abs.m3" PRIVATE t8 _Abs__Bind (_proc, _args) t4 _proc; t5 _args; { t5 z3; t3 z5; t3 z6; t8 z4; t8 z1; #line 20 "Abs.m3" { auto t8 __result; { CHECKSTACKOVERFLOW; NILCHECKB (z3 = _args); { register t59* array = & (*((t41*) z3)); z6 = 0 ; if (z6 >= (array->size[0])) RANGEFAULT; #line 22 z5 = (int)(array->elts + (z6 * 4)); }; z4 = _Expr__TypeOf ((*(t4*)z5)); z1 = _Type__Base (z4); __result = z1; return __result; #line 22 } } }; #line 25 "Abs.m3" PRIVATE t75 _Abs__Check (_proc, _args) t4 _proc; t5 * _args; { t5 z3; t3 z5; t3 z6; t8 z4; t8 z1; t12 z2; t12 z0; t12 z7; #line 25 "Abs.m3" { auto t8 _t; { CHECKSTACKOVERFLOW; NILCHECKB (z3 = (*_args)); { register t59* array = & (*((t41*) z3)); z6 = 0 ; if (z6 >= (array->size[0])) RANGEFAULT; #line 28 z5 = (int)(array->elts + (z6 * 4)); }; z4 = _Expr__TypeOf ((*(t4*)z5)); z1 = _Type__Base (z4); _t = z1; z2 = (_t != _Int__T); z0 = 0; if (z2) { z7 = (_t != _Reel__T); z0 = z7; }; z2 = 0; if (z0) { z7 = (_t != _Longreal__T); #line 29 z2 = z7; }; if (z2) { _Error__Msg (((ADDRESS)(& txt2.str))); goto if_1_end; }; if_1_end: /**/; } } }; #line 34 "Abs.m3" PRIVATE t7 _Abs__Compile (_proc, _args) t4 _proc; t5 _args; { t5 z1; t3 z3; t3 z4; t8 z5; t8 z2; t7 z6; t12 z7; #line 34 "Abs.m3" { auto t8 _t; auto t4 _e; auto t7 _t1; auto t7 _t2; auto t7 __result; { CHECKSTACKOVERFLOW; NILCHECKB (z1 = _args); { register t59* array = & (*((t41*) z1)); z4 = 0 ; if (z4 >= (array->size[0])) RANGEFAULT; #line 37 z3 = (int)(array->elts + (z4 * 4)); }; _e = (*(t4*)z3); z5 = _Expr__TypeOf (_e); z2 = _Type__Base (z5); _t = z2; z6 = _Expr__Compile (_e); _t1 = z6; z6 = _Temp__AllocEmpty (_t, 0 ); _t2 = z6; _Emit__OpTT (((ADDRESS)(& txt3.str)), _t2, _t1); z7 = (_t == _Int__T); if (z7) { _Emit__OpTTT (((ADDRESS)(& txt4.str)), _t2, _t2, _t2); goto if_2_end; }; _Emit__OpTTT (((ADDRESS)(& txt5.str)), _t2, _t2, _t2); if_2_end: /**/; _Temp__Free (_t1); __result = _t2; return __result; } } }; #line 50 "Abs.m3" PRIVATE t4 _Abs__Fold (_proc, _args) t4 _proc; t5 _args; { t5 z2; t3 z4; t3 z5; t4 z3; t12 z6; t4 z1; t2 z7; #line 50 "Abs.m3" { auto t4 _e; auto t3 _i; auto t2 _r; auto t4 __result; { ZERO2 (& _r); #line 50 CHECKSTACKOVERFLOW; NILCHECKB (z2 = _args); { register t59* array = & (*((t41*) z2)); z5 = 0 ; if (z5 >= (array->size[0])) RANGEFAULT; #line 53 z4 = (int)(array->elts + (z5 * 4)); }; z3 = _Expr__ConstValue ((*(t4*)z4)); _e = z3; z6 = (_e == 0); if (z6) { __result = 0; return __result; }; z6 = _IntegerExpr__Split (_e, &_i); if (z6) { z6 = (_i < 0 ); if (z6) { z4 = - _i; z1 = _IntegerExpr__New (z4); _e = z1; goto if_4_end; }; if_4_end: /**/; __result = _e; return __result; }; z6 = _RealExpr__Split (_e, &_r); if (z6) { z6 = (_r < 0.0e+0 ); if (z6) { z7 = - _r; z1 = _RealExpr__New (z7); _e = z1; goto if_5_end; }; if_5_end: /**/; __result = _e; return __result; }; z6 = _LongrealExpr__Split (_e, &_r); if (z6) { z6 = (_r < 0.0e+0 ); if (z6) { z7 = - _r; z1 = _LongrealExpr__New (z7); _e = z1; goto if_6_end; }; if_6_end: /**/; __result = _e; return __result; }; __result = 0; return __result; } } }; #line 70 "Abs.m3" EXPORT t75 _Abs__Initialize () { t11 z10; #line 70 "Abs.m3" { { CHECKSTACKOVERFLOW; z10 = _CallExpr__NewMethodList ( 1 , 1 , 1 , _Abs__Bind, _Abs__Check, _Abs__Compile, _Abs__Fold, _CallExpr__IsNever, _CallExpr__IsNever); #line 72 _Abs__Z = z10; _Procedure__Define (((ADDRESS)(& txt1.str)), _Abs__Z, 0); } } }; PRIVATE int init_done = -1; #line 75 "Abs.m3" PRIVATE void Abs__initProc (g) int g; { #line 75 "Abs.m3" if (init_done >= g) return; init_done = g; INITIALIZE (& Abs__init); INITIALIZE (& Temp__init); INITIALIZE (& LongrealExpr__init); #line 75 INITIALIZE (& RealExpr__init); INITIALIZE (& IntegerExpr__init); INITIALIZE (& VarExpr__init); INITIALIZE (& Longreal__init); #line 75 INITIALIZE (& Reel__init); INITIALIZE (& Int__init); INITIALIZE (& Error__init); INITIALIZE (& Emit__init); INITIALIZE (& Procedure__init); #line 75 INITIALIZE (& Type__init); INITIALIZE (& Expr__init); INITIALIZE (& CallExpr__init); return; }; PRIVATE INITLINK me_0 ={(INITLINK*)NIL, 0, Abs__initProc}; static char* VSimports[] = { &VS_Temp__T__3a6c7dc12615e4ee, &VS_Temp__AllocEmpty__20296f6d2a78c948, &VS_Temp__Free__3b952a2225c26846, &VS_LongrealExpr__New__eccb05e538e7dc41, &VS_LongrealExpr__Split__abe22fcb25f108c6, &VS_RealExpr__New__99e36a77349ac542, &VS_RealExpr__Split__0ceea1bc35e7091e, &VS_IntegerExpr__New__864172512ee81acd, &VS_IntegerExpr__Split__132919062838cba6, &VS_Longreal__T__5097042c20911d85, &VS_Reel__T__254c3c852237b326, &VS_Int__T__1062912139372387, &VS_Error__Msg__4d119a332467757f, &VS_Emit__MaxStream__cf0a0e8934c9c9f3, &VS_Emit__Format__bc4a2b083b93bbd7, &VS_Emit__OpTT__cba0ce912431e01c, &VS_Emit__OpTTT__91a3dd742690c5b9, &VS_Procedure__T__be7ead4a3afd8be5, &VS_Procedure__Define__23155a563959ddb7, &VS_Type__T__2446b70b3f7780a5, &VS_Type__Map__41dd9f4b33104fce, &VS_Type__List__5791758e343becc1, &VS_Type__Base__2bebd0333659a92c, &VS_Expr__T__2446b70b3f7780a5, &VS_Expr__List__3f87eceb2b9a246a, &VS_Expr__TypeOf__fef0a11b388c64fa, &VS_Expr__ConstValue__ce4fd448218fe483, &VS_Expr__Compile__a7e0cc4029a2ec76, &VS_CallExpr__MethodList__7e87c2d720444b71, &VS_CallExpr__NewMethodList__1e86caa631267427, &VS_CallExpr__IsNever__ed0ffc703e490927, NIL }; void Abs__MLink (phase) int phase; { switch (phase) { case 0: { me_0.link = Abs__init; Abs__init = & me_0; break; }; case 1: { break; }; case 2: { break; }; }; };