#include "M3Runtime.h" typedef struct { int tc; char* str; int len; } TXT; PRIVATE TXT txt1 = { 3, ": info", 7}; PRIVATE TXT txt2 = { 3, ": warning", 10}; PRIVATE TXT txt3 = { 3, " (", 3}; PRIVATE TXT txt4 = { 3, ")", 2}; PRIVATE TXT txt5 = { 3, ".", 2}; PRIVATE TXT txt6 = { 3, ": ", 3}; PRIVATE TXT txt7 = { 3, "non-standard Modula-3: ", 24}; PRIVATE TXT txt8 = { 3, "\042", 2}; PRIVATE TXT txt9 = { 3, "\042, line ", 9}; PRIVATE TXT txt10 = { 3, "\012", 2}; #line 163 "Error.m3" #define t4 ADDRESS typedef int t3; #line 163 typedef struct { t3 _offs; t4 _next; } t8; PRIVATE void t4_PrintProc (); PRIVATE typecell t4_TC; PRIVATE typecell t4_TC_init = {0, 0, 0, 0, 0, (PROC)NIL, #line 163 8, 0, NIL, 0, 0, (PROC)NIL, (PROC)NIL, t4_PrintProc, "", -715108753, 1022686376}; PRIVATE TYPE TC4 = &t4_TC; #define t31 ADDRESS #define t57 void #define TC31 TC_REFANY IMPORT TYPE TC_REFANY; IMPORT char VS_REFANY__4b8748e831fc107a; #define t37 ADDRESS #define TC37 TC_ADDRESS IMPORT TYPE TC_ADDRESS; IMPORT char VS_ADDRESS__30f7308738738b44; #define t59 ADDRESS #define TC59 TC_NULL IMPORT TYPE TC_NULL; IMPORT char VS_NULL__fb50c7d53bec30dc; #line 116 ".ROOT/.boots/corelib/Interfaces/Wr.i3" typedef struct { char* elts; int size[1]; } t45; #line 27 "Error.m3" #define t1 t45 #define t10 ADDRESS #define TC10 TC_TEXT IMPORT TYPE TC_TEXT; IMPORT char VS_TEXT__b7a92447326386f5; #define t10_MapProc TC_TEXT->mapProc #define t2 t45 typedef unsigned char t5; #line 175 typedef t5 (*t6)(); #line 166 typedef t57 (*t7)(); #line 13 "./String.i3" #define t9 ADDRESS #define TC9 TC_String__T IMPORT TYPE TC_String__T; #line 13 IMPORT char VS_String__T__3a6c7dc12615e4ee; typedef struct { t9 _module; t9 _item; } t11; #line 16 "Error.m3" typedef signed_char t12; #line 27 typedef struct { t3 elts[4]; } t13; #line 19 typedef struct { t10 elts[4]; } t14; #define t32 ADDRESS typedef struct { TYPE self; int private; } t32_methods; #define t32_msize (sizeof (t32_methods)) typedef struct { ADDRESS methods; } t32_fields; #define t32_size (sizeof (t32_fields)) #define TC32 TC_ROOT IMPORT TYPE TC_ROOT; IMPORT char VS_ROOT__349f58f628be0ac6; #define t32_MapProc TC_ROOT->mapProc #define t15 ADDRESS #define TC15 TC_Rd__T IMPORT TYPE TC_Rd__T; #line 83 ".ROOT/.boots/corelib/Interfaces/Rd.i3" IMPORT char VS_Rd__T__2555b70b3f7780b1; #define t15_MapProc TC_Rd__T->mapProc typedef unsigned char t18; #line 45 "./Token.i3" typedef struct { int elts[4]; } t16; #line 26 "./Scanner.i3" typedef t9 (*t17)(); #line 13 typedef struct { t18 _token; t9 _string; t3 _value; t3 _offset; } t19; #line 65 "./Token.i3" #define t20 t45 typedef struct { t9 elts[97]; } t21; #line 33 "./Host.i3" typedef t15 (*t22)(); #line 90 ".ROOT/.boots/corelib/Interfaces/Wr.i3" #define t23 ADDRESS #define TC23 TC_Wr__T IMPORT TYPE TC_Wr__T; #line 90 IMPORT char VS_Wr__T__2555b70b3f7780b1; #define t23_MapProc TC_Wr__T->mapProc typedef int t24; #line 249 ".ROOT/.boots/corelib/Interfaces/Rd.i3" typedef t24 (*t25)(); #line 220 typedef t10 (*t26)(); typedef unsigned char t27; #line 189 #define t28 t45 typedef t27 (*t29)(); #line 84 typedef unsigned char t30; #line 13 ".ROOT/.boots/corelib/Interfaces/Fmt.i3" typedef unsigned char t33; typedef double t34; typedef float t35; typedef signed_char t36; typedef unsigned char t38; #line 58 "./String.i3" typedef t3 (*t39)(); #line 19 typedef signed_char t41; typedef struct { t9 elts[100]; } t42; #line 17 typedef struct { t3 _top; t42 _stk; } t40; #line 67 ".ROOT/.boots/corelib/Interfaces/Text.i3" typedef signed_char t43; typedef t43 (*t44)(); #line 91 ".ROOT/.boots/corelib/Interfaces/Wr.i3" typedef unsigned char t46; #line 15 ".ROOT/.boots/corelib/Interfaces/Thread.i3" #define t47 ADDRESS #define TC47 TC_Thread__T IMPORT TYPE TC_Thread__T; #line 15 IMPORT char VS_Thread__T__2555b70b3f7780b1; #define t47_MapProc TC_Thread__T->mapProc typedef t31 (*t48)(); #define t49 ADDRESS #define TC49 TC_Thread__Condition IMPORT TYPE TC_Thread__Condition; #line 21 IMPORT char VS_Thread__Condition__26d5968239e08f4e; #define t49_MapProc TC_Thread__Condition->mapProc #define t50 ADDRESS #define TC50 TC_MUTEX IMPORT TYPE TC_MUTEX; IMPORT char VS_MUTEX__1f9d4e89391ab815; #define t50_MapProc TC_MUTEX->mapProc typedef t47 (*t51)(); #line 23 #define t52 ADDRESS #line 23 typedef struct { t48 _apply; } t52_methods; #define t52_msize (sizeof (t52_methods)) typedef struct { #line 23 int filler; } t52_fields; #define t52_size (sizeof (t52_fields)) #define TC52 TC_Thread__Closure IMPORT TYPE TC_Thread__Closure; #line 23 IMPORT char VS_Thread__Closure__7fb5c6232c5a658a; #define t52_MapProc TC_Thread__Closure->mapProc typedef t49 (*t53)(); typedef t50 (*t54)(); #line 28 #define t55 ADDRESS #line 28 typedef struct { int filler; } t55_methods; #define t55_msize (sizeof (t55_methods)) typedef struct { #line 28 t24 _stackSize; } t55_fields; #define t55_size (sizeof (t55_fields)) #define TC55 TC_Thread__SizedClosure IMPORT TYPE TC_Thread__SizedClosure; #line 28 IMPORT char VS_Thread__SizedClosure__8a46717d2eae7b07; #define t55_MapProc TC_Thread__SizedClosure->mapProc typedef CLOSURE t56; #define t58 ADDRESS typedef struct { TYPE self; int private; } t58_methods; #define t58_msize (sizeof (t58_methods)) typedef struct { ADDRESS methods; } t58_fields; #define t58_size (sizeof (t58_fields)) #define TC58 TC_UNTRACED_ROOT IMPORT TYPE TC_UNTRACED_ROOT; IMPORT char VS_UNTRACED_ROOT__3e0964513fd6da20; #line 11 "Error.m3" IMPORT INITLINK* Scanner__init; IMPORT INITLINK* Host__init; IMPORT INITLINK* Wr__init; IMPORT INITLINK* String__init; IMPORT INITLINK* Fmt__init; #line 11 IMPORT INITLINK* Text__init; IMPORT INITLINK* Error__init; IMPORT t3 _Scanner__offset; IMPORT char VS_Scanner__offset__dfc05f042d8347f4; #line 11 IMPORT t57 _Scanner__Here (); IMPORT char VS_Scanner__Here__1284254c3cfdbf9f; IMPORT t23 _Host__errors; IMPORT char VS_Host__errors__68d293de2fd61f13; #line 11 IMPORT t3 _Host__errorDie; IMPORT char VS_Host__errorDie__eb41f6122b3b143b; IMPORT t5 _Host__standard; IMPORT char VS_Host__standard__241b7c922bd89e90; #line 11 IMPORT t3 _Host__warnings; IMPORT char VS_Host__warnings__08814d1c28a391ba; IMPORT EXCEPTION_NAME _Thread__Alerted; IMPORT char VS_Thread__Alerted__fc88feb43485af46; #line 11 IMPORT EXCEPTION_NAME _Wr__Failure; IMPORT char VS_Wr__Failure__5f82cfb43dabf527; IMPORT EXCEPTION_NAME _Wr__Error; IMPORT char VS_Wr__Error__c367253d3ed4fd15; #line 11 IMPORT t57 _Wr__PutText (); IMPORT char VS_Wr__PutText__e034dab73a793846; IMPORT t57 _String__Put (); IMPORT char VS_String__Put__2457561e210725b3; #line 11 IMPORT t10 _Fmt__Int (); IMPORT char VS_Fmt__Int__6e220fa1366cffbc; IMPORT TYPE TC_Text__T; IMPORT char VS_Text__T__fc4b369f3ab271fd; #line 11 EXPORT t57 _Error__Msg (); EXPORT char VS_Error__Msg__4d119a332467757f = '\0'; EXPORT t57 _Error__Int (); EXPORT char VS_Error__Int__05fff4c5263ea533 = '\0'; #line 11 EXPORT t57 _Error__Str (); EXPORT char VS_Error__Str__2bd0723e3872e90c = '\0'; EXPORT t57 _Error__QID (); EXPORT char VS_Error__QID__84a7ccd932b81b86 = '\0'; #line 11 EXPORT t57 _Error__ID (); EXPORT char VS_Error__ID__b86d646b21a8cf59 = '\0'; EXPORT t57 _Error__Warn (); EXPORT char VS_Error__Warn__38cf6ace3df14804 = '\0'; #line 11 EXPORT t57 _Error__WarnStr (); EXPORT char VS_Error__WarnStr__aa8e70c53534552c = '\0'; EXPORT t57 _Error__WarnNonStandard (); #line 11 EXPORT char VS_Error__WarnNonStandard__28b127cf2d45026a = '\0'; EXPORT t57 _Error__IgnoreWarning (); EXPORT char VS_Error__IgnoreWarning__b99be2f12e366d68 = '\0'; #line 11 EXPORT t57 _Error__Info (); EXPORT char VS_Error__Info__c5b4711436dbf5da = '\0'; EXPORT t57 _Error__Count (); EXPORT char VS_Error__Count__56133f452e061a4a = '\0'; #line 11 PRIVATE t14 _Error__Labels = {{ ((ADDRESS)(& txt1.str)), ((ADDRESS)(& txt2.str)), ((ADDRESS)(& txt2.str)) }}; PRIVATE t13 _Error__count; #line 11 PRIVATE t57 _Error__Header (); PRIVATE t57 _Error__Trailer (); PRIVATE t57 _Error__Out (); PRIVATE t57 _Error__OutS (); PRIVATE TYPE TC_Error__IgnoreCell; #line 11 PRIVATE t4 _Error__ignores; PRIVATE t5 _Error__Toss (); #line 29 "Error.m3" EXPORT t57 _Error__Msg (_msg) t10 _msg; { #line 29 "Error.m3" { { CHECKSTACKOVERFLOW; _Error__Header ( 2147483647 ); _Error__Out (_msg); _Error__Trailer (); } } }; #line 36 "Error.m3" EXPORT t57 _Error__Int (_n, _msg) t3 _n; t10 _msg; { t10 z4; #line 36 "Error.m3" { { CHECKSTACKOVERFLOW; _Error__Header ( 2147483647 ); _Error__Out (_msg); _Error__Out (((ADDRESS)(& txt3.str))); z4 = _Fmt__Int (_n, 10 ); _Error__Out (z4); _Error__Out (((ADDRESS)(& txt4.str))); _Error__Trailer (); } } }; #line 46 "Error.m3" EXPORT t57 _Error__Str (_s, _msg) t9 _s; t10 _msg; { #line 46 "Error.m3" { { CHECKSTACKOVERFLOW; _Error__Header ( 2147483647 ); _Error__Out (_msg); _Error__Out (((ADDRESS)(& txt3.str))); _Error__OutS (_s); _Error__Out (((ADDRESS)(& txt4.str))); _Error__Trailer (); } } }; #line 56 "Error.m3" EXPORT t57 _Error__QID (_q, _msg) t11 * _q; t10 _msg; { t5 z3; #line 56 "Error.m3" { { CHECKSTACKOVERFLOW; _Error__Header ( 2147483647 ); _Error__Out (_msg); _Error__Out (((ADDRESS)(& txt3.str))); z3 = (((*_q)._module) != 0); if (z3) { _Error__OutS (((*_q)._module)); _Error__Out (((ADDRESS)(& txt5.str))); goto if_1_end; }; if_1_end: /**/; _Error__OutS (((*_q)._item)); _Error__Out (((ADDRESS)(& txt4.str))); _Error__Trailer (); } } }; #line 70 "Error.m3" EXPORT t57 _Error__ID (_id, _msg) t10 _id; t10 _msg; { #line 70 "Error.m3" { { CHECKSTACKOVERFLOW; _Error__Header ( 2147483647 ); _Error__Out (_id); _Error__Out (((ADDRESS)(& txt6.str))); _Error__Out (_msg); _Error__Trailer (); } } }; #line 79 "Error.m3" EXPORT t57 _Error__Info (_msg) t10 _msg; { t5 z2; #line 79 "Error.m3" { { CHECKSTACKOVERFLOW; z2 = _Error__Toss ( 0 ); if (z2) { return; }; _Error__Header ( 0 ); _Error__Out (_msg); _Error__Trailer (); } } }; #line 87 "Error.m3" EXPORT t57 _Error__Warn (_level, _msg) t3 _level; t10 _msg; { t5 z2; #line 87 "Error.m3" { { CHECKSTACKOVERFLOW; z2 = _Error__Toss (_level); if (z2) { return; }; _Error__Header (_level); _Error__Out (_msg); _Error__Trailer (); } } }; #line 95 "Error.m3" EXPORT t57 _Error__WarnStr (_level, _s, _msg) t3 _level; t9 _s; t10 _msg; { t5 z2; #line 95 "Error.m3" { { CHECKSTACKOVERFLOW; z2 = _Error__Toss (_level); if (z2) { return; }; _Error__Header (_level); _Error__Out (_msg); _Error__Out (((ADDRESS)(& txt3.str))); _Error__OutS (_s); _Error__Out (((ADDRESS)(& txt4.str))); _Error__Trailer (); } } }; #line 106 "Error.m3" EXPORT t57 _Error__WarnNonStandard (_feature) t10 _feature; { t3 z2; t5 z3; #line 106 "Error.m3" { auto t3 _level; { CHECKSTACKOVERFLOW; if (_Host__standard) { _level = 3 ; goto if_5_end; }; z2 = 3 - 1 ; _level = z2; if_5_end: /**/; z3 = _Error__Toss (_level); if (z3) { return; }; _Error__Header (_level); _Error__Out (((ADDRESS)(& txt7.str))); _Error__Out (_feature); _Error__Trailer (); } } }; #line 120 "Error.m3" PRIVATE t57 _Error__Header (_level) t3 _level; { t3 z3; t12 z4; t12 z1; t3 z2; t10 z5; #line 120 "Error.m3" { auto t9 _file; auto t3 _line; { CHECKSTACKOVERFLOW; z3 = _level; z4 = 3 ; if (z3 > z4) z3 = z4; z1 = 0 ; z2 = z3; if (z1 < z2) z1 = z2; _level = z1; z2 = _level; if ((z2 < 0) || (3 < z2)) RANGEFAULT; (_Error__count.elts[z2]) += 1 ; _Scanner__Here (&_file, &_line); _Error__Out (((ADDRESS)(& txt8.str))); _Error__OutS (_file); _Error__Out (((ADDRESS)(& txt9.str))); z5 = _Fmt__Int (_line, 10 ); _Error__Out (z5); z3 = _level; if ((z3 < 0) || (3 < z3)) RANGEFAULT; _Error__Out ((_Error__Labels.elts[z3])); _Error__Out (((ADDRESS)(& txt6.str))); } } }; #line 134 "Error.m3" PRIVATE t57 _Error__Trailer () { t5 z2; #line 134 "Error.m3" { auto t3 _n; { ZERO1 ((& _n)); #line 134 CHECKSTACKOVERFLOW; _Error__Out (((ADDRESS)(& txt10.str))); z2 = (_Host__errorDie >= 0 ); if (z2) { { int from, to, index; from = 0 ; to = 3 ; { auto t3 _i; { for (index = from; index <= to; index += 1) { _i = (t3) index; #line 139 _n += (_Error__count.elts[_i]); } } }; }; z2 = (_n >= _Host__errorDie); if (z2) { if (! 0 ) ASSERTFAULT; }; goto if_7_end; }; if_7_end: /**/; } } }; #line 144 "Error.m3" PRIVATE t57 _Error__Out (_t) t10 _t; { #line 144 "Error.m3" { { CHECKSTACKOVERFLOW; _Wr__PutText (_Host__errors, _t); } } }; #line 149 "Error.m3" PRIVATE t57 _Error__OutS (_s) t9 _s; { #line 149 "Error.m3" { { CHECKSTACKOVERFLOW; _String__Put (_Host__errors, _s); } } }; #line 154 "Error.m3" EXPORT t57 _Error__Count (_nErrors, _nWarnings) t3 * _nErrors; t3 * _nWarnings; { #line 154 "Error.m3" { { CHECKSTACKOVERFLOW; (*_nErrors) = (_Error__count.elts[ 3 ]); (*_nWarnings) = 0 ; { int from, to, index; from = 1 ; to = 2 ; { auto t3 _i; { for (index = from; index <= to; index += 1) { _i = (t3) index; (*_nWarnings) += (_Error__count.elts[_i]); } } }; }; } } }; #line 166 "Error.m3" EXPORT t57 _Error__IgnoreWarning (_offset) t3 _offset; { t4 z0; t4 z2; #line 166 "Error.m3" { { CHECKSTACKOVERFLOW; { t4 with; { register t8* ptr = (t8*) UNEW (TC4); z0 = (t4) ptr; }; with = z0; { auto t4 _i; { _i = with; NILCHECKA (z2 = _i); ((*((t8*) z2))._offs) = _offset; NILCHECKA (z2 = _i); ((*((t8*) z2))._next) = _Error__ignores; _Error__ignores = _i; } } }; } } }; #line 175 "Error.m3" PRIVATE t5 _Error__Toss (_level) t3 _level; { t5 z2; t4 z1; t5 z4; #line 175 "Error.m3" { auto t4 _i; auto t3 _here; auto t5 __result; { ZERO1B (& __result); CHECKSTACKOVERFLOW; z2 = (_level < _Host__warnings); if (z2) { __result = 1 ; return __result; }; _here = _Scanner__offset; _i = _Error__ignores; z2 = (_i != 0); if (z2) do { NILCHECKA (z1 = _i); z4 = (((*((t8*) z1))._offs) == _here); if (z4) { __result = 1 ; return __result; }; NILCHECKA (z1 = _i); _i = ((*((t8*) z1))._next); z2 = (_i != 0); } while (z2); __result = 0 ; return __result; } } }; PRIVATE int init_done = -1; #line 185 "Error.m3" PRIVATE void Error__initProc (g) int g; { #line 185 "Error.m3" if (init_done >= g) return; init_done = g; INITIALIZE (& Error__init); INITIALIZE (& Scanner__init); INITIALIZE (& Host__init); #line 185 INITIALIZE (& Wr__init); INITIALIZE (& String__init); INITIALIZE (& Fmt__init); INITIALIZE (& Text__init); #line 27 ZERO4 ((& _Error__count)); #line 164 ZERO1 ((& _Error__ignores)); #line 185 return; }; #line 185 "Error.m3" PRIVATE void t4_PrintProc (ref) t8* ref; { CHECKSTACKOVERFLOW; fprintf (stderr, "%s {", TC4->brand); fprintf (stderr, "^ = { "); #line 185 fprintf (stderr, "offs = %d", (*ref)._offs); fprintf (stderr, "next = %#x", (*ref)._next); fprintf (stderr, "}"); fprintf (stderr, "}\n"); #line 185 }; PRIVATE INITLINK me_0 ={(INITLINK*)NIL, 0, Error__initProc}; static char* VSimports[] = { &VS_Scanner__offset__dfc05f042d8347f4, &VS_Scanner__Here__1284254c3cfdbf9f, &VS_Host__errors__68d293de2fd61f13, &VS_Host__errorDie__eb41f6122b3b143b, &VS_Host__standard__241b7c922bd89e90, &VS_Host__warnings__08814d1c28a391ba, &VS_Thread__Alerted__fc88feb43485af46, &VS_Wr__T__2555b70b3f7780b1, &VS_Wr__Failure__5f82cfb43dabf527, &VS_Wr__Error__c367253d3ed4fd15, &VS_Wr__PutText__e034dab73a793846, &VS_String__T__3a6c7dc12615e4ee, &VS_String__Put__2457561e210725b3, &VS_Fmt__Int__6e220fa1366cffbc, &VS_Text__T__fc4b369f3ab271fd, NIL }; void Error__MLink (phase) int phase; { switch (phase) { case 0: { me_0.link = Error__init; Error__init = & me_0; t4_TC = t4_TC_init; REGISTERTYPE (TC4); break; }; case 1: { break; }; case 2: { break; }; }; };