#include "M3Runtime.h" #define t36 ADDRESS typedef int t5; #define TC36 TC_ADDRESS IMPORT TYPE TC_ADDRESS; IMPORT char VS_ADDRESS__30f7308738738b44; #line 13 "./String.i3" #define t6 ADDRESS #define TC6 TC_String__T IMPORT TYPE TC_String__T; #line 13 IMPORT char VS_String__T__3a6c7dc12615e4ee; #line 33 "String.m3" #define t29 ADDRESS typedef int t16; #line 25 typedef struct { t16 _start; t16 _length; t5 _class; t5 _hash; t5 _textID; t5 _uid; t6 _next; } t30; PRIVATE void t29_PrintProc (); PRIVATE typecell t29_TC; PRIVATE typecell t29_TC_init = {0, 0, 0, 0, 0, (PROC)NIL, 28, 0, NIL, 0, 0, (PROC)NIL, (PROC)NIL, t29_PrintProc, #line 33 "String#$%^_0001", 1967400706, 942616797}; PRIVATE TYPE TC29 = &t29_TC; #define t35 ADDRESS #define t60 void #define TC35 TC_REFANY IMPORT TYPE TC_REFANY; IMPORT char VS_REFANY__4b8748e831fc107a; #define t62 ADDRESS #define TC62 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]; } t48; #line 43 "String.m3" #define t1 t48 typedef unsigned char t9; #line 42 #define t2 t48 #define t12 ADDRESS #define TC12 TC_TEXT IMPORT TYPE TC_TEXT; IMPORT char VS_TEXT__b7a92447326386f5; #define t12_MapProc TC_TEXT->mapProc #define t3 t48 typedef t60 (*t4)(); #line 263 typedef t5 (*t7)(); typedef int t8; #define t50 ADDRESS typedef struct { TYPE self; int private; } t50_methods; #define t50_msize (sizeof (t50_methods)) typedef struct { ADDRESS methods; } t50_fields; #define t50_size (sizeof (t50_fields)) #define TC50 TC_ROOT IMPORT TYPE TC_ROOT; IMPORT char VS_ROOT__349f58f628be0ac6; #define t50_MapProc TC_ROOT->mapProc #define t10 ADDRESS #define TC10 TC_Wr__T IMPORT TYPE TC_Wr__T; #line 90 ".ROOT/.boots/corelib/Interfaces/Wr.i3" IMPORT char VS_Wr__T__2555b70b3f7780b1; #define t10_MapProc TC_Wr__T->mapProc typedef signed_char t41; #line 19 "./String.i3" typedef struct { t6 elts[100]; } t42; #line 17 typedef struct { t5 _top; t42 _stk; } t11; #line 172 "String.m3" typedef t12 (*t13)(); #line 154 typedef t6 (*t14)(); typedef unsigned char t15; #line 145 typedef t15 (*t17)(); #line 43 typedef signed_char t18; typedef struct { t6 elts[101]; } t19; #line 42 typedef signed_char t20; typedef struct { t9 elts[10]; } t21; #line 41 typedef short t22; typedef struct { t12 elts[1025]; } t23; #line 40 typedef signed_char t24; typedef struct { t9 elts[5]; } t25; #line 39 typedef short t26; typedef struct { t6 elts[1024]; } t27; #line 38 typedef struct { t9 elts[300001]; } t28; #line 13 ".ROOT/.boots/corelib/Interfaces/Fmt.i3" typedef unsigned char t31; typedef double t32; typedef float t33; typedef signed_char t34; typedef unsigned char t37; #define t38 ADDRESS #define TC38 TC_MUTEX IMPORT TYPE TC_MUTEX; IMPORT char VS_MUTEX__1f9d4e89391ab815; #define t38_MapProc TC_MUTEX->mapProc typedef t32 (*t39)(); #line 92 ".ROOT/.boots/corelib/Interfaces/Convert.i3" typedef t33 (*t40)(); #line 14 "./String.i3" typedef struct { t6 _module; t6 _item; } t43; #line 67 ".ROOT/.boots/corelib/Interfaces/Text.i3" typedef signed_char t44; typedef t44 (*t45)(); #line 26 typedef t8 (*t46)(); #line 23 typedef t9 (*t47)(); #line 91 ".ROOT/.boots/corelib/Interfaces/Wr.i3" typedef unsigned char t49; #line 15 ".ROOT/.boots/corelib/Interfaces/Thread.i3" #define t51 ADDRESS #define TC51 TC_Thread__T IMPORT TYPE TC_Thread__T; #line 15 IMPORT char VS_Thread__T__2555b70b3f7780b1; #define t51_MapProc TC_Thread__T->mapProc typedef t35 (*t52)(); #define t53 ADDRESS #define TC53 TC_Thread__Condition IMPORT TYPE TC_Thread__Condition; #line 21 IMPORT char VS_Thread__Condition__26d5968239e08f4e; #define t53_MapProc TC_Thread__Condition->mapProc typedef t51 (*t54)(); #define t55 ADDRESS #line 23 typedef struct { t52 _apply; } t55_methods; #define t55_msize (sizeof (t55_methods)) typedef struct { #line 23 int filler; } t55_fields; #define t55_size (sizeof (t55_fields)) #define TC55 TC_Thread__Closure IMPORT TYPE TC_Thread__Closure; #line 23 IMPORT char VS_Thread__Closure__7fb5c6232c5a658a; #define t55_MapProc TC_Thread__Closure->mapProc typedef t53 (*t56)(); typedef t38 (*t57)(); #line 28 #define t58 ADDRESS #line 28 typedef struct { int filler; } t58_methods; #define t58_msize (sizeof (t58_methods)) typedef struct { #line 28 t8 _stackSize; } t58_fields; #define t58_size (sizeof (t58_fields)) #define TC58 TC_Thread__SizedClosure IMPORT TYPE TC_Thread__SizedClosure; #line 28 IMPORT char VS_Thread__SizedClosure__8a46717d2eae7b07; #define t58_MapProc TC_Thread__SizedClosure->mapProc typedef CLOSURE t59; #define t61 ADDRESS typedef struct { TYPE self; int private; } t61_methods; #define t61_msize (sizeof (t61_methods)) typedef struct { ADDRESS methods; } t61_fields; #define t61_size (sizeof (t61_fields)) #define TC61 TC_UNTRACED_ROOT IMPORT TYPE TC_UNTRACED_ROOT; IMPORT char VS_UNTRACED_ROOT__3e0964513fd6da20; #line 11 "String.m3" IMPORT INITLINK* Word__init; IMPORT INITLINK* Fmt__init; IMPORT INITLINK* Text__init; IMPORT INITLINK* UnsafeWr__init; IMPORT INITLINK* Wr__init; #line 11 IMPORT INITLINK* String__init; IMPORT t5 _Word__And (); IMPORT char VS_Word__And__479727d22e0cef9f; IMPORT TYPE TC_Text__T; #line 11 IMPORT char VS_Text__T__fc4b369f3ab271fd; IMPORT t9 _Text__GetChar (); IMPORT char VS_Text__GetChar__0f4bd6e72493f4ff; IMPORT t8 _Text__Length (); #line 11 IMPORT char VS_Text__Length__661a58173d76f41c; IMPORT t12 _Text__Sub (); IMPORT char VS_Text__Sub__ba151c702fe1a06f; IMPORT t12 _Text__FromStr (); #line 11 IMPORT char VS_Text__FromStr__4675e29c281840d3; IMPORT EXCEPTION_NAME _Wr__Error; IMPORT char VS_Wr__Error__c367253d3ed4fd15; #line 11 IMPORT EXCEPTION_NAME _Wr__Failure; IMPORT char VS_Wr__Failure__5f82cfb43dabf527; IMPORT EXCEPTION_NAME _Thread__Alerted; #line 11 IMPORT char VS_Thread__Alerted__fc88feb43485af46; IMPORT t60 _UnsafeWr__FastPutChar (); IMPORT char VS_UnsafeWr__FastPutChar__b1a53b0220cb969f; #line 11 IMPORT t60 _UnsafeWr__FastPutInt (); IMPORT char VS_UnsafeWr__FastPutInt__da9571263c7312f3; EXPORT t6 _String__Add (); #line 11 EXPORT char VS_String__Add__0f5e21cc3d204b63 = '\0'; EXPORT t6 _String__AddInt (); EXPORT char VS_String__AddInt__3485cc122538fb2d = '\0'; #line 11 EXPORT t6 _String__FromStr (); EXPORT char VS_String__FromStr__4226c3282dddebc2 = '\0'; EXPORT t6 _String__Concat (); EXPORT char VS_String__Concat__52f07b88222785f0 = '\0'; #line 11 EXPORT t6 _String__Unique (); EXPORT char VS_String__Unique__cd4dd9782d0ff343 = '\0'; EXPORT t12 _String__ToText (); EXPORT char VS_String__ToText__b5eb19e626fe180d = '\0'; #line 11 EXPORT t60 _String__Put (); EXPORT char VS_String__Put__2457561e210725b3 = '\0'; EXPORT t60 _String__PutChars (); EXPORT char VS_String__PutChars__3deea76a27eef07c = '\0'; #line 11 EXPORT t60 _String__PutStack (); EXPORT char VS_String__PutStack__2155a7863fdb4aca = '\0'; EXPORT t60 _String__SetClass (); #line 11 EXPORT char VS_String__SetClass__5d54257a285f9c99 = '\0'; EXPORT t5 _String__GetClass (); EXPORT char VS_String__GetClass__0367456e2d55200c = '\0'; #line 11 EXPORT t5 _String__Length (); EXPORT char VS_String__Length__75f8af7a37a956d2 = '\0'; EXPORT t5 _String__GetUID (); EXPORT char VS_String__GetUID__54d5228a21500678 = '\0'; #line 11 EXPORT t60 _String__SetUID (); EXPORT char VS_String__SetUID__d5af33282e8887a9 = '\0'; EXPORT t60 _String__Initialize (); #line 11 EXPORT char VS_String__Initialize__2d344ec923e7ebf1 = '\0'; PRIVATE t16 _String__nextChar; PRIVATE t5 _String__nTexts; PRIVATE t28 _String__chars; #line 11 PRIVATE t27 _String__hashTable; PRIVATE t25 _String__counter; PRIVATE t23 _String__texts; PRIVATE t21 _String__digits; PRIVATE t19 _String__numbers; #line 11 PRIVATE t6 _String__Append (); PRIVATE t15 _String__Equal (); PRIVATE t60 _String__EmitChar (); EXPORT char VS_String__T__946a5de03ded8f7c = '\0'; #line 11 void String__MMap (p) void (*p) (); { ADDRESS r = NIL; ADDRESS c = NIL; CHECKSTACKOVERFLOW; { int i4; for (i4 = 0; i4 < 1025; i4++) { #line 11 p (& (_String__texts.elts[i4]), r, c); }; }; }; #line 45 "String.m3" EXPORT t6 _String__Add (_x, _length) t12 _x; t5 _length; { t8 z3; t5 z1; t8 z2; t5 z4; t9 z5; t6 z6; t15 z7; t12 z8; #line 45 "String.m3" { auto t16 _j; auto t6 _t; auto t6 __result; { ZERO1 (& _j); #line 45 CHECKSTACKOVERFLOW; z3 = _Text__Length (_x); z1 = _length; z2 = z3; if (z1 > z2) z1 = z2; _length = z1; _j = _String__nextChar; { int from, to, index; from = 0 ; z4 = _length - 1 ; to = z4; { auto t5 _i; { for (index = from; index <= to; index += 1) { #line 50 _i = (t5) index; z5 = _Text__GetChar (_x, _i); (_String__chars.elts[_j]) = z5; if ((_j += 1 ) > 300000) RANGEFAULT; } } }; }; z6 = _String__Append (_j); _t = z6; NILCHECKA (z6 = _t); z7 = (((*((t30*) z6))._textID) == -1 ); if (z7) { NILCHECKA (z6 = _t); ((*((t30*) z6))._textID) = _String__nTexts; z4 = _length; if (z4 < 0) RANGEFAULT; z8 = _Text__Sub (_x, 0 , z4); z4 = _String__nTexts; if ((z4 < 0) || (1024 < z4)) RANGEFAULT; #line 57 (_String__texts.elts[z4]) = z8; _String__nTexts += 1 ; goto if_1_end; }; if_1_end: /**/; __result = _t; return __result; } } }; #line 63 "String.m3" EXPORT t6 _String__AddInt (_i) t5 _i; { t15 z2; t15 z0; t15 z3; t5 z4; t6 z1; t6 z5; #line 63 "String.m3" { auto t6 _t; auto t6 __result; { CHECKSTACKOVERFLOW; z2 = ( 0 <= _i); z0 = 0; if (z2) { z3 = (_i < 101 ); z0 = z3; }; if (z0) { z4 = _i; if ((z4 < 0) || (100 < z4)) RANGEFAULT; z3 = ((_String__numbers.elts[z4]) == 0); if (z3) { { register t30* ptr = (t30*) UNEW (TC6); z1 = (t6) ptr; }; _t = z1; z4 = - 1 ; NILCHECKA (z1 = _t); ((*((t30*) z1))._class) = z4; NILCHECKA (z5 = _t); ((*((t30*) z5))._hash) = _i; z4 = _i; if ((z4 < 0) || (100 < z4)) RANGEFAULT; (_String__numbers.elts[z4]) = _t; goto if_3_end; }; if_3_end: /**/; z4 = _i; if ((z4 < 0) || (100 < z4)) RANGEFAULT; __result = (_String__numbers.elts[z4]); return __result; }; { register t30* ptr = (t30*) UNEW (TC6); z1 = (t6) ptr; }; _t = z1; z4 = - 1 ; NILCHECKA (z1 = _t); ((*((t30*) z1))._class) = z4; NILCHECKA (z5 = _t); ((*((t30*) z5))._hash) = _i; __result = _t; return __result; } } }; #line 82 "String.m3" EXPORT t6 _String__FromStr (_buf, _length) t2 * _buf; t5 _length; { t8 z1; t5 z2; t8 z3; t5 z4; t6 z5; #line 82 "String.m3" { auto t16 _j; auto t6 __result; { ZERO1 (& _j); #line 82 CHECKSTACKOVERFLOW; z1 = (*_buf).size[0]; z2 = _length; z3 = z1; if (z2 > z3) z2 = z3; _length = z2; _j = _String__nextChar; { int from, to, index; from = 0 ; z2 = _length - 1 ; to = z2; { auto t5 _i; { for (index = from; index <= to; index += 1) { #line 87 _i = (t5) index; { register t48* array = & (*_buf); z4 = _i; if (z4 >= (array->size[0])) RANGEFAULT; z2 = (int)(array->elts + (z4 * 1)); #line 88 }; (_String__chars.elts[_j]) = (*(t9*)z2); if ((_j += 1 ) > 300000) RANGEFAULT; } } }; }; z5 = _String__Append (_j); __result = z5; return __result; } } }; #line 94 "String.m3" EXPORT t6 _String__Concat (_a, _b) t6 _a; t6 _b; { t15 z2; t15 z0; t6 z3; t15 z5; t6 z1; t5 z4; t5 z6; #line 94 "String.m3" { auto t5 _j; auto t6 __result; { CHECKSTACKOVERFLOW; z2 = (_a == 0); z0 = 1; if (! z2) { NILCHECKA (z3 = _a); z5 = (((*((t30*) z3))._length) == 0 ); z0 = z5; }; if (z0) { #line 97 __result = _b; return __result; }; z2 = (_b == 0); z0 = 1; if (! z2) { NILCHECKA (z3 = _b); z5 = (((*((t30*) z3))._length) == 0 ); z0 = z5; }; if (z0) { #line 98 __result = _a; return __result; }; _j = _String__nextChar; { int from, to, index; NILCHECKA (z1 = _a); from = ((*((t30*) z1))._start); NILCHECKA (z1 = _a); z4 = ((*((t30*) z1))._start) + ((*((t30*) z1))._length); #line 100 z6 = z4 - 1 ; to = z6; { auto t5 _i; { for (index = from; index <= to; index += 1) { _i = (t5) index; z4 = _i; if ((z4 < 0) || (300000 < z4)) RANGEFAULT; z6 = _j; if ((z6 < 0) || (300000 < z6)) RANGEFAULT; (_String__chars.elts[z6]) = (_String__chars.elts[z4]); _j += 1 ; } } }; }; { int from, to, index; NILCHECKA (z1 = _b); from = ((*((t30*) z1))._start); NILCHECKA (z1 = _b); z4 = ((*((t30*) z1))._start) + ((*((t30*) z1))._length); #line 104 z6 = z4 - 1 ; to = z6; { auto t5 _i; { for (index = from; index <= to; index += 1) { _i = (t5) index; z4 = _i; if ((z4 < 0) || (300000 < z4)) RANGEFAULT; z6 = _j; if ((z6 < 0) || (300000 < z6)) RANGEFAULT; (_String__chars.elts[z6]) = (_String__chars.elts[z4]); _j += 1 ; } } }; }; z4 = _j; if ((z4 < 0) || (300000 < z4)) RANGEFAULT; z1 = _String__Append (z4); __result = z1; return __result; } } }; #line 111 "String.m3" PRIVATE t6 _String__Append (_finish) t16 _finish; { t5 z2; t5 z1; t5 z3; t5 z4; t15 z5; t6 z6; t15 z0; t15 z7; #line 111 "String.m3" { auto t5 _len; auto t5 _hash; auto t5 _bucket; auto t6 _t; auto t6 __result; { CHECKSTACKOVERFLOW; z2 = _finish - _String__nextChar; _len = z2; _hash = 0 ; { int from, to, index; from = _String__nextChar; z2 = _String__nextChar + _len; z1 = z2 - 1 ; to = z1; { auto t5 _i; #line 116 { for (index = from; index <= to; index += 1) { _i = (t5) index; z2 = 2 * _hash; z3 = _i; if ((z3 < 0) || (300000 < z3)) RANGEFAULT; z4 = z2 + (_String__chars.elts[z3]); #line 117 _hash = z4; } } }; }; z2 = _hash; z3 = 1024 ; z4 = z2 - (z3 * (IDIV (z2, z3))); _bucket = z4; z2 = _bucket; if ((z2 < 0) || (1023 < z2)) RANGEFAULT; _t = (_String__hashTable.elts[z2]); z5 = (_t != 0); if (z5) do { NILCHECKA (z6 = _t); z5 = (((*((t30*) z6))._hash) == _hash); z0 = 0; if (z5) { NILCHECKA (z6 = _t); z5 = (((*((t30*) z6))._length) == _len); #line 122 z0 = z5; }; z5 = 0; if (z0) { NILCHECKA (z6 = _t); z7 = _String__Equal (_String__nextChar, ((*((t30*) z6))._start), _len); #line 122 z5 = z7; }; if (z5) { __result = _t; return __result; }; NILCHECKA (z6 = _t); _t = ((*((t30*) z6))._next); z5 = (_t != 0); } while (z5); { register t30* ptr = (t30*) UNEW (TC6); z6 = (t6) ptr; }; _t = z6; NILCHECKA (z6 = _t); ((*((t30*) z6))._start) = _String__nextChar; z1 = _len; if ((z1 < 0) || (300000 < z1)) RANGEFAULT; NILCHECKA (z6 = _t); ((*((t30*) z6))._length) = z1; NILCHECKA (z6 = _t); ((*((t30*) z6))._class) = 0 ; NILCHECKA (z6 = _t); ((*((t30*) z6))._hash) = _hash; z2 = _bucket; if ((z2 < 0) || (1023 < z2)) RANGEFAULT; NILCHECKA (z6 = _t); ((*((t30*) z6))._next) = (_String__hashTable.elts[z2]); NILCHECKA (z6 = _t); ((*((t30*) z6))._textID) = -1 ; NILCHECKA (z6 = _t); ((*((t30*) z6))._uid) = -1 ; z3 = _bucket; if ((z3 < 0) || (1023 < z3)) RANGEFAULT; (_String__hashTable.elts[z3]) = _t; (_String__chars.elts[_finish]) = '\000' ; z2 = _finish + 1 ; z1 = z2; if ((z1 < 0) || (300000 < z1)) RANGEFAULT; _String__nextChar = z1; __result = _t; return __result; } } }; #line 145 "String.m3" PRIVATE t15 _String__Equal (_a, _b, _len) t16 _a; t16 _b; t5 _len; { t15 z2; t15 z6; #line 145 "String.m3" { auto t15 __result; { ZERO1B (& __result); CHECKSTACKOVERFLOW; z2 = (_len > 0 ); if (z2) do { z6 = ((_String__chars.elts[_a]) != (_String__chars.elts[_b])); if (z6) { __result = 0 ; return __result; }; _len -= 1 ; if ((_a += 1 ) > 300000) RANGEFAULT; if ((_b += 1 ) > 300000) RANGEFAULT; z2 = (_len > 0 ); } while (z2); __result = 1 ; return __result; } } }; #line 154 "String.m3" EXPORT t6 _String__Unique (_root) t6 _root; { t5 z2; t15 z4; t5 z3; t5 z5; t5 z0; t6 z1; #line 154 "String.m3" { auto t5 _j; auto t6 __result; { CHECKSTACKOVERFLOW; _j = 4 ; z2 = _j; if ((z2 < 0) || (4 < z2)) RANGEFAULT; z4 = ((_String__counter.elts[z2]) == '9' ); if (z4) do { z3 = _j; if ((z3 < 0) || (4 < z3)) RANGEFAULT; #line 158 (_String__counter.elts[z3]) = '0' ; _j -= 1 ; z2 = _j; if ((z2 < 0) || (4 < z2)) RANGEFAULT; z4 = ((_String__counter.elts[z2]) == '9' ); #line 158 } while (z4); z2 = _j; if ((z2 < 0) || (4 < z2)) RANGEFAULT; z5 = (_String__counter.elts[z2]) + 1 ; z0 = z5; if ((z0 < 0) || (255 < z0)) RANGEFAULT; #line 159 z3 = _j; if ((z3 < 0) || (4 < z3)) RANGEFAULT; (_String__counter.elts[z3]) = z0; _j = _String__nextChar; { int from, to, index; NILCHECKA (z1 = _root); from = ((*((t30*) z1))._start); NILCHECKA (z1 = _root); z5 = ((*((t30*) z1))._start) + ((*((t30*) z1))._length); #line 161 z2 = z5 - 1 ; to = z2; { auto t5 _i; { for (index = from; index <= to; index += 1) { _i = (t5) index; z2 = _i; if ((z2 < 0) || (300000 < z2)) RANGEFAULT; z5 = _j; if ((z5 < 0) || (300000 < z5)) RANGEFAULT; (_String__chars.elts[z5]) = (_String__chars.elts[z2]); _j += 1 ; } } }; }; { int from, to, index; from = 0 ; to = 4 ; { auto t5 _i; { for (index = from; index <= to; index += 1) { _i = (t5) index; z5 = _j; if ((z5 < 0) || (300000 < z5)) RANGEFAULT; (_String__chars.elts[z5]) = (_String__counter.elts[_i]); _j += 1 ; } } }; }; z2 = _j; if ((z2 < 0) || (300000 < z2)) RANGEFAULT; z1 = _String__Append (z2); __result = z1; return __result; } } }; #line 172 "String.m3" EXPORT t12 _String__ToText (_t) t6 _t; { t15 z2; t6 z1; t15 z4; t6 z3; t16 z5; t16 z6; t48 z7; t16 z8; t16 z9; t12 z10; t5 z11; #line 172 "String.m3" { auto t12 __result; { ZERO1 (& __result); CHECKSTACKOVERFLOW; z2 = (_t == 0); if (z2) { __result = 0; return __result; }; NILCHECKA (z1 = _t); z4 = (((*((t30*) z1))._textID) == -1 ); if (z4) { NILCHECKA (z3 = _t); ((*((t30*) z3))._textID) = _String__nTexts; NILCHECKA (z3 = _t); z5 = ((*((t30*) z3))._start); if (z5 < 0) RANGEFAULT; NILCHECKA (z3 = _t); z6 = ((*((t30*) z3))._length); #line 177 if (z6 < 0) RANGEFAULT; { z8 = z5; z9 = z6; if ((z8+z9) > 300001) RANGEFAULT; z7.size[0] = z9; z7.elts = ((char*)(& _String__chars)) + (z8 * 1); #line 177 }; z10 = _Text__FromStr (&z7); z11 = _String__nTexts; if ((z11 < 0) || (1024 < z11)) RANGEFAULT; (_String__texts.elts[z11]) = z10; _String__nTexts += 1 ; goto if_9_end; }; if_9_end: /**/; NILCHECKA (z3 = _t); z11 = ((*((t30*) z3))._textID); if ((z11 < 0) || (1024 < z11)) RANGEFAULT; __result = (_String__texts.elts[z11]); #line 180 return __result; } } }; #line 183 "String.m3" EXPORT t60 _String__Put (_wr, _t) t10 _wr; t6 _t; { t15 z2; t6 z1; t5 z4; t15 z3; t5 z5; t5 z6; t5 z7; #line 183 "String.m3" { { CHECKSTACKOVERFLOW; z2 = (_t != 0); if (z2) { NILCHECKA (z1 = _t); z4 = - 1 ; z3 = (((*((t30*) z1))._class) == z4); if (z3) { { { auto t5 _i; { NILCHECKA (z1 = _t); _i = ((*((t30*) z1))._hash); z2 = ( 0 <= _i); if (z2) { z2 = (_i < 10 ); if (z2) { z4 = _i; if ((z4 < 0) || (9 < z4)) RANGEFAULT; _UnsafeWr__FastPutChar (_wr, (_String__digits.elts[z4])); #line 191 goto if_13_end; }; z2 = (_i < 100 ); if (z2) { z5 = IDIV (_i, 10 ); z4 = z5; if ((z4 < 0) || (9 < z4)) RANGEFAULT; _UnsafeWr__FastPutChar (_wr, (_String__digits.elts[z4])); z5 = _i; z6 = 10 ; z7 = z5 - (z6 * (IDIV (z5, z6))); z4 = z7; if ((z4 < 0) || (9 < z4)) RANGEFAULT; #line 194 _UnsafeWr__FastPutChar (_wr, (_String__digits.elts[z4])); goto if_13_end; }; _UnsafeWr__FastPutInt (_wr, _i, 10 ); if_13_end: /**/; goto if_12_end; }; _UnsafeWr__FastPutInt (_wr, _i, 10 ); if_12_end: /**/; } } }; goto if_11_end; }; { int from, to, index; NILCHECKA (z1 = _t); from = ((*((t30*) z1))._start); NILCHECKA (z1 = _t); z4 = ((*((t30*) z1))._start) + ((*((t30*) z1))._length); #line 203 z5 = z4 - 1 ; to = z5; { auto t5 _i; { for (index = from; index <= to; index += 1) { _i = (t5) index; z4 = _i; if ((z4 < 0) || (300000 < z4)) RANGEFAULT; _String__EmitChar (_wr, (_String__chars.elts[z4])); #line 204 } } }; }; if_11_end: /**/; goto if_10_end; }; if_10_end: /**/; } } }; #line 210 "String.m3" EXPORT t60 _String__PutStack (_wr, _s) t10 _wr; t11 _s; { t5 z3; t5 z5; #line 210 "String.m3" { { CHECKSTACKOVERFLOW; { int from, to, index; from = 0 ; z3 = (_s._top) - 1 ; to = z3; { auto t5 _i; { for (index = from; index <= to; index += 1) { #line 212 _i = (t5) index; z5 = _i; if (z5 > 99) RANGEFAULT; _String__Put (_wr, ((_s._stk).elts[z5])); } } }; }; } #line 212 } }; #line 215 "String.m3" EXPORT t60 _String__PutChars (_wr, _t) t10 _wr; t6 _t; { t15 z2; t6 z1; t5 z4; t5 z3; t6 z5; t15 z6; #line 215 "String.m3" { auto t5 _n; { CHECKSTACKOVERFLOW; z2 = (_t != 0); if (z2) { _n = 0 ; { int from, to, index; NILCHECKA (z1 = _t); from = ((*((t30*) z1))._start); NILCHECKA (z1 = _t); z4 = ((*((t30*) z1))._start) + ((*((t30*) z1))._length); #line 220 z3 = z4 - 1 ; to = z3; { auto t5 _i; { for (index = from; index <= to; index += 1) { _i = (t5) index; NILCHECKA (z5 = _t); z6 = (_i > ((*((t30*) z5))._start)); if (z6) { _UnsafeWr__FastPutChar (_wr, ',' ); #line 221 goto if_15_end; }; if_15_end: /**/; z2 = (_n >= 20 ); if (z2) { _UnsafeWr__FastPutChar (_wr, '\012' ); _n = 0 ; goto if_16_end; }; if_16_end: /**/; _UnsafeWr__FastPutChar (_wr, '\047' ); z4 = _i; if ((z4 < 0) || (300000 < z4)) RANGEFAULT; _String__EmitChar (_wr, (_String__chars.elts[z4])); _UnsafeWr__FastPutChar (_wr, '\047' ); _n += 1 ; } } }; }; goto if_14_end; }; if_14_end: /**/; } } }; #line 231 "String.m3" PRIVATE t60 _String__EmitChar (_wr, _c) t10 _wr; t9 _c; { t15 z2; t15 z0; t15 z3; t15 z1; t5 z4; t5 z5; #line 231 "String.m3" { auto t5 _i; { CHECKSTACKOVERFLOW; z2 = (_c < ' ' ); z0 = 1; if (! z2) { z3 = (_c == '\042' ); z0 = z3; }; z1 = 1; if (! z0) { z3 = (_c == '\047' ); #line 234 z1 = z3; }; z0 = 1; if (! z1) { z3 = ( '~' < _c); z0 = z3; }; z1 = 1; if (! z0) { z3 = (_c == '\134' ); z1 = z3; #line 234 }; if (z1) { z4 = _c & 255 ; _i = z4; _UnsafeWr__FastPutChar (_wr, '\134' ); z5 = IDIV (_i, 64 ); z4 = z5; if ((z4 < 0) || (9 < z4)) RANGEFAULT; _UnsafeWr__FastPutChar (_wr, (_String__digits.elts[z4])); #line 237 z4 = _i & 63 ; _i = z4; z5 = IDIV (_i, 8 ); z4 = z5; if ((z4 < 0) || (9 < z4)) RANGEFAULT; _UnsafeWr__FastPutChar (_wr, (_String__digits.elts[z4])); #line 238 z4 = _i & 7 ; _i = z4; z4 = _i; if ((z4 < 0) || (9 < z4)) RANGEFAULT; _UnsafeWr__FastPutChar (_wr, (_String__digits.elts[z4])); goto if_17_end; #line 239 }; _UnsafeWr__FastPutChar (_wr, _c); if_17_end: /**/; } } }; #line 245 "String.m3" EXPORT t60 _String__SetClass (_t, _class) t6 _t; t8 _class; { t6 z2; #line 245 "String.m3" { { CHECKSTACKOVERFLOW; NILCHECKA (z2 = _t); ((*((t30*) z2))._class) = _class; } } }; #line 250 "String.m3" EXPORT t5 _String__GetClass (_t) t6 _t; { t6 z1; #line 250 "String.m3" { auto t5 __result; { CHECKSTACKOVERFLOW; NILCHECKA (z1 = _t); __result = ((*((t30*) z1))._class); return __result; } } }; #line 255 "String.m3" EXPORT t5 _String__Length (_t) t6 _t; { t15 z2; t6 z1; #line 255 "String.m3" { auto t5 __result; { CHECKSTACKOVERFLOW; z2 = (_t == 0); if (z2) { __result = 0 ; return __result; }; NILCHECKA (z1 = _t); __result = ((*((t30*) z1))._length); return __result; } } }; #line 263 "String.m3" EXPORT t5 _String__GetUID (_t) t6 _t; { t6 z1; #line 263 "String.m3" { auto t5 __result; { CHECKSTACKOVERFLOW; NILCHECKA (z1 = _t); __result = ((*((t30*) z1))._uid); return __result; } } }; #line 268 "String.m3" EXPORT t60 _String__SetUID (_t, _uid) t6 _t; t5 _uid; { t6 z2; #line 268 "String.m3" { { CHECKSTACKOVERFLOW; NILCHECKA (z2 = _t); ((*((t30*) z2))._uid) = _uid; } } }; #line 273 "String.m3" EXPORT t60 _String__Initialize () { #line 273 "String.m3" { { CHECKSTACKOVERFLOW; (_String__counter.elts[ 0 ]) = '_' ; { int from, to, index; from = 1 ; to = 4 ; { auto t5 _i; { for (index = from; index <= to; index += 1) { _i = (t5) index; #line 276 (_String__counter.elts[_i]) = '0' ; } } }; }; } } }; PRIVATE int init_done = -1; #line 276 "String.m3" PRIVATE void String__initProc (g) int g; { t21 z0; #line 276 "String.m3" if (init_done >= g) return; init_done = g; INITIALIZE (& String__init); INITIALIZE (& Word__init); INITIALIZE (& Fmt__init); #line 276 INITIALIZE (& Text__init); INITIALIZE (& UnsafeWr__init); INITIALIZE (& Wr__init); #line 36 ZERO1 (& _String__nextChar); ZERO (300001, & _String__chars); ZERO (5, & _String__counter); ZERO (4100, & _String__texts); ZERO (10, & _String__digits); #line 36 ZERO1 ((& _String__nextChar)); ZERO1 ((& _String__nTexts)); ZERO (4096, (& _String__hashTable)); z0.elts[0] = '0' ; z0.elts[1] = '1' ; z0.elts[2] = '2' ; z0.elts[3] = '3' ; z0.elts[4] = '4' ; z0.elts[5] = '5' ; z0.elts[6] = '6' ; #line 42 z0.elts[7] = '7' ; z0.elts[8] = '8' ; z0.elts[9] = '9' ; _String__digits = z0; ZERO (404, (& _String__numbers)); #line 276 return; }; #line 276 "String.m3" PRIVATE void t29_PrintProc (ref) t30* ref; { CHECKSTACKOVERFLOW; fprintf (stderr, "%s {", TC29->brand); fprintf (stderr, "^ = { "); #line 276 fprintf (stderr, "start = %d", (*ref)._start); fprintf (stderr, "length = %d", (*ref)._length); fprintf (stderr, "class = %d", (*ref)._class); #line 276 fprintf (stderr, "hash = %d", (*ref)._hash); fprintf (stderr, "textID = %d", (*ref)._textID); fprintf (stderr, "uid = %d", (*ref)._uid); #line 276 fprintf (stderr, "next = %#x", (*ref)._next); fprintf (stderr, "}"); fprintf (stderr, "}\n"); }; PRIVATE INITLINK me_0 ={(INITLINK*)NIL, 0, String__initProc}; static char* VSimports[] = { &VS_Word__And__479727d22e0cef9f, &VS_Text__T__fc4b369f3ab271fd, &VS_Text__GetChar__0f4bd6e72493f4ff, &VS_Text__Length__661a58173d76f41c, &VS_Text__Sub__ba151c702fe1a06f, &VS_Text__FromStr__4675e29c281840d3, &VS_Wr__Error__c367253d3ed4fd15, &VS_Wr__Failure__5f82cfb43dabf527, &VS_Thread__Alerted__fc88feb43485af46, &VS_UnsafeWr__FastPutChar__b1a53b0220cb969f, &VS_UnsafeWr__FastPutInt__da9571263c7312f3, &VS_Thread__Alerted__fc88feb43485af46, &VS_Wr__T__2555b70b3f7780b1, &VS_Wr__Failure__5f82cfb43dabf527, &VS_Wr__Error__c367253d3ed4fd15, &VS_String__T__3a6c7dc12615e4ee, NIL }; void String__MLink (phase) int phase; { switch (phase) { case 0: { me_0.link = String__init; String__init = & me_0; t29_TC = t29_TC_init; REGISTERTYPE (TC29); break; }; case 1: { #line 25 "String.m3" IDENTIFYTYPES (TC6, TC29); break; }; case 2: { break; }; }; };