1 /* Generated by Nim Compiler v1.6.2 */
2 #define NIM_INTBITS 64
3
4 #include "nimbase.h"
5 #include <string.h>
6 #undef LANGUAGE_C
7 #undef MIPSEB
8 #undef MIPSEL
9 #undef PPC
10 #undef R3000
11 #undef R4000
12 #undef i386
13 #undef linux
14 #undef mips
15 #undef near
16 #undef far
17 #undef powerpc
18 #undef unix
19 #define nimfr_(x, y)
20 #define nimln_(x, y)
21 typedef struct tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw;
22 typedef struct tyObject_Con__QbIMFB4loKCf0ZFA2SwcWQ tyObject_Con__QbIMFB4loKCf0ZFA2SwcWQ;
23 typedef struct tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg;
24 typedef struct tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ;
25 typedef struct tyObject_TSym__nnJKJFyjDGi5mnv8jwfTGQ tyObject_TSym__nnJKJFyjDGi5mnv8jwfTGQ;
26 typedef struct tyObject_TType__facALICuu8zUj0hjvbTLFg tyObject_TType__facALICuu8zUj0hjvbTLFg;
27 typedef struct tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q;
28 typedef struct NimStringDesc NimStringDesc;
29 typedef struct TGenericSeq TGenericSeq;
30 typedef struct tyObject_TIdent__1LTsGP7bSxg45u9aHcxh6OA tyObject_TIdent__1LTsGP7bSxg45u9aHcxh6OA;
31 typedef struct tyObject_TIdObj__KUwfjfUQEwGHguQbTcXu7w tyObject_TIdObj__KUwfjfUQEwGHguQbTcXu7w;
32 typedef struct RootObj RootObj;
33 typedef struct TNimType TNimType;
34 typedef struct TNimNode TNimNode;
35 typedef struct tyObject_ItemId__ozxAxZLHTQ9c3akTzYvt67g tyObject_ItemId__ozxAxZLHTQ9c3akTzYvt67g;
36 typedef struct tyObject_TLoc__EtHNvCB0bgfu9bFjzx9cb6aA tyObject_TLoc__EtHNvCB0bgfu9bFjzx9cb6aA;
37 typedef struct tyObject_RopeObj__OFzf0kSiPTcNreUIeJgWVA tyObject_RopeObj__OFzf0kSiPTcNreUIeJgWVA;
38 typedef struct tyObject_TLib__NBMxlJ6g3utqUlplqTTHkA tyObject_TLib__NBMxlJ6g3utqUlplqTTHkA;
39 typedef struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g;
40 typedef struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w;
41 typedef struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ;
42 typedef struct tyObject_GcStack__7fytPA5bBsob6See21YMRA tyObject_GcStack__7fytPA5bBsob6See21YMRA;
43 typedef struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg;
44 typedef struct tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ;
45 typedef struct tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg;
46 typedef struct tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw;
47 typedef struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA;
48 typedef struct tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw;
49 typedef struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw;
50 typedef struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg;
51 typedef struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg tyTuple__ujsjpB2O9cjj3uDHsXbnSzg;
52 typedef struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg;
53 typedef struct tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ;
54 typedef struct tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg;
55 typedef struct tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA;
56 typedef struct tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA;
57 typedef struct tySequence__Bre9bNyuQOg1EJKitjSzn8w tySequence__Bre9bNyuQOg1EJKitjSzn8w;
58 typedef struct tySequence__9aZVGG5Gtti9cC9bqRpXCtA3A tySequence__9aZVGG5Gtti9cC9bqRpXCtA3A;
59 struct tyObject_Con__QbIMFB4loKCf0ZFA2SwcWQ {
60 NIM_BOOL somethingTodo;
61 NI inFinally;
62 };
63 typedef NU8 tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw;
64 struct tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg {
65 tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ* wasMovedLocs;
66 tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw kind;
67 NIM_BOOL hasReturn;
68 NIM_BOOL hasBreak;
69 tyObject_TSym__nnJKJFyjDGi5mnv8jwfTGQ* label;
70 tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg* parent;
71 };
72 struct tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q {
73 NU16 line;
74 NI16 col;
75 NI32 fileIndex;
76 };
77 typedef NU32 tySet_tyEnum_TNodeFlag__jyh9acXHkhZANSSvPIY7ZLg;
78 struct TGenericSeq {
79 NI len;
80 NI reserved;
81 };
82 struct NimStringDesc {
83 TGenericSeq Sup;
84 NIM_CHAR data[SEQ_DECL_SIZE];
85 };
86 struct tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw {
87 tyObject_TType__facALICuu8zUj0hjvbTLFg* typ;
88 tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q info;
89 tySet_tyEnum_TNodeFlag__jyh9acXHkhZANSSvPIY7ZLg flags;
90 tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw kind;
91 union{
92 struct {NI64 intVal;
93 } _kind_1;
94 struct {NF floatVal;
95 } _kind_2;
96 struct {NimStringDesc* strVal;
97 } _kind_3;
98 struct {tyObject_TSym__nnJKJFyjDGi5mnv8jwfTGQ* sym;
99 } _kind_4;
100 struct {tyObject_TIdent__1LTsGP7bSxg45u9aHcxh6OA* ident;
101 } _kind_5;
102 struct {tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ* sons;
103 } _kind_6;
104 };
105 };
106 typedef NU8 tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A;
107 typedef NU8 tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ;
108 typedef N_NIMCALL_PTR(void, tyProc__ojoeKfW4VYIm36I9cpDTQIg) (void* p, NI op);
109 typedef N_NIMCALL_PTR(void*, tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ) (void* p);
110 struct TNimType {
111 NI size;
112 NI align;
113 tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A kind;
114 tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ flags;
115 TNimType* base;
116 TNimNode* node;
117 void* finalizer;
118 tyProc__ojoeKfW4VYIm36I9cpDTQIg marker;
119 tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ deepcopy;
120 };
121 struct RootObj {
122 TNimType* m_type;
123 };
124 struct tyObject_ItemId__ozxAxZLHTQ9c3akTzYvt67g {
125 NI32 module;
126 NI32 item;
127 };
128 struct tyObject_TIdObj__KUwfjfUQEwGHguQbTcXu7w {
129 RootObj Sup;
130 tyObject_ItemId__ozxAxZLHTQ9c3akTzYvt67g itemId;
131 };
132 typedef NU8 tyEnum_TSymKind__cNCW9acsSznmEccl1fgQwkw;
133 typedef NU16 tyEnum_TMagic__shZhZOdbVC5nnFvcXQAImg;
134 typedef NU64 tySet_tyEnum_TSymFlag__K9ay6LWMat9bUiT9bIbMxpDHw;
135 typedef NU32 tySet_tyEnum_TOption__WspMeQySXNP2XoTWR5MTgg;
136 typedef NU8 tyEnum_TLocKind__O7PRFZKuiBBWbku09cayVBg;
137 typedef NU8 tyEnum_TStorageLoc__JK9cKMX3XnqHaUky9b6gkGEw;
138 typedef NU16 tySet_tyEnum_TLocFlag__o2bqJgR4ceIupnUSpxiudA;
139 struct tyObject_TLoc__EtHNvCB0bgfu9bFjzx9cb6aA {
140 tyEnum_TLocKind__O7PRFZKuiBBWbku09cayVBg k;
141 tyEnum_TStorageLoc__JK9cKMX3XnqHaUky9b6gkGEw storage;
142 tySet_tyEnum_TLocFlag__o2bqJgR4ceIupnUSpxiudA flags;
143 tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* lode;
144 tyObject_RopeObj__OFzf0kSiPTcNreUIeJgWVA* r;
145 };
146 struct tyObject_TSym__nnJKJFyjDGi5mnv8jwfTGQ {
147 tyObject_TIdObj__KUwfjfUQEwGHguQbTcXu7w Sup;
148 tyEnum_TSymKind__cNCW9acsSznmEccl1fgQwkw kind;
149 union{
150 struct {tyObject_TSym__nnJKJFyjDGi5mnv8jwfTGQ* gcUnsafetyReason;
151 tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* transformedBody;
152 } _kind_1;
153 struct {tyObject_TSym__nnJKJFyjDGi5mnv8jwfTGQ* guard;
154 NI bitsize;
155 NI alignment;
156 } _kind_2;
157 };
158 tyEnum_TMagic__shZhZOdbVC5nnFvcXQAImg magic;
159 tyObject_TType__facALICuu8zUj0hjvbTLFg* typ;
160 tyObject_TIdent__1LTsGP7bSxg45u9aHcxh6OA* name;
161 tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q info;
162 tyObject_TSym__nnJKJFyjDGi5mnv8jwfTGQ* owner;
163 tySet_tyEnum_TSymFlag__K9ay6LWMat9bUiT9bIbMxpDHw flags;
164 tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* ast;
165 tySet_tyEnum_TOption__WspMeQySXNP2XoTWR5MTgg options;
166 NI position;
167 NI offset;
168 tyObject_TLoc__EtHNvCB0bgfu9bFjzx9cb6aA loc;
169 tyObject_TLib__NBMxlJ6g3utqUlplqTTHkA* annex;
170 tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* constraint;
171 };
172 typedef NU8 tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ;
173 struct TNimNode {
174 tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ kind;
175 NI offset;
176 TNimType* typ;
177 NCSTRING name;
178 NI len;
179 TNimNode** sons;
180 };
181 struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g {
182 NI refcount;
183 TNimType* typ;
184 };
185 struct tyObject_GcStack__7fytPA5bBsob6See21YMRA {
186 void* bottom;
187 };
188 struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w {
189 NI len;
190 NI cap;
191 tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g** d;
192 };
193 typedef tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ* tyArray__SPr7N6UKfuF549bNPiUvSRw[256];
194 typedef NU32 tyArray__BHbOSqU1t9b3Gt7K2c6fQig[24];
195 typedef tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* tyArray__N1u1nqOgmuJN9cSZrnMHgOQ[32];
196 typedef tyArray__N1u1nqOgmuJN9cSZrnMHgOQ tyArray__B6durA4ZCi1xjJvRtyYxMg[24];
197 typedef tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw* tyArray__lh2A89ahMmYg9bCmpVaplLbA[256];
198 struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA {
199 tyArray__lh2A89ahMmYg9bCmpVaplLbA data;
200 };
201 typedef tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* tyArray__0aOLqZchNi8nWtMTi8ND8w[2];
202 struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw {
203 tyArray__0aOLqZchNi8nWtMTi8ND8w link;
204 NI key;
205 NI upperBound;
206 NI level;
207 };
208 struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg {
209 tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* Field0;
210 NI Field1;
211 };
212 typedef tyTuple__ujsjpB2O9cjj3uDHsXbnSzg tyArray__LzOv2eCDGiceMKQstCLmhw[30];
213 struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg {
214 NI len;
215 tyArray__LzOv2eCDGiceMKQstCLmhw chunks;
216 tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg* next;
217 };
218 struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg {
219 NI minLargeObj;
220 NI maxLargeObj;
221 tyArray__SPr7N6UKfuF549bNPiUvSRw freeSmallChunks;
222 NU32 flBitmap;
223 tyArray__BHbOSqU1t9b3Gt7K2c6fQig slBitmap;
224 tyArray__B6durA4ZCi1xjJvRtyYxMg matrix;
225 tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw* llmem;
226 NI currMem;
227 NI maxMem;
228 NI freeMem;
229 NI occ;
230 NI lastSize;
231 tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA chunkStarts;
232 tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* root;
233 tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* deleted;
234 tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* last;
235 tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* freeAvlNodes;
236 NIM_BOOL locked;
237 NIM_BOOL blockChunkSizeIncrease;
238 NI nextChunkSize;
239 tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw bottomData;
240 tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg heapLinks;
241 };
242 struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg {
243 NI stackScans;
244 NI cycleCollections;
245 NI maxThreshold;
246 NI maxStackSize;
247 NI maxStackCells;
248 NI cycleTableSize;
249 NI64 maxPause;
250 };
251 struct tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ {
252 NI counter;
253 NI max;
254 tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg* head;
255 tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg** data;
256 };
257 struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ {
258 tyObject_GcStack__7fytPA5bBsob6See21YMRA stack;
259 NI cycleThreshold;
260 NI zctThreshold;
261 tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w zct;
262 tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w decStack;
263 tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tempStack;
264 NI recGcLock;
265 tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg region;
266 tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg stat;
267 tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ marked;
268 tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w additionalRoots;
269 NI gcThreadId;
270 };
271 struct tyObject_TIdent__1LTsGP7bSxg45u9aHcxh6OA {
272 NI id;
273 NimStringDesc* s;
274 tyObject_TIdent__1LTsGP7bSxg45u9aHcxh6OA* next;
275 NI h;
276 };
277 typedef NU8 tyEnum_TNodeFlag__jyh9acXHkhZANSSvPIY7ZLg;
278 typedef NI tyArray__emiAJ8okywrJw7ZHLzlXbQ[34];
279 struct tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA {
280 NI elems;
281 NI counter;
282 NI max;
283 tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA* head;
284 tySequence__Bre9bNyuQOg1EJKitjSzn8w* data;
285 tyArray__emiAJ8okywrJw7ZHLzlXbQ a;
286 };
287 typedef NU tyArray__VqSA39cBDWnwnJySTumCdjw[8];
288 struct tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA {
289 tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA* next;
290 NI key;
291 tyArray__VqSA39cBDWnwnJySTumCdjw bits;
292 };
293 typedef NU8 tySet_tyEnum_TTypeKind__9a3YiReNVD0IJHWFKgXRe9ag[9];
294 typedef NU8 tyEnum_TTypeKind__9a3YiReNVD0IJHWFKgXRe9ag;
295 typedef NU8 tyEnum_TCallingConvention__yjAJ8w0h1PBaSwSGJ3P7IA;
296 typedef NU64 tySet_tyEnum_TTypeFlag__x2m5g1NpbmDig4wLT3Ylhw;
297 struct tyObject_TType__facALICuu8zUj0hjvbTLFg {
298 tyObject_TIdObj__KUwfjfUQEwGHguQbTcXu7w Sup;
299 tyEnum_TTypeKind__9a3YiReNVD0IJHWFKgXRe9ag kind;
300 tyEnum_TCallingConvention__yjAJ8w0h1PBaSwSGJ3P7IA callConv;
301 tySet_tyEnum_TTypeFlag__x2m5g1NpbmDig4wLT3Ylhw flags;
302 tySequence__9aZVGG5Gtti9cC9bqRpXCtA3A* sons;
303 tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* n;
304 tyObject_TSym__nnJKJFyjDGi5mnv8jwfTGQ* owner;
305 tyObject_TSym__nnJKJFyjDGi5mnv8jwfTGQ* sym;
306 NI64 size;
307 NI16 align;
308 NI16 paddingAtEnd;
309 NI16 lockLevel;
310 tyObject_TLoc__EtHNvCB0bgfu9bFjzx9cb6aA loc;
311 tyObject_TType__facALICuu8zUj0hjvbTLFg* typeInst;
312 tyObject_ItemId__ozxAxZLHTQ9c3akTzYvt67g uniqueId;
313 };
314 struct tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ {
315 TGenericSeq Sup;
316 tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* data[SEQ_DECL_SIZE];
317 };
318 struct tySequence__Bre9bNyuQOg1EJKitjSzn8w {
319 TGenericSeq Sup;
320 tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA* data[SEQ_DECL_SIZE];
321 };
322 struct tySequence__9aZVGG5Gtti9cC9bqRpXCtA3A {
323 TGenericSeq Sup;
324 tyObject_TType__facALICuu8zUj0hjvbTLFg* data[SEQ_DECL_SIZE];
325 };
326 static N_INLINE(void, nimZeroMem)(void* p, NI size);
327 static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size);
328 N_LIB_PRIVATE N_NIMCALL(void, analyse__optimizer_170)(tyObject_Con__QbIMFB4loKCf0ZFA2SwcWQ* c, tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg* b, tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* n);
329 N_LIB_PRIVATE N_NIMCALL(TGenericSeq*, incrSeqV3)(TGenericSeq* s, TNimType* typ);
330 N_LIB_PRIVATE N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
331 static N_INLINE(void, asgnRef)(void** dest, void* src);
332 static N_INLINE(void, incRef__system_5309)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
333 static N_INLINE(NI, pluspercent___system_696)(NI x, NI y);
334 static N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell__system_5271)(void* usr);
335 static N_INLINE(NI, minuspercent___system_716)(NI x, NI y);
336 static N_INLINE(void, decRef__system_5316)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
337 static N_INLINE(NIM_BOOL, ltpercent___system_1005)(NI x, NI y);
338 static N_INLINE(void, rtlAddZCT__system_5314)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
339 N_LIB_PRIVATE N_NOINLINE(void, addZCT__system_5265)(tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w* s, tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
340 static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
341 static N_INLINE(NIM_BOOL, equalMem__system_1735)(void* a, void* b, NI size);
342 static N_INLINE(int, nimCmpMem)(void* a, void* b, NI size);
343 N_LIB_PRIVATE N_NIMCALL(void, wasMovedDestroyPair__optimizer_144)(tyObject_Con__QbIMFB4loKCf0ZFA2SwcWQ* c, tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg* b, tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* d);
344 N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, exprStructuralEquivalent__trees_56)(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* a, tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* b, NIM_BOOL strictSymEquality);
345 static N_INLINE(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw*, skipAddr__ast_5218)(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* n);
346 N_LIB_PRIVATE N_NIMCALL(void, del__closureiters_3571)(tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ** x, NI i);
347 static N_INLINE(NI, len__ast_3198)(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* n);
348 N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, canRaise__ast_5088)(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* fn);
349 N_LIB_PRIVATE N_NIMCALL(void, returnStmt__optimizer_67)(tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg* b);
350 N_LIB_PRIVATE N_NIMCALL(TGenericSeq*, setLengthSeqV2)(TGenericSeq* s, TNimType* typ, NI newLen);
351 N_LIB_PRIVATE N_NIMCALL(void, invalidateWasMoved__optimizer_128)(tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg* c, tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* x);
352 N_LIB_PRIVATE N_NIMCALL(void, nestedBlock__optimizer_17)(tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg* parent, tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw kind, tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg* Result);
353 static N_INLINE(void, mergeBasicBlockInfo__optimizer_78)(tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg* parent, tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg* this_0);
354 N_LIB_PRIVATE N_NIMCALL(void, intersect__optimizer_103)(tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ** summary, tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ* branch);
355 static N_INLINE(void, initIntSet__pureZcollectionsZintsets_238)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* Result);
356 N_LIB_PRIVATE N_NIMCALL(void, initPackedSet__pureZcollectionsZintsets_16)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* Result);
357 N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, wasMovedTarget__optimizer_85)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* matches, tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ* branch, tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* moveTarget);
358 N_LIB_PRIVATE N_NIMCALL(void, incl__pureZcollectionsZintsets_55)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* s, NI key);
359 N_LIB_PRIVATE N_NIMCALL(tyObject_TType__facALICuu8zUj0hjvbTLFg*, skipTypes__ast_3735)(tyObject_TType__facALICuu8zUj0hjvbTLFg* t, tySet_tyEnum_TTypeKind__9a3YiReNVD0IJHWFKgXRe9ag kinds);
360 N_LIB_PRIVATE N_NIMCALL(void, breakStmt__optimizer_43)(tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg* b, tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* n);
361 static N_INLINE(NI, safeLen__ast_3191)(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* n);
362 N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw*, shallowCopy__ast_4413)(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* src);
363 N_LIB_PRIVATE N_NIMCALL(void, opt__optimizer_350)(tyObject_Con__QbIMFB4loKCf0ZFA2SwcWQ c, tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* n, tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* parent, NI parentPos);
364 N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw*, newNodeI__ast_3356)(tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw kind, tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q info);
365 extern TNimType NTItnodeseq__ehmV9bTklH2Gt9cXHV9c0HLeQ_;
366 STRING_LITERAL(TM__zdBS9bxu9aeb3QPAJFgGx9cyQ_2, "=destroy", 8);
367 STRING_LITERAL(TM__zdBS9bxu9aeb3QPAJFgGx9cyQ_3, "=sink", 5);
368 static NIM_CONST tySet_tyEnum_TTypeKind__9a3YiReNVD0IJHWFKgXRe9ag TM__zdBS9bxu9aeb3QPAJFgGx9cyQ_4 = {
369 0x10, 0xa8, 0x90, 0x00, 0x00, 0x60, 0x80, 0x00,
370 0x00}
371 ;
372 extern tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ gch__system_5218;
N_INLINE(void,nimSetMem__systemZmemory_7)373 static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size) {
374 void* T1_;
375 T1_ = (void*)0;
376 T1_ = memset(a, v, ((size_t) (size)));
377 }
N_INLINE(void,nimZeroMem)378 static N_INLINE(void, nimZeroMem)(void* p, NI size) {
379 nimSetMem__systemZmemory_7(p, ((int) 0), size);
380 }
N_INLINE(NI,pluspercent___system_696)381 static N_INLINE(NI, pluspercent___system_696)(NI x, NI y) {
382 NI result;
383 result = (NI)0;
384 result = ((NI) ((NU)((NU64)(((NU) (x))) + (NU64)(((NU) (y))))));
385 return result;
386 }
N_INLINE(void,incRef__system_5309)387 static N_INLINE(void, incRef__system_5309)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
388 (*c).refcount = pluspercent___system_696((*c).refcount, ((NI) 8));
389 }
N_INLINE(NI,minuspercent___system_716)390 static N_INLINE(NI, minuspercent___system_716)(NI x, NI y) {
391 NI result;
392 result = (NI)0;
393 result = ((NI) ((NU)((NU64)(((NU) (x))) - (NU64)(((NU) (y))))));
394 return result;
395 }
N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g *,usrToCell__system_5271)396 static N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell__system_5271)(void* usr) {
397 tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* result;
398 NI T1_;
399 result = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
400 T1_ = (NI)0;
401 T1_ = minuspercent___system_716(((NI) (ptrdiff_t) (usr)), ((NI) 16));
402 result = ((tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*) (T1_));
403 return result;
404 }
N_INLINE(NIM_BOOL,ltpercent___system_1005)405 static N_INLINE(NIM_BOOL, ltpercent___system_1005)(NI x, NI y) {
406 NIM_BOOL result;
407 result = (NIM_BOOL)0;
408 result = ((NU64)(((NU) (x))) < (NU64)(((NU) (y))));
409 return result;
410 }
N_INLINE(void,rtlAddZCT__system_5314)411 static N_INLINE(void, rtlAddZCT__system_5314)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
412 addZCT__system_5265((&gch__system_5218.zct), c);
413 }
N_INLINE(void,decRef__system_5316)414 static N_INLINE(void, decRef__system_5316)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
415 (*c).refcount = minuspercent___system_716((*c).refcount, ((NI) 8));
416 {
417 NIM_BOOL T3_;
418 T3_ = (NIM_BOOL)0;
419 T3_ = ltpercent___system_1005((*c).refcount, ((NI) 8));
420 if (!T3_) goto LA4_;
421 rtlAddZCT__system_5314(c);
422 }
423 LA4_: ;
424 }
N_INLINE(void,asgnRef)425 static N_INLINE(void, asgnRef)(void** dest, void* src) {
426 {
427 tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T5_;
428 if (!!((src == NIM_NIL))) goto LA3_;
429 T5_ = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
430 T5_ = usrToCell__system_5271(src);
431 incRef__system_5309(T5_);
432 }
433 LA3_: ;
434 {
435 tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T10_;
436 if (!!(((*dest) == NIM_NIL))) goto LA8_;
437 T10_ = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
438 T10_ = usrToCell__system_5271((*dest));
439 decRef__system_5316(T10_);
440 }
441 LA8_: ;
442 (*dest) = src;
443 }
N_INLINE(int,nimCmpMem)444 static N_INLINE(int, nimCmpMem)(void* a, void* b, NI size) {
445 int result;
446 result = (int)0;
447 result = memcmp(a, b, ((size_t) (size)));
448 return result;
449 }
N_INLINE(NIM_BOOL,equalMem__system_1735)450 static N_INLINE(NIM_BOOL, equalMem__system_1735)(void* a, void* b, NI size) {
451 NIM_BOOL result;
452 int T1_;
453 result = (NIM_BOOL)0;
454 T1_ = (int)0;
455 T1_ = nimCmpMem(a, b, size);
456 result = (T1_ == ((NI32) 0));
457 return result;
458 }
N_INLINE(NIM_BOOL,eqStrings)459 static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b) {
460 NIM_BOOL result;
461 NI alen;
462 NI blen;
463 { result = (NIM_BOOL)0;
464 alen = (a ? a->Sup.len : 0);
465 blen = (b ? b->Sup.len : 0);
466 {
467 if (!(alen == blen)) goto LA3_;
468 {
469 if (!(alen == ((NI) 0))) goto LA7_;
470 result = NIM_TRUE;
471 goto BeforeRet_;
472 }
473 LA7_: ;
474 result = equalMem__system_1735(((void*) ((&a->data[((NI) 0)]))), ((void*) ((&b->data[((NI) 0)]))), ((NI) (alen)));
475 goto BeforeRet_;
476 }
477 LA3_: ;
478 }BeforeRet_: ;
479 return result;
480 }
N_INLINE(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw *,skipAddr__ast_5218)481 static N_INLINE(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw*, skipAddr__ast_5218)(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* n) {
482 tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* result;
483 result = NIM_NIL;
484 {
485 if (!((*n).kind == ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 64))) goto LA3_;
486 result = (*n)._kind_6.sons->data[((NI) 0)];
487 }
488 goto LA1_;
489 LA3_: ;
490 {
491 result = n;
492 }
493 LA1_: ;
494 return result;
495 }
N_NIMCALL(void,wasMovedDestroyPair__optimizer_144)496 N_LIB_PRIVATE N_NIMCALL(void, wasMovedDestroyPair__optimizer_144)(tyObject_Con__QbIMFB4loKCf0ZFA2SwcWQ* c, tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg* b, tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* d) {
497 NI i;
498 i = ((NI) 0);
499 {
500 while (1) {
501 NI T3_;
502 T3_ = ((*b).wasMovedLocs ? (*b).wasMovedLocs->Sup.len : 0);
503 if (!(i < T3_)) goto LA2;
504 {
505 tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* T6_;
506 tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* T7_;
507 NIM_BOOL T8_;
508 T6_ = NIM_NIL;
509 T6_ = skipAddr__ast_5218((*(*b).wasMovedLocs->data[i])._kind_6.sons->data[((NI) 1)]);
510 T7_ = NIM_NIL;
511 T7_ = skipAddr__ast_5218((*d)._kind_6.sons->data[((NI) 1)]);
512 T8_ = (NIM_BOOL)0;
513 T8_ = exprStructuralEquivalent__trees_56(T6_, T7_, NIM_TRUE);
514 if (!T8_) goto LA9_;
515 (*(*b).wasMovedLocs->data[i]).flags |= ((NU32)1)<<((((tyEnum_TNodeFlag__jyh9acXHkhZANSSvPIY7ZLg) 0)) & 31);
516 (*c).somethingTodo = NIM_TRUE;
517 (*d).flags |= ((NU32)1)<<((((tyEnum_TNodeFlag__jyh9acXHkhZANSSvPIY7ZLg) 0)) & 31);
518 del__closureiters_3571((&(*b).wasMovedLocs), ((NI) (i)));
519 }
520 goto LA4_;
521 LA9_: ;
522 {
523 i += ((NI) 1);
524 }
525 LA4_: ;
526 } LA2: ;
527 }
528 }
N_INLINE(NI,len__ast_3198)529 static N_INLINE(NI, len__ast_3198)(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* n) {
530 NI result;
531 NI T1_;
532 result = (NI)0;
533 T1_ = ((*n)._kind_6.sons ? (*n)._kind_6.sons->Sup.len : 0);
534 result = T1_;
535 return result;
536 }
N_NIMCALL(void,returnStmt__optimizer_67)537 N_LIB_PRIVATE N_NIMCALL(void, returnStmt__optimizer_67)(tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg* b) {
538 tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg* it;
539 (*b).hasReturn = NIM_TRUE;
540 it = b;
541 {
542 while (1) {
543 if (!!((it == ((tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg*) NIM_NIL)))) goto LA2;
544 unsureAsgnRef((void**) (&(*it).wasMovedLocs), (tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ*) setLengthSeqV2(&((*it).wasMovedLocs)->Sup, (&NTItnodeseq__ehmV9bTklH2Gt9cXHV9c0HLeQ_), ((NI) 0)));
545 it = (*it).parent;
546 } LA2: ;
547 }
548 }
N_NIMCALL(void,invalidateWasMoved__optimizer_128)549 N_LIB_PRIVATE N_NIMCALL(void, invalidateWasMoved__optimizer_128)(tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg* c, tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* x) {
550 NI i;
551 i = ((NI) 0);
552 {
553 while (1) {
554 NI T3_;
555 T3_ = ((*c).wasMovedLocs ? (*c).wasMovedLocs->Sup.len : 0);
556 if (!(i < T3_)) goto LA2;
557 {
558 tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* T6_;
559 NIM_BOOL T7_;
560 T6_ = NIM_NIL;
561 T6_ = skipAddr__ast_5218((*(*c).wasMovedLocs->data[i])._kind_6.sons->data[((NI) 1)]);
562 T7_ = (NIM_BOOL)0;
563 T7_ = exprStructuralEquivalent__trees_56(T6_, x, NIM_TRUE);
564 if (!T7_) goto LA8_;
565 del__closureiters_3571((&(*c).wasMovedLocs), ((NI) (i)));
566 }
567 goto LA4_;
568 LA8_: ;
569 {
570 i += ((NI) 1);
571 }
572 LA4_: ;
573 } LA2: ;
574 }
575 }
N_NIMCALL(void,nestedBlock__optimizer_17)576 N_LIB_PRIVATE N_NIMCALL(void, nestedBlock__optimizer_17)(tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg* parent, tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw kind, tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg* Result) {
577 unsureAsgnRef((void**)&(*Result).wasMovedLocs, NIM_NIL);
578 (*Result).kind = 0;
579 (*Result).hasReturn = 0;
580 (*Result).hasBreak = 0;
581 unsureAsgnRef((void**)&(*Result).label, NIM_NIL);
582 (*Result).parent = NIM_NIL;
583 unsureAsgnRef((void**) (&(*Result).wasMovedLocs), NIM_NIL);
584 (*Result).kind = kind;
585 (*Result).hasReturn = NIM_FALSE;
586 (*Result).hasBreak = NIM_FALSE;
587 unsureAsgnRef((void**) (&(*Result).label), ((tyObject_TSym__nnJKJFyjDGi5mnv8jwfTGQ*) NIM_NIL));
588 (*Result).parent = parent;
589 }
N_INLINE(void,mergeBasicBlockInfo__optimizer_78)590 static N_INLINE(void, mergeBasicBlockInfo__optimizer_78)(tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg* parent, tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg* this_0) {
591 {
592 if (!(*this_0).hasReturn) goto LA3_;
593 unsureAsgnRef((void**) (&(*parent).wasMovedLocs), (tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ*) setLengthSeqV2(&((*parent).wasMovedLocs)->Sup, (&NTItnodeseq__ehmV9bTklH2Gt9cXHV9c0HLeQ_), ((NI) 0)));
594 (*parent).hasReturn = NIM_TRUE;
595 }
596 LA3_: ;
597 }
N_INLINE(void,initIntSet__pureZcollectionsZintsets_238)598 static N_INLINE(void, initIntSet__pureZcollectionsZintsets_238)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* Result) {
599 initPackedSet__pureZcollectionsZintsets_16(Result);
600 }
N_NIMCALL(NIM_BOOL,wasMovedTarget__optimizer_85)601 N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, wasMovedTarget__optimizer_85)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* matches, tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ* branch, tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* moveTarget) {
602 NIM_BOOL result;
603 result = (NIM_BOOL)0;
604 result = NIM_FALSE;
605 {
606 NI i;
607 NI colontmp_;
608 NI T2_;
609 NI i_2;
610 i = (NI)0;
611 colontmp_ = (NI)0;
612 T2_ = (branch ? branch->Sup.len : 0);
613 colontmp_ = T2_;
614 i_2 = ((NI) 0);
615 {
616 while (1) {
617 if (!(i_2 < colontmp_)) goto LA4;
618 i = i_2;
619 {
620 tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* T7_;
621 NIM_BOOL T8_;
622 T7_ = NIM_NIL;
623 T7_ = skipAddr__ast_5218((*branch->data[i])._kind_6.sons->data[((NI) 1)]);
624 T8_ = (NIM_BOOL)0;
625 T8_ = exprStructuralEquivalent__trees_56(T7_, moveTarget, NIM_TRUE);
626 if (!T8_) goto LA9_;
627 result = NIM_TRUE;
628 incl__pureZcollectionsZintsets_55(matches, i);
629 }
630 LA9_: ;
631 i_2 += ((NI) 1);
632 } LA4: ;
633 }
634 }
635 return result;
636 }
N_NIMCALL(void,intersect__optimizer_103)637 N_LIB_PRIVATE N_NIMCALL(void, intersect__optimizer_103)(tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ** summary, tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ* branch) {
638 NI i;
639 tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA matches;
640 i = ((NI) 0);
641 nimZeroMem((void*)(&matches), sizeof(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA));
642 initIntSet__pureZcollectionsZintsets_238((&matches));
643 {
644 while (1) {
645 NI T3_;
646 T3_ = ((*summary) ? (*summary)->Sup.len : 0);
647 if (!(i < T3_)) goto LA2;
648 {
649 tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* T6_;
650 NIM_BOOL T7_;
651 T6_ = NIM_NIL;
652 T6_ = skipAddr__ast_5218((*(*summary)->data[i])._kind_6.sons->data[((NI) 1)]);
653 T7_ = (NIM_BOOL)0;
654 T7_ = wasMovedTarget__optimizer_85((&matches), branch, T6_);
655 if (!T7_) goto LA8_;
656 i += ((NI) 1);
657 }
658 goto LA4_;
659 LA8_: ;
660 {
661 del__closureiters_3571(summary, ((NI) (i)));
662 }
663 LA4_: ;
664 } LA2: ;
665 }
666 {
667 NI m;
668 m = (NI)0;
669 {
670 if (!(matches.elems <= ((NI) 34))) goto LA14_;
671 {
672 NI i_2;
673 NI i_3;
674 i_2 = (NI)0;
675 i_3 = ((NI) 0);
676 {
677 while (1) {
678 NI T19_;
679 if (!(i_3 < matches.elems)) goto LA18;
680 i_2 = i_3;
681 m = matches.a[(i_2)- 0];
682 unsureAsgnRef((void**) (&(*summary)), (tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ*) incrSeqV3((TGenericSeq*)((*summary)), (&NTItnodeseq__ehmV9bTklH2Gt9cXHV9c0HLeQ_)));
683 T19_ = (*summary)->Sup.len++;
684 asgnRef((void**) (&(*summary)->data[T19_]), branch->data[m]);
685 i_3 += ((NI) 1);
686 } LA18: ;
687 }
688 }
689 }
690 goto LA12_;
691 LA14_: ;
692 {
693 tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA* r;
694 r = matches.head;
695 {
696 while (1) {
697 NI i_4;
698 if (!!((r == ((tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA*) NIM_NIL)))) goto LA22;
699 i_4 = ((NI) 0);
700 {
701 while (1) {
702 NU w;
703 NI j;
704 if (!(i_4 <= ((NI) 7))) goto LA24;
705 w = (*r).bits[(i_4)- 0];
706 j = ((NI) 0);
707 {
708 while (1) {
709 if (!!((w == ((NU) 0)))) goto LA26;
710 {
711 NI T31_;
712 NI T32_;
713 if (!!(((NU)(w & ((NU) 1)) == ((NU) 0)))) goto LA29_;
714 T31_ = (NI)0;
715 T31_ = pluspercent___system_696((NI)((NU64)(i_4) << (NU64)(((NI) 6))), j);
716 m = (NI)((NI)((NU64)((*r).key) << (NU64)(((NI) 9))) | T31_);
717 unsureAsgnRef((void**) (&(*summary)), (tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ*) incrSeqV3((TGenericSeq*)((*summary)), (&NTItnodeseq__ehmV9bTklH2Gt9cXHV9c0HLeQ_)));
718 T32_ = (*summary)->Sup.len++;
719 asgnRef((void**) (&(*summary)->data[T32_]), branch->data[m]);
720 }
721 LA29_: ;
722 j += ((NI) 1);
723 w = (NU)((NU64)(w) >> (NU64)(((NI) 1)));
724 } LA26: ;
725 }
726 i_4 += ((NI) 1);
727 } LA24: ;
728 }
729 r = (*r).next;
730 } LA22: ;
731 }
732 }
733 LA12_: ;
734 }
735 }
N_NIMCALL(void,breakStmt__optimizer_43)736 N_LIB_PRIVATE N_NIMCALL(void, breakStmt__optimizer_43)(tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg* b, tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* n) {
737 tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg* it;
738 it = b;
739 {
740 while (1) {
741 if (!!((it == ((tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg*) NIM_NIL)))) goto LA2;
742 unsureAsgnRef((void**) (&(*it).wasMovedLocs), (tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ*) setLengthSeqV2(&((*it).wasMovedLocs)->Sup, (&NTItnodeseq__ehmV9bTklH2Gt9cXHV9c0HLeQ_), ((NI) 0)));
743 (*it).hasBreak = NIM_TRUE;
744 {
745 if (!((*n).kind == ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 3))) goto LA5_;
746 {
747 if (!((*it).label == (*n)._kind_4.sym)) goto LA9_;
748 goto LA1;
749 }
750 LA9_: ;
751 }
752 goto LA3_;
753 LA5_: ;
754 {
755 {
756 if (!((*it).kind == ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 96) || (*it).kind == ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 112) || (*it).kind == ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 127))) goto LA14_;
757 goto LA1;
758 }
759 LA14_: ;
760 }
761 LA3_: ;
762 it = (*it).parent;
763 } LA2: ;
764 } LA1: ;
765 }
N_INLINE(NI,safeLen__ast_3191)766 static N_INLINE(NI, safeLen__ast_3191)(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* n) {
767 NI result;
768 result = (NI)0;
769 {
770 if (!((*n).kind >= ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 0) && (*n).kind <= ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 23))) goto LA3_;
771 result = ((NI) 0);
772 }
773 goto LA1_;
774 LA3_: ;
775 {
776 result = len__ast_3198(n);
777 }
778 LA1_: ;
779 return result;
780 }
N_NIMCALL(void,analyse__optimizer_170)781 N_LIB_PRIVATE N_NIMCALL(void, analyse__optimizer_170)(tyObject_Con__QbIMFB4loKCf0ZFA2SwcWQ* c, tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg* b, tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* n) {
782 switch ((*n).kind) {
783 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 26) ... ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 32):
784 {
785 NIM_BOOL special;
786 NIM_BOOL reverse;
787 special = NIM_FALSE;
788 reverse = NIM_FALSE;
789 {
790 tyObject_TSym__nnJKJFyjDGi5mnv8jwfTGQ* s;
791 if (!((*(*n)._kind_6.sons->data[((NI) 0)]).kind == ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 3))) goto LA4_;
792 s = (*(*n)._kind_6.sons->data[((NI) 0)])._kind_4.sym;
793 {
794 NI T10_;
795 if (!((*s).magic == ((tyEnum_TMagic__shZhZOdbVC5nnFvcXQAImg) 149))) goto LA8_;
796 unsureAsgnRef((void**) (&(*b).wasMovedLocs), (tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ*) incrSeqV3((TGenericSeq*)((*b).wasMovedLocs), (&NTItnodeseq__ehmV9bTklH2Gt9cXHV9c0HLeQ_)));
797 T10_ = (*b).wasMovedLocs->Sup.len++;
798 asgnRef((void**) (&(*b).wasMovedLocs->data[T10_]), n);
799 special = NIM_TRUE;
800 }
801 goto LA6_;
802 LA8_: ;
803 {
804 if (!eqStrings((*(*s).name).s, ((NimStringDesc*) &TM__zdBS9bxu9aeb3QPAJFgGx9cyQ_2))) goto LA12_;
805 {
806 NIM_BOOL T16_;
807 NIM_BOOL T18_;
808 T16_ = (NIM_BOOL)0;
809 T16_ = (((NI) 0) < (*c).inFinally);
810 if (!(T16_)) goto LA17_;
811 T18_ = (NIM_BOOL)0;
812 T18_ = (*b).hasReturn;
813 if (T18_) goto LA19_;
814 T18_ = (*b).hasBreak;
815 LA19_: ;
816 T16_ = T18_;
817 LA17_: ;
818 if (!T16_) goto LA20_;
819 }
820 goto LA14_;
821 LA20_: ;
822 {
823 wasMovedDestroyPair__optimizer_144(c, b, n);
824 }
825 LA14_: ;
826 special = NIM_TRUE;
827 }
828 goto LA6_;
829 LA12_: ;
830 {
831 if (!eqStrings((*(*s).name).s, ((NimStringDesc*) &TM__zdBS9bxu9aeb3QPAJFgGx9cyQ_3))) goto LA24_;
832 reverse = NIM_TRUE;
833 }
834 goto LA6_;
835 LA24_: ;
836 LA6_: ;
837 }
838 LA4_: ;
839 {
840 if (!!(special)) goto LA28_;
841 {
842 if (!!(reverse)) goto LA32_;
843 {
844 NI i;
845 NI colontmp_;
846 NI i_2;
847 i = (NI)0;
848 colontmp_ = (NI)0;
849 colontmp_ = len__ast_3198(n);
850 i_2 = ((NI) 0);
851 {
852 while (1) {
853 if (!(i_2 < colontmp_)) goto LA36;
854 i = i_2;
855 analyse__optimizer_170(c, b, (*n)._kind_6.sons->data[i]);
856 i_2 += ((NI) 1);
857 } LA36: ;
858 }
859 }
860 }
861 goto LA30_;
862 LA32_: ;
863 {
864 {
865 NI i_3;
866 NI colontmp__2;
867 NI T39_;
868 NI res;
869 i_3 = (NI)0;
870 colontmp__2 = (NI)0;
871 T39_ = (NI)0;
872 T39_ = len__ast_3198(n);
873 colontmp__2 = (NI)(T39_ - ((NI) 1));
874 res = colontmp__2;
875 {
876 while (1) {
877 if (!(((NI) 0) <= res)) goto LA41;
878 i_3 = res;
879 analyse__optimizer_170(c, b, (*n)._kind_6.sons->data[i_3]);
880 res -= ((NI) 1);
881 } LA41: ;
882 }
883 }
884 }
885 LA30_: ;
886 {
887 NIM_BOOL T44_;
888 T44_ = (NIM_BOOL)0;
889 T44_ = canRaise__ast_5088((*n)._kind_6.sons->data[((NI) 0)]);
890 if (!T44_) goto LA45_;
891 returnStmt__optimizer_67(b);
892 }
893 LA45_: ;
894 }
895 LA28_: ;
896 }
897 break;
898 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 3):
899 {
900 invalidateWasMoved__optimizer_128(b, n);
901 }
902 break;
903 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 0) ... ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 2):
904 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 4) ... ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 23):
905 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 98):
906 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 79):
907 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 81):
908 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 80):
909 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 84):
910 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 82):
911 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 83):
912 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 51):
913 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 52):
914 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 159):
915 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 101):
916 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 102):
917 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 121):
918 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 116):
919 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 118):
920 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 90):
921 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 125):
922 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 158):
923 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 132):
924 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 123):
925 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 122):
926 {
927 }
928 break;
929 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 73):
930 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 74):
931 {
932 analyse__optimizer_170(c, b, (*n)._kind_6.sons->data[((NI) 1)]);
933 analyse__optimizer_170(c, b, (*n)._kind_6.sons->data[((NI) 0)]);
934 }
935 break;
936 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 92):
937 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 48):
938 {
939 NIM_BOOL isExhaustive;
940 NI T51_;
941 tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ* wasMovedSet;
942 T51_ = (NI)0;
943 T51_ = len__ast_3198(n);
944 isExhaustive = ((*(*n)._kind_6.sons->data[(NI)(T51_ - ((NI) 1))]).kind == ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 88) || (*(*n)._kind_6.sons->data[(NI)(T51_ - ((NI) 1))]).kind == ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 50));
945 wasMovedSet = NIM_NIL;
946 {
947 NI i_4;
948 NI colontmp__3;
949 NI i_5;
950 i_4 = (NI)0;
951 colontmp__3 = (NI)0;
952 colontmp__3 = len__ast_3198(n);
953 i_5 = ((NI) 0);
954 {
955 while (1) {
956 tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg branch;
957 if (!(i_5 < colontmp__3)) goto LA54;
958 i_4 = i_5;
959 nimZeroMem((void*)(&branch), sizeof(tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg));
960 nestedBlock__optimizer_17(b, (*(*n)._kind_6.sons->data[i_4]).kind, (&branch));
961 analyse__optimizer_170(c, (&branch), (*n)._kind_6.sons->data[i_4]);
962 mergeBasicBlockInfo__optimizer_78(b, (&branch));
963 {
964 if (!isExhaustive) goto LA57_;
965 {
966 if (!(i_4 == ((NI) 0))) goto LA61_;
967 wasMovedSet = branch.wasMovedLocs;
968 branch.wasMovedLocs = NIM_NIL;
969 }
970 goto LA59_;
971 LA61_: ;
972 {
973 intersect__optimizer_103((&wasMovedSet), branch.wasMovedLocs);
974 }
975 LA59_: ;
976 }
977 LA57_: ;
978 i_5 += ((NI) 1);
979 } LA54: ;
980 }
981 }
982 {
983 NI i_6;
984 NI colontmp__4;
985 NI T65_;
986 NI i_7;
987 i_6 = (NI)0;
988 colontmp__4 = (NI)0;
989 T65_ = (wasMovedSet ? wasMovedSet->Sup.len : 0);
990 colontmp__4 = T65_;
991 i_7 = ((NI) 0);
992 {
993 while (1) {
994 NI T68_;
995 if (!(i_7 < colontmp__4)) goto LA67;
996 i_6 = i_7;
997 unsureAsgnRef((void**) (&(*b).wasMovedLocs), (tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ*) incrSeqV3((TGenericSeq*)((*b).wasMovedLocs), (&NTItnodeseq__ehmV9bTklH2Gt9cXHV9c0HLeQ_)));
998 T68_ = (*b).wasMovedLocs->Sup.len++;
999 asgnRef((void**) (&(*b).wasMovedLocs->data[T68_]), wasMovedSet->data[i_6]);
1000 i_7 += ((NI) 1);
1001 } LA67: ;
1002 }
1003 }
1004 }
1005 break;
1006 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 97):
1007 {
1008 NIM_BOOL isExhaustive_2;
1009 NIM_BOOL T70_;
1010 tyObject_TType__facALICuu8zUj0hjvbTLFg* T71_;
1011 NI T73_;
1012 tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ* wasMovedSet_2;
1013 T70_ = (NIM_BOOL)0;
1014 T71_ = NIM_NIL;
1015 T71_ = skipTypes__ast_3735((*(*n)._kind_6.sons->data[((NI) 0)]).typ, TM__zdBS9bxu9aeb3QPAJFgGx9cyQ_4);
1016 T70_ = !(((*T71_).kind >= ((tyEnum_TTypeKind__9a3YiReNVD0IJHWFKgXRe9ag) 36) && (*T71_).kind <= ((tyEnum_TTypeKind__9a3YiReNVD0IJHWFKgXRe9ag) 39) || (*T71_).kind == ((tyEnum_TTypeKind__9a3YiReNVD0IJHWFKgXRe9ag) 28)));
1017 if (T70_) goto LA72_;
1018 T73_ = (NI)0;
1019 T73_ = len__ast_3198(n);
1020 T70_ = ((*(*n)._kind_6.sons->data[(NI)(T73_ - ((NI) 1))]).kind == ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 88));
1021 LA72_: ;
1022 isExhaustive_2 = T70_;
1023 analyse__optimizer_170(c, b, (*n)._kind_6.sons->data[((NI) 0)]);
1024 wasMovedSet_2 = NIM_NIL;
1025 {
1026 NI i_8;
1027 NI colontmp__5;
1028 NI i_9;
1029 i_8 = (NI)0;
1030 colontmp__5 = (NI)0;
1031 colontmp__5 = len__ast_3198(n);
1032 i_9 = ((NI) 1);
1033 {
1034 while (1) {
1035 tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg branch_2;
1036 if (!(i_9 < colontmp__5)) goto LA76;
1037 i_8 = i_9;
1038 nimZeroMem((void*)(&branch_2), sizeof(tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg));
1039 nestedBlock__optimizer_17(b, (*(*n)._kind_6.sons->data[i_8]).kind, (&branch_2));
1040 analyse__optimizer_170(c, (&branch_2), (*n)._kind_6.sons->data[i_8]);
1041 mergeBasicBlockInfo__optimizer_78(b, (&branch_2));
1042 {
1043 if (!isExhaustive_2) goto LA79_;
1044 {
1045 if (!(i_8 == ((NI) 1))) goto LA83_;
1046 wasMovedSet_2 = branch_2.wasMovedLocs;
1047 branch_2.wasMovedLocs = NIM_NIL;
1048 }
1049 goto LA81_;
1050 LA83_: ;
1051 {
1052 intersect__optimizer_103((&wasMovedSet_2), branch_2.wasMovedLocs);
1053 }
1054 LA81_: ;
1055 }
1056 LA79_: ;
1057 i_9 += ((NI) 1);
1058 } LA76: ;
1059 }
1060 }
1061 {
1062 NI i_10;
1063 NI colontmp__6;
1064 NI T87_;
1065 NI i_11;
1066 i_10 = (NI)0;
1067 colontmp__6 = (NI)0;
1068 T87_ = (wasMovedSet_2 ? wasMovedSet_2->Sup.len : 0);
1069 colontmp__6 = T87_;
1070 i_11 = ((NI) 0);
1071 {
1072 while (1) {
1073 NI T90_;
1074 if (!(i_11 < colontmp__6)) goto LA89;
1075 i_10 = i_11;
1076 unsureAsgnRef((void**) (&(*b).wasMovedLocs), (tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ*) incrSeqV3((TGenericSeq*)((*b).wasMovedLocs), (&NTItnodeseq__ehmV9bTklH2Gt9cXHV9c0HLeQ_)));
1077 T90_ = (*b).wasMovedLocs->Sup.len++;
1078 asgnRef((void**) (&(*b).wasMovedLocs->data[T90_]), wasMovedSet_2->data[i_10]);
1079 i_11 += ((NI) 1);
1080 } LA89: ;
1081 }
1082 }
1083 }
1084 break;
1085 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 106):
1086 {
1087 {
1088 NI i_12;
1089 NI colontmp__7;
1090 NI i_13;
1091 i_12 = (NI)0;
1092 colontmp__7 = (NI)0;
1093 colontmp__7 = len__ast_3198(n);
1094 i_13 = ((NI) 0);
1095 {
1096 while (1) {
1097 tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg tryBody;
1098 if (!(i_13 < colontmp__7)) goto LA94;
1099 i_12 = i_13;
1100 nimZeroMem((void*)(&tryBody), sizeof(tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg));
1101 nestedBlock__optimizer_17(b, ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 106), (&tryBody));
1102 analyse__optimizer_170(c, (&tryBody), (*n)._kind_6.sons->data[i_12]);
1103 mergeBasicBlockInfo__optimizer_78(b, (&tryBody));
1104 i_13 += ((NI) 1);
1105 } LA94: ;
1106 }
1107 }
1108 }
1109 break;
1110 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 96):
1111 {
1112 tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg loopBody;
1113 analyse__optimizer_170(c, b, (*n)._kind_6.sons->data[((NI) 0)]);
1114 nimZeroMem((void*)(&loopBody), sizeof(tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg));
1115 nestedBlock__optimizer_17(b, ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 96), (&loopBody));
1116 analyse__optimizer_170(c, (&loopBody), (*n)._kind_6.sons->data[((NI) 1)]);
1117 mergeBasicBlockInfo__optimizer_78(b, (&loopBody));
1118 }
1119 break;
1120 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 112):
1121 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 127):
1122 {
1123 tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg blockBody;
1124 nimZeroMem((void*)(&blockBody), sizeof(tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg));
1125 nestedBlock__optimizer_17(b, (*n).kind, (&blockBody));
1126 {
1127 if (!((*(*n)._kind_6.sons->data[((NI) 0)]).kind == ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 3))) goto LA99_;
1128 blockBody.label = (*(*n)._kind_6.sons->data[((NI) 0)])._kind_4.sym;
1129 }
1130 LA99_: ;
1131 analyse__optimizer_170(c, (&blockBody), (*n)._kind_6.sons->data[((NI) 1)]);
1132 mergeBasicBlockInfo__optimizer_78(b, (&blockBody));
1133 }
1134 break;
1135 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 110):
1136 {
1137 breakStmt__optimizer_43(b, (*n)._kind_6.sons->data[((NI) 0)]);
1138 }
1139 break;
1140 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 109):
1141 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 108):
1142 {
1143 {
1144 tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* child;
1145 child = NIM_NIL;
1146 {
1147 NI i_14;
1148 NI colontmp__8;
1149 NI i_15;
1150 i_14 = (NI)0;
1151 colontmp__8 = (NI)0;
1152 colontmp__8 = safeLen__ast_3191(n);
1153 i_15 = ((NI) 0);
1154 {
1155 while (1) {
1156 if (!(i_15 < colontmp__8)) goto LA106;
1157 i_14 = i_15;
1158 child = (*n)._kind_6.sons->data[i_14];
1159 analyse__optimizer_170(c, b, child);
1160 i_15 += ((NI) 1);
1161 } LA106: ;
1162 }
1163 }
1164 }
1165 returnStmt__optimizer_67(b);
1166 }
1167 break;
1168 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 107):
1169 {
1170 (*c).inFinally += ((NI) 1);
1171 {
1172 tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* child_2;
1173 child_2 = NIM_NIL;
1174 {
1175 NI i_16;
1176 NI colontmp__9;
1177 NI i_17;
1178 i_16 = (NI)0;
1179 colontmp__9 = (NI)0;
1180 colontmp__9 = safeLen__ast_3191(n);
1181 i_17 = ((NI) 0);
1182 {
1183 while (1) {
1184 if (!(i_17 < colontmp__9)) goto LA111;
1185 i_16 = i_17;
1186 child_2 = (*n)._kind_6.sons->data[i_16];
1187 analyse__optimizer_170(c, b, child_2);
1188 i_17 += ((NI) 1);
1189 } LA111: ;
1190 }
1191 }
1192 }
1193 (*c).inFinally -= ((NI) 1);
1194 }
1195 break;
1196 default:
1197 {
1198 {
1199 tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* child_3;
1200 child_3 = NIM_NIL;
1201 {
1202 NI i_18;
1203 NI colontmp__10;
1204 NI i_19;
1205 i_18 = (NI)0;
1206 colontmp__10 = (NI)0;
1207 colontmp__10 = safeLen__ast_3191(n);
1208 i_19 = ((NI) 0);
1209 {
1210 while (1) {
1211 if (!(i_19 < colontmp__10)) goto LA116;
1212 i_18 = i_19;
1213 child_3 = (*n)._kind_6.sons->data[i_18];
1214 analyse__optimizer_170(c, b, child_3);
1215 i_19 += ((NI) 1);
1216 } LA116: ;
1217 }
1218 }
1219 }
1220 }
1221 break;
1222 }
1223 }
N_NIMCALL(void,opt__optimizer_350)1224 N_LIB_PRIVATE N_NIMCALL(void, opt__optimizer_350)(tyObject_Con__QbIMFB4loKCf0ZFA2SwcWQ c, tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* n, tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* parent, NI parentPos) {
1225 switch ((*n).kind) {
1226 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 26) ... ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 32):
1227 {
1228 {
1229 if (!(((*n).flags &((NU32)1<<((NU)(((tyEnum_TNodeFlag__jyh9acXHkhZANSSvPIY7ZLg) 0))&31U)))!=0)) goto LA4_;
1230 asgnRef((void**) (&(*parent)._kind_6.sons->data[parentPos]), newNodeI__ast_3356(((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 1), (*n).info));
1231 }
1232 goto LA2_;
1233 LA4_: ;
1234 {
1235 tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* xX60gensym39_;
1236 xX60gensym39_ = shallowCopy__ast_4413(n);
1237 {
1238 NI iX60gensym39_;
1239 NI colontmp_;
1240 NI i;
1241 iX60gensym39_ = (NI)0;
1242 colontmp_ = (NI)0;
1243 colontmp_ = len__ast_3198(n);
1244 i = ((NI) 0);
1245 {
1246 while (1) {
1247 if (!(i < colontmp_)) goto LA9;
1248 iX60gensym39_ = i;
1249 opt__optimizer_350(c, (*n)._kind_6.sons->data[iX60gensym39_], xX60gensym39_, iX60gensym39_);
1250 i += ((NI) 1);
1251 } LA9: ;
1252 }
1253 }
1254 asgnRef((void**) (&(*parent)._kind_6.sons->data[parentPos]), xX60gensym39_);
1255 }
1256 LA2_: ;
1257 }
1258 break;
1259 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 0) ... ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 23):
1260 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 98):
1261 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 79):
1262 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 81):
1263 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 80):
1264 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 84):
1265 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 82):
1266 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 83):
1267 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 51):
1268 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 52):
1269 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 159):
1270 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 101):
1271 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 102):
1272 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 121):
1273 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 116):
1274 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 118):
1275 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 90):
1276 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 125):
1277 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 158):
1278 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 132):
1279 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 123):
1280 case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 122):
1281 {
1282 asgnRef((void**) (&(*parent)._kind_6.sons->data[parentPos]), n);
1283 }
1284 break;
1285 default:
1286 {
1287 tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* xX60gensym43_;
1288 xX60gensym43_ = shallowCopy__ast_4413(n);
1289 {
1290 NI iX60gensym43_;
1291 NI colontmp__2;
1292 NI i_2;
1293 iX60gensym43_ = (NI)0;
1294 colontmp__2 = (NI)0;
1295 colontmp__2 = len__ast_3198(n);
1296 i_2 = ((NI) 0);
1297 {
1298 while (1) {
1299 if (!(i_2 < colontmp__2)) goto LA14;
1300 iX60gensym43_ = i_2;
1301 opt__optimizer_350(c, (*n)._kind_6.sons->data[iX60gensym43_], xX60gensym43_, iX60gensym43_);
1302 i_2 += ((NI) 1);
1303 } LA14: ;
1304 }
1305 }
1306 asgnRef((void**) (&(*parent)._kind_6.sons->data[parentPos]), xX60gensym43_);
1307 }
1308 break;
1309 }
1310 }
N_NIMCALL(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw *,optimize__optimizer_390)1311 N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw*, optimize__optimizer_390)(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* n) {
1312 tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* result;
1313 tyObject_Con__QbIMFB4loKCf0ZFA2SwcWQ c;
1314 tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg b;
1315 result = NIM_NIL;
1316 nimZeroMem((void*)(&c), sizeof(tyObject_Con__QbIMFB4loKCf0ZFA2SwcWQ));
1317 nimZeroMem((void*)(&b), sizeof(tyObject_BasicBlock__BqJRpBqlD9bKSJMY28pMcmg));
1318 analyse__optimizer_170((&c), (&b), n);
1319 {
1320 if (!c.somethingTodo) goto LA3_;
1321 result = shallowCopy__ast_4413(n);
1322 {
1323 NI i;
1324 NI colontmp_;
1325 NI i_2;
1326 i = (NI)0;
1327 colontmp_ = (NI)0;
1328 colontmp_ = safeLen__ast_3191(n);
1329 i_2 = ((NI) 0);
1330 {
1331 while (1) {
1332 if (!(i_2 < colontmp_)) goto LA7;
1333 i = i_2;
1334 opt__optimizer_350(c, (*n)._kind_6.sons->data[i], result, i);
1335 i_2 += ((NI) 1);
1336 } LA7: ;
1337 }
1338 }
1339 }
1340 goto LA1_;
1341 LA3_: ;
1342 {
1343 result = n;
1344 }
1345 LA1_: ;
1346 return result;
1347 }
1348