1 /* Generated by Nim Compiler v1.6.2 */
2 #define NIM_INTBITS 64
3
4 #include "nimbase.h"
5 #include <string.h>
6 #include <setjmp.h>
7 #include <stdio.h>
8 #undef LANGUAGE_C
9 #undef MIPSEB
10 #undef MIPSEL
11 #undef PPC
12 #undef R3000
13 #undef R4000
14 #undef i386
15 #undef linux
16 #undef mips
17 #undef near
18 #undef far
19 #undef powerpc
20 #undef unix
21 #define nimfr_(x, y)
22 #define nimln_(x, y)
23 typedef struct NimStringDesc NimStringDesc;
24 typedef struct TGenericSeq TGenericSeq;
25 typedef struct tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q;
26 typedef struct tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg;
27 typedef struct tySequence__MlAD6nAPq9bHKla9cWiIZP0g tySequence__MlAD6nAPq9bHKla9cWiIZP0g;
28 typedef struct tySequence__oLpBKXzW3hF9aCVMo5EymfQ tySequence__oLpBKXzW3hF9aCVMo5EymfQ;
29 typedef struct tyTuple__awOivLjlO76sGdHY7nQUjQ tyTuple__awOivLjlO76sGdHY7nQUjQ;
30 typedef struct TNimType TNimType;
31 typedef struct TNimNode TNimNode;
32 typedef struct tyObject_KeyError__t7nhKLvXTQS9cS8ByJU9bIag tyObject_KeyError__t7nhKLvXTQS9cS8ByJU9bIag;
33 typedef struct tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw;
34 typedef struct tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA;
35 typedef struct Exception Exception;
36 typedef struct RootObj RootObj;
37 typedef struct tySequence__uB9b75OUPRENsBAu4AnoePA tySequence__uB9b75OUPRENsBAu4AnoePA;
38 typedef struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g;
39 typedef struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w;
40 typedef struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ;
41 typedef struct tyObject_GcStack__7fytPA5bBsob6See21YMRA tyObject_GcStack__7fytPA5bBsob6See21YMRA;
42 typedef struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg;
43 typedef struct tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ;
44 typedef struct tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg;
45 typedef struct tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw;
46 typedef struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA;
47 typedef struct tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw;
48 typedef struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw;
49 typedef struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg;
50 typedef struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg tyTuple__ujsjpB2O9cjj3uDHsXbnSzg;
51 typedef struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg;
52 typedef struct tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ;
53 typedef struct tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg;
54 typedef struct tyObject_JsonKindError__GezlryuJLt9aOJ0RpuN6G8g tyObject_JsonKindError__GezlryuJLt9aOJ0RpuN6G8g;
55 typedef struct tyObject_FileStreamObj__9bEVSsOIpkY9cf5lCtaS39bPQ tyObject_FileStreamObj__9bEVSsOIpkY9cf5lCtaS39bPQ;
56 typedef struct tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw;
57 typedef struct tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ;
58 typedef struct tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ;
59 typedef struct tyObject_BaseLexer__MAw8rJZtJ279bVV3TWMtXSg tyObject_BaseLexer__MAw8rJZtJ279bVV3TWMtXSg;
60 typedef struct tySequence__Ih0V9cYug0VPJyBBGvgEH7Q tySequence__Ih0V9cYug0VPJyBBGvgEH7Q;
61 typedef struct TSafePoint TSafePoint;
62 typedef struct tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA;
63 typedef struct tyTuple__jq7X5k7hWG0tdTZTDkiyGQ tyTuple__jq7X5k7hWG0tdTZTDkiyGQ;
64 typedef struct tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA;
65 struct TGenericSeq {
66 NI len;
67 NI reserved;
68 };
69 struct NimStringDesc {
70 TGenericSeq Sup;
71 NIM_CHAR data[SEQ_DECL_SIZE];
72 };
73 typedef NU8 tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg;
74 struct tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg {
75 tySequence__MlAD6nAPq9bHKla9cWiIZP0g* data;
76 NI counter;
77 NI first;
78 NI last;
79 };
80 struct tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q {
81 NIM_BOOL isUnquoted;
82 tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg kind;
83 union{
84 struct {NimStringDesc* str;
85 } _kind_1;
86 struct {NI64 num;
87 } _kind_2;
88 struct {NF fnum;
89 } _kind_3;
90 struct {NIM_BOOL bval;
91 } _kind_4;
92 struct {tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg fields;
93 } _kind_6;
94 struct {tySequence__oLpBKXzW3hF9aCVMo5EymfQ* elems;
95 } _kind_7;
96 };
97 };
98 struct tyTuple__awOivLjlO76sGdHY7nQUjQ {
99 NI Field0;
100 NI Field1;
101 NimStringDesc* Field2;
102 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* Field3;
103 };
104 typedef NU8 tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A;
105 typedef NU8 tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ;
106 typedef N_NIMCALL_PTR(void, tyProc__ojoeKfW4VYIm36I9cpDTQIg) (void* p, NI op);
107 typedef N_NIMCALL_PTR(void*, tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ) (void* p);
108 struct TNimType {
109 NI size;
110 NI align;
111 tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A kind;
112 tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ flags;
113 TNimType* base;
114 TNimNode* node;
115 void* finalizer;
116 tyProc__ojoeKfW4VYIm36I9cpDTQIg marker;
117 tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ deepcopy;
118 };
119 struct RootObj {
120 TNimType* m_type;
121 };
122 struct Exception {
123 RootObj Sup;
124 Exception* parent;
125 NCSTRING name;
126 NimStringDesc* message;
127 tySequence__uB9b75OUPRENsBAu4AnoePA* trace;
128 Exception* up;
129 };
130 struct tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA {
131 Exception Sup;
132 };
133 struct tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw {
134 tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA Sup;
135 };
136 struct tyObject_KeyError__t7nhKLvXTQS9cS8ByJU9bIag {
137 tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw Sup;
138 };
139 typedef NU8 tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ;
140 struct TNimNode {
141 tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ kind;
142 NI offset;
143 TNimType* typ;
144 NCSTRING name;
145 NI len;
146 TNimNode** sons;
147 };
148 struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g {
149 NI refcount;
150 TNimType* typ;
151 };
152 struct tyObject_GcStack__7fytPA5bBsob6See21YMRA {
153 void* bottom;
154 };
155 struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w {
156 NI len;
157 NI cap;
158 tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g** d;
159 };
160 typedef tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ* tyArray__SPr7N6UKfuF549bNPiUvSRw[256];
161 typedef NU32 tyArray__BHbOSqU1t9b3Gt7K2c6fQig[24];
162 typedef tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* tyArray__N1u1nqOgmuJN9cSZrnMHgOQ[32];
163 typedef tyArray__N1u1nqOgmuJN9cSZrnMHgOQ tyArray__B6durA4ZCi1xjJvRtyYxMg[24];
164 typedef tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw* tyArray__lh2A89ahMmYg9bCmpVaplLbA[256];
165 struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA {
166 tyArray__lh2A89ahMmYg9bCmpVaplLbA data;
167 };
168 typedef tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* tyArray__0aOLqZchNi8nWtMTi8ND8w[2];
169 struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw {
170 tyArray__0aOLqZchNi8nWtMTi8ND8w link;
171 NI key;
172 NI upperBound;
173 NI level;
174 };
175 struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg {
176 tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* Field0;
177 NI Field1;
178 };
179 typedef tyTuple__ujsjpB2O9cjj3uDHsXbnSzg tyArray__LzOv2eCDGiceMKQstCLmhw[30];
180 struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg {
181 NI len;
182 tyArray__LzOv2eCDGiceMKQstCLmhw chunks;
183 tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg* next;
184 };
185 struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg {
186 NI minLargeObj;
187 NI maxLargeObj;
188 tyArray__SPr7N6UKfuF549bNPiUvSRw freeSmallChunks;
189 NU32 flBitmap;
190 tyArray__BHbOSqU1t9b3Gt7K2c6fQig slBitmap;
191 tyArray__B6durA4ZCi1xjJvRtyYxMg matrix;
192 tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw* llmem;
193 NI currMem;
194 NI maxMem;
195 NI freeMem;
196 NI occ;
197 NI lastSize;
198 tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA chunkStarts;
199 tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* root;
200 tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* deleted;
201 tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* last;
202 tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* freeAvlNodes;
203 NIM_BOOL locked;
204 NIM_BOOL blockChunkSizeIncrease;
205 NI nextChunkSize;
206 tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw bottomData;
207 tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg heapLinks;
208 };
209 struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg {
210 NI stackScans;
211 NI cycleCollections;
212 NI maxThreshold;
213 NI maxStackSize;
214 NI maxStackCells;
215 NI cycleTableSize;
216 NI64 maxPause;
217 };
218 struct tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ {
219 NI counter;
220 NI max;
221 tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg* head;
222 tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg** data;
223 };
224 struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ {
225 tyObject_GcStack__7fytPA5bBsob6See21YMRA stack;
226 NI cycleThreshold;
227 NI zctThreshold;
228 tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w zct;
229 tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w decStack;
230 tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tempStack;
231 NI recGcLock;
232 tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg region;
233 tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg stat;
234 tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ marked;
235 tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w additionalRoots;
236 NI gcThreadId;
237 };
238 typedef NimStringDesc* tyArray__24KAM9afIUgUaqBaEBB6r9bg[3];
239 typedef NU8 tySet_tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg;
240 struct tyObject_JsonKindError__GezlryuJLt9aOJ0RpuN6G8g {
241 tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw Sup;
242 };
243 typedef NU8 tyEnum_FileMode__ZJfK20XeZ9bv2j1pZjw9aswg;
244 struct tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw {
245 tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA Sup;
246 };
247 typedef NU8 tySet_tyChar__nmiMWKVIe46vacnhAFrQvw[32];
248 struct tyObject_BaseLexer__MAw8rJZtJ279bVV3TWMtXSg {
249 RootObj Sup;
250 NI bufpos;
251 NimStringDesc* buf;
252 tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* input;
253 NI lineNumber;
254 NI sentinel;
255 NI lineStart;
256 NI offsetBase;
257 tySet_tyChar__nmiMWKVIe46vacnhAFrQvw refillChars;
258 };
259 typedef NU8 tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw;
260 typedef NU8 tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA;
261 typedef NU8 tyEnum_JsonError__G9cw5MrJXJrcpID5JXaplew;
262 struct tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ {
263 tyObject_BaseLexer__MAw8rJZtJ279bVV3TWMtXSg Sup;
264 NimStringDesc* a;
265 tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw tok;
266 tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA kind;
267 tyEnum_JsonError__G9cw5MrJXJrcpID5JXaplew err;
268 tySequence__Ih0V9cYug0VPJyBBGvgEH7Q* state;
269 NimStringDesc* filename;
270 NIM_BOOL rawStringLiterals;
271 };
272 struct TSafePoint {
273 TSafePoint* prev;
274 NI status;
275 jmp_buf context;
276 };
277 typedef N_NIMCALL_PTR(void, tyProc__JQrsH08b4uPTH9cyFPlVOZg) (tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* s);
278 typedef N_NIMCALL_PTR(NIM_BOOL, tyProc__9bmhFrLahRsL2hltfRDVtlQ) (tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* s);
279 typedef N_NIMCALL_PTR(void, tyProc__3svSoGIUJIsHkaBL7q4DAQ) (tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* s, NI pos);
280 typedef N_NIMCALL_PTR(NI, tyProc__xflqkf2D1uVClg70czEDHA) (tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* s);
281 typedef N_NIMCALL_PTR(NI, tyProc__c9c0f59ak4YGQ6neEym8LPKw) (tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* s, NimStringDesc** buffer, tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA slice);
282 typedef N_NIMCALL_PTR(NIM_BOOL, tyProc__7jFfqMk9ajToCz6Hv9atCA4A) (tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* s, NimStringDesc** line);
283 typedef N_NIMCALL_PTR(NI, tyProc__2VVzVL9bOnKhj1eZKkf9cEuA) (tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* s, void* buffer, NI bufLen);
284 typedef N_NIMCALL_PTR(void, tyProc__ki6p1QyfOkJLQJ9aw5NI0AQ) (tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* s, void* buffer, NI bufLen);
285 struct tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ {
286 RootObj Sup;
287 tyProc__JQrsH08b4uPTH9cyFPlVOZg closeImpl;
288 tyProc__9bmhFrLahRsL2hltfRDVtlQ atEndImpl;
289 tyProc__3svSoGIUJIsHkaBL7q4DAQ setPositionImpl;
290 tyProc__xflqkf2D1uVClg70czEDHA getPositionImpl;
291 tyProc__c9c0f59ak4YGQ6neEym8LPKw readDataStrImpl;
292 tyProc__7jFfqMk9ajToCz6Hv9atCA4A readLineImpl;
293 tyProc__2VVzVL9bOnKhj1eZKkf9cEuA readDataImpl;
294 tyProc__2VVzVL9bOnKhj1eZKkf9cEuA peekDataImpl;
295 tyProc__ki6p1QyfOkJLQJ9aw5NI0AQ writeDataImpl;
296 tyProc__JQrsH08b4uPTH9cyFPlVOZg flushImpl;
297 };
298 struct tyObject_FileStreamObj__9bEVSsOIpkY9cf5lCtaS39bPQ {
299 tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ Sup;
300 FILE* f;
301 };
302 struct tyTuple__jq7X5k7hWG0tdTZTDkiyGQ {
303 NimStringDesc* Field0;
304 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* Field1;
305 };
306 struct tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA {
307 NCSTRING procname;
308 NI line;
309 NCSTRING filename;
310 };
311 typedef NU8 tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ;
312 struct tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA {
313 NI a;
314 NI b;
315 };
316 struct tySequence__oLpBKXzW3hF9aCVMo5EymfQ {
317 TGenericSeq Sup;
318 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* data[SEQ_DECL_SIZE];
319 };
320 struct tySequence__MlAD6nAPq9bHKla9cWiIZP0g {
321 TGenericSeq Sup;
322 tyTuple__awOivLjlO76sGdHY7nQUjQ data[SEQ_DECL_SIZE];
323 };
324 struct tySequence__uB9b75OUPRENsBAu4AnoePA {
325 TGenericSeq Sup;
326 tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA data[SEQ_DECL_SIZE];
327 };
328 struct tySequence__Ih0V9cYug0VPJyBBGvgEH7Q {
329 TGenericSeq Sup;
330 tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ data[SEQ_DECL_SIZE];
331 };
332 N_NIMCALL(NimStringDesc*, rawNewString)(NI cap);
333 N_LIB_PRIVATE N_NIMCALL(void, escapeJson__pureZjson_4352)(NimStringDesc* s, NimStringDesc** result);
334 static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
335 static N_INLINE(void, copyMem__system_1727)(void* dest, void* source, NI size);
336 static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size);
337 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
338 N_LIB_PRIVATE N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
339 N_LIB_PRIVATE N_NIMCALL(void, escapeJsonUnquoted__pureZjson_4331)(NimStringDesc* s, NimStringDesc** result);
340 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, dollar___systemZdollars_3)(NI x);
341 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, toHex__pureZstrutils_1792)(NI x, NI len);
342 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
343 static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
344 static N_INLINE(NIM_BOOL, equalMem__system_1735)(void* a, void* b, NI size);
345 static N_INLINE(int, nimCmpMem)(void* a, void* b, NI size);
346 N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, eqeq___pureZjson_2061)(tySequence__oLpBKXzW3hF9aCVMo5EymfQ* x, tySequence__oLpBKXzW3hF9aCVMo5EymfQ* y);
347 static N_INLINE(void*, seqToPtr__pureZjson_2077)(tySequence__oLpBKXzW3hF9aCVMo5EymfQ* x);
348 N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, eqeq___pureZjson_2044)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* a, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* b);
349 static N_INLINE(NI, len__pureZjson_2142)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* t);
350 static N_INLINE(void, nimZeroMem)(void* p, NI size);
351 static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size);
352 static N_INLINE(NIM_BOOL, isFilled__pureZcollectionsZtables_31)(NI hcode);
353 N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, hasKey__pureZjson_2564)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* t, NimStringDesc* key);
354 N_LIB_PRIVATE N_NIMCALL(NI, rawGet__pureZjson_356)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* t, NimStringDesc* key, NI* hc);
355 N_LIB_PRIVATE N_NIMCALL(NI, hash__pureZhashes_291)(NimStringDesc* x);
356 static N_INLINE(NI, nextTry__pureZcollectionsZtables_34)(NI h, NI maxHash);
357 N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q**, X5BX5D___pureZjson_2638)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* t, NimStringDesc* key);
358 static N_INLINE(NI, rawGet__pureZjson_2645)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* t, NimStringDesc* key, NI* hc);
359 N_LIB_PRIVATE N_NOINLINE(void, raiseKeyError__msgs_300)(NimStringDesc* key) __attribute__((noreturn));
360 N_LIB_PRIVATE N_NIMCALL(NI, len__pureZjson_2989)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* n);
361 N_LIB_PRIVATE N_NIMCALL(void, toUgly__pureZjson_4362)(NimStringDesc** result, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* node);
362 N_LIB_PRIVATE N_NIMCALL(void, addInt__stdZprivateZdigitsutils_167)(NimStringDesc** result, NI64 x);
363 static N_INLINE(void, addFloat__system_3122)(NimStringDesc** result, NF x);
364 N_LIB_PRIVATE N_NIMCALL(void, addFloatRoundtrip__system_3127)(NimStringDesc** result, NF x);
365 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
366 N_LIB_PRIVATE N_NOINLINE(void*, newObj)(TNimType* typ, NI size);
367 static N_INLINE(void, asgnRef)(void** dest, void* src);
368 static N_INLINE(void, incRef__system_5309)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
369 static N_INLINE(NI, pluspercent___system_696)(NI x, NI y);
370 static N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell__system_5271)(void* usr);
371 static N_INLINE(NI, minuspercent___system_716)(NI x, NI y);
372 static N_INLINE(void, decRef__system_5316)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
373 static N_INLINE(NIM_BOOL, ltpercent___system_1005)(NI x, NI y);
374 static N_INLINE(void, rtlAddZCT__system_5314)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
375 N_LIB_PRIVATE N_NOINLINE(void, addZCT__system_5265)(tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w* s, tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
376 N_LIB_PRIVATE N_NIMCALL(void, raiseExceptionEx)(Exception* e, NCSTRING ename, NCSTRING procname, NCSTRING filename, NI line);
377 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuFormatOpenArray)(NimStringDesc* formatstr, NimStringDesc** a, NI aLen_0);
378 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, dollar___pureZjson_5339)(tySet_tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg x);
379 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, collectionToString__pureZjson_5343)(tySet_tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg x, NimStringDesc* prefix, NimStringDesc* separator, NimStringDesc* suffix);
380 N_LIB_PRIVATE N_NIMCALL(void, addQuoted__pureZjson_5375)(NimStringDesc** s, tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg x);
381 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, reprEnum)(NI e, TNimType* typ);
382 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
383 static N_INLINE(void, nimGCunrefNoCycle)(void* p);
384 N_LIB_PRIVATE N_NIMCALL(void, genericSeqAssign)(void* dest, void* src, TNimType* mt);
385 N_LIB_PRIVATE N_NIMCALL(void, nimGCvisit)(void* d, NI op);
386 static N_NIMCALL(void, Marker_tySequence__MlAD6nAPq9bHKla9cWiIZP0g)(void* p, NI op);
387 static N_NIMCALL(void, Marker_tyRef__zfzzuQ8txrdZAYK0WGWpHg)(void* p, NI op);
388 static N_NIMCALL(void, Marker_tySequence__oLpBKXzW3hF9aCVMo5EymfQ)(void* p, NI op);
389 N_LIB_PRIVATE N_NIMCALL(tyObject_FileStreamObj__9bEVSsOIpkY9cf5lCtaS39bPQ*, newFileStream__pureZstreams_832)(NimStringDesc* filename, tyEnum_FileMode__ZJfK20XeZ9bv2j1pZjw9aswg mode, NI bufSize);
390 N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, parseJson__pureZjson_5216)(tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* s, NimStringDesc* filename, NIM_BOOL rawIntegers, NIM_BOOL rawFloats);
391 N_LIB_PRIVATE N_NIMCALL(void, open__pureZparsejson_97)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my, tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* input, NimStringDesc* filename, NIM_BOOL rawStringLiterals);
392 static N_INLINE(void, pushSafePoint)(TSafePoint* s);
393 N_LIB_PRIVATE N_NIMCALL(tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw, getTok__pureZparsejson_425)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my);
394 N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, parseJson__pureZjson_5178)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* p, NIM_BOOL rawIntegers, NIM_BOOL rawFloats, NI depth);
395 N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJStringMove__pureZjson_78)(NimStringDesc* s);
396 N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJRawNumber__pureZjson_75)(NimStringDesc* s);
397 N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJInt__pureZjson_81)(NI64 n);
398 N_LIB_PRIVATE N_NIMCALL(NI64, nsuParseBiggestInt)(NimStringDesc* s);
399 static N_INLINE(void, popSafePoint)(void);
400 N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, isObj)(TNimType* obj, TNimType* subclass);
401 static N_INLINE(Exception*, nimBorrowCurrentException)(void);
402 static N_INLINE(void, popCurrentException)(void);
403 N_LIB_PRIVATE N_NIMCALL(void, reraiseException)(void);
404 N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJFloat__pureZjson_84)(NF n);
405 N_LIB_PRIVATE N_NIMCALL(NF, nsuParseFloat)(NimStringDesc* s);
406 N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJBool__pureZjson_87)(NIM_BOOL b);
407 N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJNull__pureZjson_90)(void);
408 N_LIB_PRIVATE N_NOINLINE(void, raiseParseErr__pureZparsejson_580)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* p, NimStringDesc* msg) __attribute__((noreturn));
409 N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJObject__pureZjson_92)(void);
410 N_LIB_PRIVATE N_NIMCALL(void, initOrderedTable__pureZjson_94)(NI initialSize, tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* Result);
411 static N_INLINE(NI, slotsNeeded__pureZcollectionsZtables_42)(NI count);
412 N_LIB_PRIVATE N_NIMCALL(NI, nextPowerOfTwo__pureZmath_177)(NI x);
413 N_LIB_PRIVATE N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
414 N_LIB_PRIVATE N_NIMCALL(void, eat__pureZparsejson_602)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* p, tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw tok);
415 static N_INLINE(void, X5BX5Deq___pureZjson_1923)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* obj, NimStringDesc* key, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* val);
416 N_LIB_PRIVATE N_NIMCALL(void, X5BX5Deq___pureZjson_287)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* t, NimStringDesc* key, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* val);
417 static N_INLINE(NIM_BOOL, mustRehash__pureZjson_692)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* t);
418 N_LIB_PRIVATE N_NIMCALL(void, enlarge__pureZjson_853)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* t);
419 N_LIB_PRIVATE N_NIMCALL(void, rawInsert__pureZjson_1264)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* t, tySequence__MlAD6nAPq9bHKla9cWiIZP0g** data, NimStringDesc* key, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* val, NI hc, NI h);
420 N_LIB_PRIVATE N_NIMCALL(NI, rawGetKnownHC__pureZjson_1546)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* t, NimStringDesc* key, NI hc);
421 N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJArray__pureZjson_123)(void);
422 static N_INLINE(void, nimGCunrefRC1)(void* p);
423 N_LIB_PRIVATE N_NIMCALL(void, add__pureZjson_222)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* father, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* child);
424 N_LIB_PRIVATE N_NIMCALL(TGenericSeq*, incrSeqV3)(TGenericSeq* s, TNimType* typ);
425 static N_INLINE(void, close__pureZparsejson_151)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my);
426 N_LIB_PRIVATE N_NIMCALL(void, close__pureZlexbase_14)(tyObject_BaseLexer__MAw8rJZtJ279bVV3TWMtXSg* L);
427 N_LIB_PRIVATE N_NIMCALL(void, nimLeaveFinally)(void);
428 N_LIB_PRIVATE N_NIMCALL(void, toPretty__pureZjson_4380)(NimStringDesc** result, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* node, NI indent, NIM_BOOL ml, NIM_BOOL lstArr, NI currIndent);
429 N_LIB_PRIVATE N_NIMCALL(void, indent__pureZjson_4320)(NimStringDesc** s, NI i);
430 static N_INLINE(NimStringDesc*, spaces__pureZstrutils_1029)(NI n);
431 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuRepeatChar)(NIM_CHAR c, NI count);
432 N_LIB_PRIVATE N_NIMCALL(void, nl__pureZjson_4328)(NimStringDesc** s, NIM_BOOL ml);
433 N_LIB_PRIVATE N_NIMCALL(NI, newIndent__pureZjson_4323)(NI curr, NI indent, NIM_BOOL ml);
434 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_2, "\"", 1);
435 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_3, "\\n", 2);
436 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_4, "\\b", 2);
437 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_5, "\\f", 2);
438 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_6, "\\t", 2);
439 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_7, "\\u000b", 6);
440 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_8, "\\r", 2);
441 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_9, "\\\"", 2);
442 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_10, "\\u000", 5);
443 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_11, "\\u00", 4);
444 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_12, "\\\\", 2);
445 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_13, "[", 1);
446 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_14, ",", 1);
447 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_15, "]", 1);
448 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_16, "{", 1);
449 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_17, ":", 1);
450 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_18, "}", 1);
451 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_19, "true", 4);
452 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_20, "false", 5);
453 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_21, "null", 4);
454 N_LIB_PRIVATE TNimType NTIjsonnodekind__RUngo7nCHe6O8aBGIcrhtg_;
455 extern TNimType NTIrefkeyerror__8SzoIAgLw9ci2v0yafHj9b6Q_;
456 extern TNimType NTIkeyerror__t7nhKLvXTQS9cS8ByJU9bIag_;
457 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_25, "key not found: ", 15);
458 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_26, "Incorrect JSON kind. Wanted \'$1\' in \'$2\' but got \'$3\'.", 54);
459 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_27, ", ", 2);
460 extern TNimType NTIrefjsonkinderror__tn3kJ9cInprO2X2FSPir4WQ_;
461 extern TNimType NTIjsonkinderror__GezlryuJLt9aOJ0RpuN6G8g_;
462 N_LIB_PRIVATE TNimType NTIjsonnodeobj__df9bshXB7C9cTiWPIOtX3j1Q_;
463 extern TNimType NTIbool__VaVACK0bpYmqIQ0mKcHfQQ_;
464 TNimNode* NimDT___df9bshXB7C9cTiWPIOtX3j1Q_kind[8];
465 extern TNimType NTIstring__77mFvmsOLKik79ci2hXkHEg_;
466 extern TNimType NTIbiggestint__Aav8dQoMlCFnZRxA0IhTHQ_;
467 extern TNimType NTIfloat__w9bl9a1ul9ctRJWiMl9cNnIMvg_;
468 N_LIB_PRIVATE TNimType NTIorderedtable__ZZvSdVkA2s2sIyifu4cpkg_;
469 N_LIB_PRIVATE TNimType NTIorderedkeyvaluepair__awOivLjlO76sGdHY7nQUjQ_;
470 extern TNimType NTIint__rR5Bzr1D5krxoo1NcNyeMA_;
471 N_LIB_PRIVATE TNimType NTIorderedkeyvaluepairseq__MlAD6nAPq9bHKla9cWiIZP0g_;
472 N_LIB_PRIVATE TNimType NTIjsonnode__zfzzuQ8txrdZAYK0WGWpHg_;
473 N_LIB_PRIVATE TNimType NTIseqLjsonnodeT__oLpBKXzW3hF9aCVMo5EymfQ_;
474 extern TNimType NTIrefioerror__HMIVdYjdZYWskTmTQVo5BQ_;
475 extern TNimType NTIioerror__iLZrPn9anoh9ad1MmO0RczFw_;
476 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_31, "cannot read from file: ", 23);
477 extern TNimType NTIjsonparser__KWIQnzXEOUqdWsnCUL9atyQ_;
478 extern TNimType NTIvalueerror__yoNlBGx0D2tRizIdhQuENw_;
479 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_35, "string literal as key", 21);
480 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_36, "\012", 1);
481 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_37, " ", 1);
482 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_38, ": ", 2);
483 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_39, "{}", 2);
484 STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_40, "[]", 2);
485 extern tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ gch__system_5218;
486 extern TSafePoint* excHandler__system_2565;
487 extern TSafePoint* excHandler__system_2565;
488 extern TSafePoint* excHandler__system_2565;
489 extern TSafePoint* excHandler__system_2565;
490 extern Exception* currException__system_2566;
491 extern Exception* currException__system_2566;
492 extern Exception* currException__system_2566;
N_INLINE(void,nimCopyMem)493 static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size) {
494 void* T1_;
495 T1_ = (void*)0;
496 T1_ = memcpy(dest, source, ((size_t) (size)));
497 }
N_INLINE(void,copyMem__system_1727)498 static N_INLINE(void, copyMem__system_1727)(void* dest, void* source, NI size) {
499 nimCopyMem(dest, source, size);
500 }
N_INLINE(void,appendString)501 static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src) {
502 {
503 if (!!((src == ((NimStringDesc*) NIM_NIL)))) goto LA3_;
504 copyMem__system_1727(((void*) ((&(*dest).data[(*dest).Sup.len]))), ((void*) ((*src).data)), ((NI) ((NI)((*src).Sup.len + ((NI) 1)))));
505 (*dest).Sup.len += (*src).Sup.len;
506 }
507 LA3_: ;
508 }
N_NIMCALL(void,escapeJsonUnquoted__pureZjson_4331)509 N_LIB_PRIVATE N_NIMCALL(void, escapeJsonUnquoted__pureZjson_4331)(NimStringDesc* s, NimStringDesc** result) {
510 {
511 NIM_CHAR c;
512 NI i;
513 NI L;
514 c = (NIM_CHAR)0;
515 i = ((NI) 0);
516 L = (s ? s->Sup.len : 0);
517 {
518 while (1) {
519 if (!(i < L)) goto LA3;
520 c = s->data[i];
521 switch (((NU8)(c))) {
522 case 10:
523 {
524 unsureAsgnRef((void**) (&(*result)), resizeString((*result), 2));
525 appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_3));
526 }
527 break;
528 case 8:
529 {
530 unsureAsgnRef((void**) (&(*result)), resizeString((*result), 2));
531 appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_4));
532 }
533 break;
534 case 12:
535 {
536 unsureAsgnRef((void**) (&(*result)), resizeString((*result), 2));
537 appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_5));
538 }
539 break;
540 case 9:
541 {
542 unsureAsgnRef((void**) (&(*result)), resizeString((*result), 2));
543 appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_6));
544 }
545 break;
546 case 11:
547 {
548 unsureAsgnRef((void**) (&(*result)), resizeString((*result), 6));
549 appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_7));
550 }
551 break;
552 case 13:
553 {
554 unsureAsgnRef((void**) (&(*result)), resizeString((*result), 2));
555 appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_8));
556 }
557 break;
558 case 34:
559 {
560 unsureAsgnRef((void**) (&(*result)), resizeString((*result), 2));
561 appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_9));
562 }
563 break;
564 case 0 ... 7:
565 {
566 NimStringDesc* T12_;
567 NimStringDesc* T13_;
568 T12_ = NIM_NIL;
569 T13_ = NIM_NIL;
570 T13_ = dollar___systemZdollars_3(((NU8)(c)));
571 T12_ = rawNewString((T13_ ? T13_->Sup.len : 0) + 5);
572 appendString(T12_, ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_10));
573 appendString(T12_, T13_);
574 unsureAsgnRef((void**) (&(*result)), resizeString((*result), (T12_ ? T12_->Sup.len : 0) + 0));
575 appendString((*result), T12_);
576 }
577 break;
578 case 14 ... 31:
579 {
580 NimStringDesc* T15_;
581 NimStringDesc* T16_;
582 T15_ = NIM_NIL;
583 T16_ = NIM_NIL;
584 T16_ = toHex__pureZstrutils_1792(((NU8)(c)), ((NI) 2));
585 T15_ = rawNewString((T16_ ? T16_->Sup.len : 0) + 4);
586 appendString(T15_, ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_11));
587 appendString(T15_, T16_);
588 unsureAsgnRef((void**) (&(*result)), resizeString((*result), (T15_ ? T15_->Sup.len : 0) + 0));
589 appendString((*result), T15_);
590 }
591 break;
592 case 92:
593 {
594 unsureAsgnRef((void**) (&(*result)), resizeString((*result), 2));
595 appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_12));
596 }
597 break;
598 default:
599 {
600 unsureAsgnRef((void**) (&(*result)), addChar((*result), c));
601 }
602 break;
603 }
604 i += ((NI) 1);
605 } LA3: ;
606 }
607 }
608 }
N_NIMCALL(void,escapeJson__pureZjson_4352)609 N_LIB_PRIVATE N_NIMCALL(void, escapeJson__pureZjson_4352)(NimStringDesc* s, NimStringDesc** result) {
610 unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
611 appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_2));
612 escapeJsonUnquoted__pureZjson_4331(s, result);
613 unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
614 appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_2));
615 }
N_NIMCALL(NimStringDesc *,escapeJson__pureZjson_4355)616 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, escapeJson__pureZjson_4355)(NimStringDesc* s) {
617 NimStringDesc* result;
618 result = NIM_NIL;
619 result = rawNewString(((NI) ((NI)((s ? s->Sup.len : 0) + (NI)((NI64)((s ? s->Sup.len : 0)) >> (NU64)(((NI) 3)))))));
620 escapeJson__pureZjson_4352(s, (&result));
621 return result;
622 }
N_INLINE(int,nimCmpMem)623 static N_INLINE(int, nimCmpMem)(void* a, void* b, NI size) {
624 int result;
625 result = (int)0;
626 result = memcmp(a, b, ((size_t) (size)));
627 return result;
628 }
N_INLINE(NIM_BOOL,equalMem__system_1735)629 static N_INLINE(NIM_BOOL, equalMem__system_1735)(void* a, void* b, NI size) {
630 NIM_BOOL result;
631 int T1_;
632 result = (NIM_BOOL)0;
633 T1_ = (int)0;
634 T1_ = nimCmpMem(a, b, size);
635 result = (T1_ == ((NI32) 0));
636 return result;
637 }
N_INLINE(NIM_BOOL,eqStrings)638 static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b) {
639 NIM_BOOL result;
640 NI alen;
641 NI blen;
642 { result = (NIM_BOOL)0;
643 alen = (a ? a->Sup.len : 0);
644 blen = (b ? b->Sup.len : 0);
645 {
646 if (!(alen == blen)) goto LA3_;
647 {
648 if (!(alen == ((NI) 0))) goto LA7_;
649 result = NIM_TRUE;
650 goto BeforeRet_;
651 }
652 LA7_: ;
653 result = equalMem__system_1735(((void*) ((&a->data[((NI) 0)]))), ((void*) ((&b->data[((NI) 0)]))), ((NI) (alen)));
654 goto BeforeRet_;
655 }
656 LA3_: ;
657 }BeforeRet_: ;
658 return result;
659 }
N_INLINE(void *,seqToPtr__pureZjson_2077)660 static N_INLINE(void*, seqToPtr__pureZjson_2077)(tySequence__oLpBKXzW3hF9aCVMo5EymfQ* x) {
661 void* result;
662 result = (void*)0;
663 result = ((void*) (x));
664 return result;
665 }
N_NIMCALL(NIM_BOOL,eqeq___pureZjson_2061)666 N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, eqeq___pureZjson_2061)(tySequence__oLpBKXzW3hF9aCVMo5EymfQ* x, tySequence__oLpBKXzW3hF9aCVMo5EymfQ* y) {
667 NIM_BOOL result;
668 { result = (NIM_BOOL)0;
669 {
670 void* T3_;
671 void* T4_;
672 T3_ = (void*)0;
673 T3_ = seqToPtr__pureZjson_2077(x);
674 T4_ = (void*)0;
675 T4_ = seqToPtr__pureZjson_2077(y);
676 if (!(T3_ == T4_)) goto LA5_;
677 result = NIM_TRUE;
678 goto BeforeRet_;
679 }
680 LA5_: ;
681 {
682 NI T9_;
683 NI T10_;
684 T9_ = (x ? x->Sup.len : 0);
685 T10_ = (y ? y->Sup.len : 0);
686 if (!!((T9_ == T10_))) goto LA11_;
687 result = NIM_FALSE;
688 goto BeforeRet_;
689 }
690 LA11_: ;
691 {
692 NI i;
693 NI colontmp_;
694 NI T14_;
695 NI res;
696 i = (NI)0;
697 colontmp_ = (NI)0;
698 T14_ = (x ? x->Sup.len : 0);
699 colontmp_ = (NI)(T14_ - ((NI) 1));
700 res = ((NI) 0);
701 {
702 while (1) {
703 if (!(res <= colontmp_)) goto LA16;
704 i = res;
705 {
706 NIM_BOOL T19_;
707 T19_ = (NIM_BOOL)0;
708 T19_ = eqeq___pureZjson_2044(x->data[i], y->data[i]);
709 if (!!(T19_)) goto LA20_;
710 result = NIM_FALSE;
711 goto BeforeRet_;
712 }
713 LA20_: ;
714 res += ((NI) 1);
715 } LA16: ;
716 }
717 }
718 result = NIM_TRUE;
719 goto BeforeRet_;
720 }BeforeRet_: ;
721 return result;
722 }
N_INLINE(NI,len__pureZjson_2142)723 static N_INLINE(NI, len__pureZjson_2142)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* t) {
724 NI result;
725 result = (NI)0;
726 result = (*t).counter;
727 return result;
728 }
N_INLINE(void,nimSetMem__systemZmemory_7)729 static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size) {
730 void* T1_;
731 T1_ = (void*)0;
732 T1_ = memset(a, v, ((size_t) (size)));
733 }
N_INLINE(void,nimZeroMem)734 static N_INLINE(void, nimZeroMem)(void* p, NI size) {
735 nimSetMem__systemZmemory_7(p, ((int) 0), size);
736 }
N_INLINE(NIM_BOOL,isFilled__pureZcollectionsZtables_31)737 static N_INLINE(NIM_BOOL, isFilled__pureZcollectionsZtables_31)(NI hcode) {
738 NIM_BOOL result;
739 result = (NIM_BOOL)0;
740 result = !((hcode == ((NI) 0)));
741 return result;
742 }
N_INLINE(NI,nextTry__pureZcollectionsZtables_34)743 static N_INLINE(NI, nextTry__pureZcollectionsZtables_34)(NI h, NI maxHash) {
744 NI result;
745 result = (NI)0;
746 result = (NI)((NI)(h + ((NI) 1)) & maxHash);
747 return result;
748 }
N_NIMCALL(NI,rawGet__pureZjson_356)749 N_LIB_PRIVATE N_NIMCALL(NI, rawGet__pureZjson_356)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* t, NimStringDesc* key, NI* hc) {
750 NI result;
751 NI h;
752 NI T10_;
753 { result = (NI)0;
754 (*hc) = hash__pureZhashes_291(key);
755 {
756 if (!((*hc) == ((NI) 0))) goto LA3_;
757 (*hc) = ((NI) 314159265);
758 }
759 LA3_: ;
760 {
761 NI T7_;
762 T7_ = ((*t).data ? (*t).data->Sup.len : 0);
763 if (!(T7_ == ((NI) 0))) goto LA8_;
764 result = ((NI) -1);
765 goto BeforeRet_;
766 }
767 LA8_: ;
768 T10_ = (((*t).data ? (*t).data->Sup.len : 0)-1);
769 h = (NI)((*hc) & T10_);
770 {
771 while (1) {
772 NIM_BOOL T13_;
773 NI T20_;
774 T13_ = (NIM_BOOL)0;
775 T13_ = isFilled__pureZcollectionsZtables_31((*t).data->data[h].Field0);
776 if (!T13_) goto LA12;
777 {
778 NIM_BOOL T16_;
779 T16_ = (NIM_BOOL)0;
780 T16_ = ((*t).data->data[h].Field0 == (*hc));
781 if (!(T16_)) goto LA17_;
782 T16_ = eqStrings((*t).data->data[h].Field2, key);
783 LA17_: ;
784 if (!T16_) goto LA18_;
785 result = h;
786 goto BeforeRet_;
787 }
788 LA18_: ;
789 T20_ = (((*t).data ? (*t).data->Sup.len : 0)-1);
790 h = nextTry__pureZcollectionsZtables_34(h, T20_);
791 } LA12: ;
792 }
793 result = (NI)(((NI) -1) - h);
794 }BeforeRet_: ;
795 return result;
796 }
N_NIMCALL(NIM_BOOL,hasKey__pureZjson_2564)797 N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, hasKey__pureZjson_2564)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* t, NimStringDesc* key) {
798 NIM_BOOL result;
799 NI hc;
800 NI T1_;
801 result = (NIM_BOOL)0;
802 hc = (NI)0;
803 T1_ = (NI)0;
804 T1_ = rawGet__pureZjson_356(t, key, (&hc));
805 result = (((NI) 0) <= T1_);
806 return result;
807 }
N_INLINE(NI,rawGet__pureZjson_2645)808 static N_INLINE(NI, rawGet__pureZjson_2645)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* t, NimStringDesc* key, NI* hc) {
809 NI result;
810 NI h;
811 NI T10_;
812 { result = (NI)0;
813 (*hc) = hash__pureZhashes_291(key);
814 {
815 if (!((*hc) == ((NI) 0))) goto LA3_;
816 (*hc) = ((NI) 314159265);
817 }
818 LA3_: ;
819 {
820 NI T7_;
821 T7_ = ((*t).data ? (*t).data->Sup.len : 0);
822 if (!(T7_ == ((NI) 0))) goto LA8_;
823 result = ((NI) -1);
824 goto BeforeRet_;
825 }
826 LA8_: ;
827 T10_ = (((*t).data ? (*t).data->Sup.len : 0)-1);
828 h = (NI)((*hc) & T10_);
829 {
830 while (1) {
831 NIM_BOOL T13_;
832 NI T20_;
833 T13_ = (NIM_BOOL)0;
834 T13_ = isFilled__pureZcollectionsZtables_31((*t).data->data[h].Field0);
835 if (!T13_) goto LA12;
836 {
837 NIM_BOOL T16_;
838 T16_ = (NIM_BOOL)0;
839 T16_ = ((*t).data->data[h].Field0 == (*hc));
840 if (!(T16_)) goto LA17_;
841 T16_ = eqStrings((*t).data->data[h].Field2, key);
842 LA17_: ;
843 if (!T16_) goto LA18_;
844 result = h;
845 goto BeforeRet_;
846 }
847 LA18_: ;
848 T20_ = (((*t).data ? (*t).data->Sup.len : 0)-1);
849 h = nextTry__pureZcollectionsZtables_34(h, T20_);
850 } LA12: ;
851 }
852 result = (NI)(((NI) -1) - h);
853 }BeforeRet_: ;
854 return result;
855 }
N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q **,X5BX5D___pureZjson_2638)856 N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q**, X5BX5D___pureZjson_2638)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* t, NimStringDesc* key) {
857 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q** result;
858 NI hcX60gensym89_;
859 NI indexX60gensym89_;
860 result = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q**)0;
861 hcX60gensym89_ = (NI)0;
862 indexX60gensym89_ = rawGet__pureZjson_2645((&(*t)), key, (&hcX60gensym89_));
863 {
864 if (!(((NI) 0) <= indexX60gensym89_)) goto LA3_;
865 result = &(*t).data->data[indexX60gensym89_].Field3;
866 }
867 goto LA1_;
868 LA3_: ;
869 {
870 raiseKeyError__msgs_300(key);
871 }
872 LA1_: ;
873 return result;
874 }
N_NIMCALL(NIM_BOOL,eqeq___pureZjson_2044)875 N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, eqeq___pureZjson_2044)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* a, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* b) {
876 NIM_BOOL result;
877 { result = (NIM_BOOL)0;
878 {
879 if (!(a == 0)) goto LA3_;
880 {
881 if (!(b == 0)) goto LA7_;
882 result = NIM_TRUE;
883 goto BeforeRet_;
884 }
885 LA7_: ;
886 result = NIM_FALSE;
887 goto BeforeRet_;
888 }
889 goto LA1_;
890 LA3_: ;
891 {
892 NIM_BOOL T10_;
893 T10_ = (NIM_BOOL)0;
894 T10_ = (b == 0);
895 if (T10_) goto LA11_;
896 T10_ = !(((*a).kind == (*b).kind));
897 LA11_: ;
898 if (!T10_) goto LA12_;
899 result = NIM_FALSE;
900 goto BeforeRet_;
901 }
902 goto LA1_;
903 LA12_: ;
904 {
905 switch ((*a).kind) {
906 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 4):
907 {
908 result = eqStrings((*a)._kind_1.str, (*b)._kind_1.str);
909 }
910 break;
911 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 2):
912 {
913 result = ((*a)._kind_2.num == (*b)._kind_2.num);
914 }
915 break;
916 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 3):
917 {
918 result = ((*a)._kind_3.fnum == (*b)._kind_3.fnum);
919 }
920 break;
921 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 1):
922 {
923 result = ((*a)._kind_4.bval == (*b)._kind_4.bval);
924 }
925 break;
926 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 0):
927 {
928 result = NIM_TRUE;
929 }
930 break;
931 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 6):
932 {
933 result = eqeq___pureZjson_2061((*a)._kind_7.elems, (*b)._kind_7.elems);
934 }
935 break;
936 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 5):
937 {
938 {
939 NI T24_;
940 NI T25_;
941 T24_ = (NI)0;
942 T24_ = len__pureZjson_2142((&(*a)._kind_6.fields));
943 T25_ = (NI)0;
944 T25_ = len__pureZjson_2142((&(*b)._kind_6.fields));
945 if (!!((T24_ == T25_))) goto LA26_;
946 result = NIM_FALSE;
947 goto BeforeRet_;
948 }
949 LA26_: ;
950 {
951 NimStringDesc* key;
952 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* val;
953 tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg colontmp_;
954 NI L;
955 key = NIM_NIL;
956 val = NIM_NIL;
957 nimZeroMem((void*)(&colontmp_), sizeof(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg));
958 colontmp_.data = (*a)._kind_6.fields.data;
959 colontmp_.counter = (*a)._kind_6.fields.counter;
960 colontmp_.first = (*a)._kind_6.fields.first;
961 colontmp_.last = (*a)._kind_6.fields.last;
962 L = len__pureZjson_2142((&colontmp_));
963 {
964 NI h;
965 if (!(((NI) 0) < colontmp_.counter)) goto LA31_;
966 h = colontmp_.first;
967 {
968 while (1) {
969 NI nxt;
970 if (!(((NI) 0) <= h)) goto LA34;
971 nxt = colontmp_.data->data[h].Field1;
972 {
973 NIM_BOOL T37_;
974 T37_ = (NIM_BOOL)0;
975 T37_ = isFilled__pureZcollectionsZtables_31(colontmp_.data->data[h].Field0);
976 if (!T37_) goto LA38_;
977 key = colontmp_.data->data[h].Field2;
978 val = colontmp_.data->data[h].Field3;
979 {
980 NIM_BOOL T42_;
981 T42_ = (NIM_BOOL)0;
982 T42_ = hasKey__pureZjson_2564((&(*b)._kind_6.fields), key);
983 if (!!(T42_)) goto LA43_;
984 result = NIM_FALSE;
985 goto BeforeRet_;
986 }
987 LA43_: ;
988 {
989 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q** T47_;
990 NIM_BOOL T48_;
991 T47_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q**)0;
992 T47_ = X5BX5D___pureZjson_2638((&(*b)._kind_6.fields), key);
993 T48_ = (NIM_BOOL)0;
994 T48_ = eqeq___pureZjson_2044((*T47_), val);
995 if (!!(T48_)) goto LA49_;
996 result = NIM_FALSE;
997 goto BeforeRet_;
998 }
999 LA49_: ;
1000 }
1001 LA38_: ;
1002 h = nxt;
1003 } LA34: ;
1004 }
1005 }
1006 LA31_: ;
1007 }
1008 result = NIM_TRUE;
1009 }
1010 break;
1011 }
1012 }
1013 LA1_: ;
1014 }BeforeRet_: ;
1015 return result;
1016 }
N_NIMCALL(NI,len__pureZjson_2989)1017 N_LIB_PRIVATE N_NIMCALL(NI, len__pureZjson_2989)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* n) {
1018 NI result;
1019 result = (NI)0;
1020 switch ((*n).kind) {
1021 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 6):
1022 {
1023 NI T2_;
1024 T2_ = ((*n)._kind_7.elems ? (*n)._kind_7.elems->Sup.len : 0);
1025 result = T2_;
1026 }
1027 break;
1028 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 5):
1029 {
1030 result = len__pureZjson_2142((&(*n)._kind_6.fields));
1031 }
1032 break;
1033 default:
1034 {
1035 }
1036 break;
1037 }
1038 return result;
1039 }
N_INLINE(void,addFloat__system_3122)1040 static N_INLINE(void, addFloat__system_3122)(NimStringDesc** result, NF x) {
1041 addFloatRoundtrip__system_3127(result, x);
1042 }
N_NIMCALL(void,toUgly__pureZjson_4362)1043 N_LIB_PRIVATE N_NIMCALL(void, toUgly__pureZjson_4362)(NimStringDesc** result, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* node) {
1044 NIM_BOOL comma;
1045 comma = NIM_FALSE;
1046 switch ((*node).kind) {
1047 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 6):
1048 {
1049 unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
1050 appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_13));
1051 {
1052 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q** child;
1053 tySequence__oLpBKXzW3hF9aCVMo5EymfQ* colontmp_;
1054 NI i;
1055 NI L;
1056 NI T3_;
1057 child = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q**)0;
1058 colontmp_ = NIM_NIL;
1059 colontmp_ = (*node)._kind_7.elems;
1060 i = ((NI) 0);
1061 T3_ = (colontmp_ ? colontmp_->Sup.len : 0);
1062 L = T3_;
1063 {
1064 while (1) {
1065 if (!(i < L)) goto LA5;
1066 child = &colontmp_->data[i];
1067 {
1068 if (!comma) goto LA8_;
1069 unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
1070 appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_14));
1071 }
1072 goto LA6_;
1073 LA8_: ;
1074 {
1075 comma = NIM_TRUE;
1076 }
1077 LA6_: ;
1078 toUgly__pureZjson_4362(result, (*child));
1079 i += ((NI) 1);
1080 } LA5: ;
1081 }
1082 }
1083 unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
1084 appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_15));
1085 }
1086 break;
1087 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 5):
1088 {
1089 unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
1090 appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_16));
1091 {
1092 NimStringDesc* key;
1093 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* value;
1094 tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg colontmp__2;
1095 NI L_2;
1096 key = NIM_NIL;
1097 value = NIM_NIL;
1098 nimZeroMem((void*)(&colontmp__2), sizeof(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg));
1099 colontmp__2.data = (*node)._kind_6.fields.data;
1100 colontmp__2.counter = (*node)._kind_6.fields.counter;
1101 colontmp__2.first = (*node)._kind_6.fields.first;
1102 colontmp__2.last = (*node)._kind_6.fields.last;
1103 L_2 = len__pureZjson_2142((&colontmp__2));
1104 {
1105 NI h;
1106 if (!(((NI) 0) < colontmp__2.counter)) goto LA15_;
1107 h = colontmp__2.first;
1108 {
1109 while (1) {
1110 NI nxt;
1111 if (!(((NI) 0) <= h)) goto LA18;
1112 nxt = colontmp__2.data->data[h].Field1;
1113 {
1114 NIM_BOOL T21_;
1115 T21_ = (NIM_BOOL)0;
1116 T21_ = isFilled__pureZcollectionsZtables_31(colontmp__2.data->data[h].Field0);
1117 if (!T21_) goto LA22_;
1118 key = colontmp__2.data->data[h].Field2;
1119 value = colontmp__2.data->data[h].Field3;
1120 {
1121 if (!comma) goto LA26_;
1122 unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
1123 appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_14));
1124 }
1125 goto LA24_;
1126 LA26_: ;
1127 {
1128 comma = NIM_TRUE;
1129 }
1130 LA24_: ;
1131 escapeJson__pureZjson_4352(key, result);
1132 unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
1133 appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_17));
1134 toUgly__pureZjson_4362(result, value);
1135 }
1136 LA22_: ;
1137 h = nxt;
1138 } LA18: ;
1139 }
1140 }
1141 LA15_: ;
1142 }
1143 unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
1144 appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_18));
1145 }
1146 break;
1147 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 4):
1148 {
1149 {
1150 if (!(*node).isUnquoted) goto LA32_;
1151 unsureAsgnRef((void**) (&(*result)), resizeString((*result), ((*node)._kind_1.str ? (*node)._kind_1.str->Sup.len : 0) + 0));
1152 appendString((*result), (*node)._kind_1.str);
1153 }
1154 goto LA30_;
1155 LA32_: ;
1156 {
1157 escapeJson__pureZjson_4352((*node)._kind_1.str, result);
1158 }
1159 LA30_: ;
1160 }
1161 break;
1162 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 2):
1163 {
1164 addInt__stdZprivateZdigitsutils_167(result, (*node)._kind_2.num);
1165 }
1166 break;
1167 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 3):
1168 {
1169 addFloat__system_3122(result, (*node)._kind_3.fnum);
1170 }
1171 break;
1172 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 1):
1173 {
1174 NimStringDesc* T38_;
1175 T38_ = NIM_NIL;
1176 {
1177 if (!(*node)._kind_4.bval) goto LA41_;
1178 T38_ = copyString(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_19));
1179 }
1180 goto LA39_;
1181 LA41_: ;
1182 {
1183 T38_ = copyString(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_20));
1184 }
1185 LA39_: ;
1186 unsureAsgnRef((void**) (&(*result)), resizeString((*result), (T38_ ? T38_->Sup.len : 0) + 0));
1187 appendString((*result), T38_);
1188 }
1189 break;
1190 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 0):
1191 {
1192 unsureAsgnRef((void**) (&(*result)), resizeString((*result), 4));
1193 appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_21));
1194 }
1195 break;
1196 }
1197 }
N_NIMCALL(NimStringDesc *,dollar___pureZjson_4465)1198 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, dollar___pureZjson_4465)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* node) {
1199 NimStringDesc* result;
1200 NI T1_;
1201 result = NIM_NIL;
1202 T1_ = (NI)0;
1203 T1_ = len__pureZjson_2989(node);
1204 result = rawNewString(((NI) ((NI)((NU64)(T1_) << (NU64)(((NI) 1))))));
1205 toUgly__pureZjson_4362((&result), node);
1206 return result;
1207 }
N_NIMCALL(NIM_BOOL,hasKey__pureZjson_3152)1208 N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, hasKey__pureZjson_3152)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* node, NimStringDesc* key) {
1209 NIM_BOOL result;
1210 result = (NIM_BOOL)0;
1211 result = hasKey__pureZjson_2564((&(*node)._kind_6.fields), key);
1212 return result;
1213 }
N_INLINE(NI,pluspercent___system_696)1214 static N_INLINE(NI, pluspercent___system_696)(NI x, NI y) {
1215 NI result;
1216 result = (NI)0;
1217 result = ((NI) ((NU)((NU64)(((NU) (x))) + (NU64)(((NU) (y))))));
1218 return result;
1219 }
N_INLINE(void,incRef__system_5309)1220 static N_INLINE(void, incRef__system_5309)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
1221 (*c).refcount = pluspercent___system_696((*c).refcount, ((NI) 8));
1222 }
N_INLINE(NI,minuspercent___system_716)1223 static N_INLINE(NI, minuspercent___system_716)(NI x, NI y) {
1224 NI result;
1225 result = (NI)0;
1226 result = ((NI) ((NU)((NU64)(((NU) (x))) - (NU64)(((NU) (y))))));
1227 return result;
1228 }
N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g *,usrToCell__system_5271)1229 static N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell__system_5271)(void* usr) {
1230 tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* result;
1231 NI T1_;
1232 result = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
1233 T1_ = (NI)0;
1234 T1_ = minuspercent___system_716(((NI) (ptrdiff_t) (usr)), ((NI) 16));
1235 result = ((tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*) (T1_));
1236 return result;
1237 }
N_INLINE(NIM_BOOL,ltpercent___system_1005)1238 static N_INLINE(NIM_BOOL, ltpercent___system_1005)(NI x, NI y) {
1239 NIM_BOOL result;
1240 result = (NIM_BOOL)0;
1241 result = ((NU64)(((NU) (x))) < (NU64)(((NU) (y))));
1242 return result;
1243 }
N_INLINE(void,rtlAddZCT__system_5314)1244 static N_INLINE(void, rtlAddZCT__system_5314)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
1245 addZCT__system_5265((&gch__system_5218.zct), c);
1246 }
N_INLINE(void,decRef__system_5316)1247 static N_INLINE(void, decRef__system_5316)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
1248 (*c).refcount = minuspercent___system_716((*c).refcount, ((NI) 8));
1249 {
1250 NIM_BOOL T3_;
1251 T3_ = (NIM_BOOL)0;
1252 T3_ = ltpercent___system_1005((*c).refcount, ((NI) 8));
1253 if (!T3_) goto LA4_;
1254 rtlAddZCT__system_5314(c);
1255 }
1256 LA4_: ;
1257 }
N_INLINE(void,asgnRef)1258 static N_INLINE(void, asgnRef)(void** dest, void* src) {
1259 {
1260 tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T5_;
1261 if (!!((src == NIM_NIL))) goto LA3_;
1262 T5_ = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
1263 T5_ = usrToCell__system_5271(src);
1264 incRef__system_5309(T5_);
1265 }
1266 LA3_: ;
1267 {
1268 tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T10_;
1269 if (!!(((*dest) == NIM_NIL))) goto LA8_;
1270 T10_ = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
1271 T10_ = usrToCell__system_5271((*dest));
1272 decRef__system_5316(T10_);
1273 }
1274 LA8_: ;
1275 (*dest) = src;
1276 }
N_NIMCALL(void,addQuoted__pureZjson_5375)1277 N_LIB_PRIVATE N_NIMCALL(void, addQuoted__pureZjson_5375)(NimStringDesc** s, tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg x) {
1278 unsureAsgnRef((void**) (&(*s)), resizeString((*s), (reprEnum((NI)x, (&NTIjsonnodekind__RUngo7nCHe6O8aBGIcrhtg_)) ? reprEnum((NI)x, (&NTIjsonnodekind__RUngo7nCHe6O8aBGIcrhtg_))->Sup.len : 0) + 0));
1279 appendString((*s), reprEnum((NI)x, (&NTIjsonnodekind__RUngo7nCHe6O8aBGIcrhtg_)));
1280 }
N_NIMCALL(NimStringDesc *,collectionToString__pureZjson_5343)1281 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, collectionToString__pureZjson_5343)(tySet_tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg x, NimStringDesc* prefix, NimStringDesc* separator, NimStringDesc* suffix) {
1282 NimStringDesc* result;
1283 NIM_BOOL firstElement;
1284 result = NIM_NIL;
1285 result = copyString(prefix);
1286 firstElement = NIM_TRUE;
1287 {
1288 tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg value;
1289 NI i;
1290 value = (tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg)0;
1291 i = ((NI) 0);
1292 {
1293 while (1) {
1294 if (!(i <= ((NI) 6))) goto LA3;
1295 {
1296 if (!((x &((NU8)1<<((NU)(((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) (i)))&7U)))!=0)) goto LA6_;
1297 value = ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) (i));
1298 {
1299 if (!firstElement) goto LA10_;
1300 firstElement = NIM_FALSE;
1301 }
1302 goto LA8_;
1303 LA10_: ;
1304 {
1305 result = resizeString(result, (separator ? separator->Sup.len : 0) + 0);
1306 appendString(result, separator);
1307 }
1308 LA8_: ;
1309 addQuoted__pureZjson_5375((&result), value);
1310 }
1311 LA6_: ;
1312 i += ((NI) 1);
1313 } LA3: ;
1314 }
1315 }
1316 result = resizeString(result, (suffix ? suffix->Sup.len : 0) + 0);
1317 appendString(result, suffix);
1318 return result;
1319 }
N_NIMCALL(NimStringDesc *,dollar___pureZjson_5339)1320 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, dollar___pureZjson_5339)(tySet_tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg x) {
1321 NimStringDesc* result;
1322 result = NIM_NIL;
1323 result = collectionToString__pureZjson_5343(x, ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_16), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_27), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_18));
1324 return result;
1325 }
N_INLINE(void,nimGCunrefNoCycle)1326 static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
1327 tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T1_;
1328 T1_ = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
1329 T1_ = usrToCell__system_5271(p);
1330 decRef__system_5316(T1_);
1331 }
N_NIMCALL(void,initFromJson__pureZjson_5260)1332 N_LIB_PRIVATE N_NIMCALL(void, initFromJson__pureZjson_5260)(NimStringDesc** dst, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* jsonNode, NimStringDesc** jsonPath) {
1333 {
1334 NIM_BOOL T3_;
1335 tyObject_KeyError__t7nhKLvXTQS9cS8ByJU9bIag* T6_;
1336 NimStringDesc* T7_;
1337 T3_ = (NIM_BOOL)0;
1338 T3_ = eqeq___pureZjson_2044(jsonNode, ((tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*) NIM_NIL));
1339 if (!T3_) goto LA4_;
1340 T6_ = NIM_NIL;
1341 T6_ = (tyObject_KeyError__t7nhKLvXTQS9cS8ByJU9bIag*) newObj((&NTIrefkeyerror__8SzoIAgLw9ci2v0yafHj9b6Q_), sizeof(tyObject_KeyError__t7nhKLvXTQS9cS8ByJU9bIag));
1342 (*T6_).Sup.Sup.Sup.Sup.m_type = (&NTIkeyerror__t7nhKLvXTQS9cS8ByJU9bIag_);
1343 (*T6_).Sup.Sup.Sup.name = "KeyError";
1344 T7_ = NIM_NIL;
1345 T7_ = rawNewString(((*jsonPath) ? (*jsonPath)->Sup.len : 0) + 15);
1346 appendString(T7_, ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_25));
1347 appendString(T7_, (*jsonPath));
1348 asgnRef((void**) (&(*T6_).Sup.Sup.Sup.message), T7_);
1349 asgnRef((void**) (&(*T6_).Sup.Sup.Sup.parent), ((Exception*) NIM_NIL));
1350 raiseExceptionEx((Exception*)T6_, "KeyError", "initFromJson", "json.nim", 1050);
1351 }
1352 goto LA1_;
1353 LA4_: ;
1354 {
1355 NimStringDesc* msgX60gensym96_;
1356 tyArray__24KAM9afIUgUaqBaEBB6r9bg T11_;
1357 tyObject_JsonKindError__GezlryuJLt9aOJ0RpuN6G8g* T12_;
1358 NimStringDesc* T13_;
1359 if (!!(((17 &((NU8)1<<((NU)((*jsonNode).kind)&7U)))!=0))) goto LA9_;
1360 nimZeroMem((void*)T11_, sizeof(tyArray__24KAM9afIUgUaqBaEBB6r9bg));
1361 T11_[0] = dollar___pureZjson_5339(17);
1362 T11_[1] = copyString((*jsonPath));
1363 T11_[2] = reprEnum((NI)(*jsonNode).kind, (&NTIjsonnodekind__RUngo7nCHe6O8aBGIcrhtg_));
1364 msgX60gensym96_ = nsuFormatOpenArray(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_26), T11_, 3);
1365 T12_ = NIM_NIL;
1366 T12_ = (tyObject_JsonKindError__GezlryuJLt9aOJ0RpuN6G8g*) newObj((&NTIrefjsonkinderror__tn3kJ9cInprO2X2FSPir4WQ_), sizeof(tyObject_JsonKindError__GezlryuJLt9aOJ0RpuN6G8g));
1367 (*T12_).Sup.Sup.Sup.Sup.m_type = (&NTIjsonkinderror__GezlryuJLt9aOJ0RpuN6G8g_);
1368 (*T12_).Sup.Sup.Sup.name = "JsonKindError";
1369 T13_ = NIM_NIL;
1370 T13_ = (*T12_).Sup.Sup.Sup.message; (*T12_).Sup.Sup.Sup.message = copyStringRC1(msgX60gensym96_);
1371 if (T13_) nimGCunrefNoCycle(T13_);
1372 asgnRef((void**) (&(*T12_).Sup.Sup.Sup.parent), ((Exception*) NIM_NIL));
1373 raiseExceptionEx((Exception*)T12_, "JsonKindError", "initFromJson", "json.nim", 1057);
1374 }
1375 goto LA1_;
1376 LA9_: ;
1377 LA1_: ;
1378 {
1379 if (!((*jsonNode).kind == ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 0))) goto LA16_;
1380 unsureAsgnRef((void**) (&(*dst)), ((NimStringDesc*) NIM_NIL));
1381 }
1382 goto LA14_;
1383 LA16_: ;
1384 {
1385 unsureAsgnRef((void**) (&(*dst)), copyString((*jsonNode)._kind_1.str));
1386 }
1387 LA14_: ;
1388 }
N_NIMCALL(void,Marker_tySequence__MlAD6nAPq9bHKla9cWiIZP0g)1389 static N_NIMCALL(void, Marker_tySequence__MlAD6nAPq9bHKla9cWiIZP0g)(void* p, NI op) {
1390 tySequence__MlAD6nAPq9bHKla9cWiIZP0g* a;
1391 NI T1_;
1392 a = (tySequence__MlAD6nAPq9bHKla9cWiIZP0g*)p;
1393 T1_ = (NI)0;
1394 for (T1_ = 0; T1_ < (a ? a->Sup.len : 0); T1_++) {
1395 nimGCvisit((void*)a->data[T1_].Field2, op);
1396 nimGCvisit((void*)a->data[T1_].Field3, op);
1397 }
1398 }
N_NIMCALL(void,Marker_tyRef__zfzzuQ8txrdZAYK0WGWpHg)1399 static N_NIMCALL(void, Marker_tyRef__zfzzuQ8txrdZAYK0WGWpHg)(void* p, NI op) {
1400 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* a;
1401 a = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)p;
1402 switch ((*a).kind) {
1403 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 4):
1404 nimGCvisit((void*)(*a)._kind_1.str, op);
1405 break;
1406 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 2):
1407 break;
1408 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 3):
1409 break;
1410 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 1):
1411 break;
1412 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 0):
1413 break;
1414 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 5):
1415 nimGCvisit((void*)(*a)._kind_6.fields.data, op);
1416 break;
1417 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 6):
1418 nimGCvisit((void*)(*a)._kind_7.elems, op);
1419 break;
1420 }
1421 }
N_NIMCALL(void,Marker_tySequence__oLpBKXzW3hF9aCVMo5EymfQ)1422 static N_NIMCALL(void, Marker_tySequence__oLpBKXzW3hF9aCVMo5EymfQ)(void* p, NI op) {
1423 tySequence__oLpBKXzW3hF9aCVMo5EymfQ* a;
1424 NI T1_;
1425 a = (tySequence__oLpBKXzW3hF9aCVMo5EymfQ*)p;
1426 T1_ = (NI)0;
1427 for (T1_ = 0; T1_ < (a ? a->Sup.len : 0); T1_++) {
1428 nimGCvisit((void*)a->data[T1_], op);
1429 }
1430 }
N_NIMCALL(tySequence__oLpBKXzW3hF9aCVMo5EymfQ *,getElems__pureZjson_207)1431 N_LIB_PRIVATE N_NIMCALL(tySequence__oLpBKXzW3hF9aCVMo5EymfQ*, getElems__pureZjson_207)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* n, tySequence__oLpBKXzW3hF9aCVMo5EymfQ* default_0) {
1432 tySequence__oLpBKXzW3hF9aCVMo5EymfQ* result;
1433 { result = NIM_NIL;
1434 {
1435 NIM_BOOL T3_;
1436 T3_ = (NIM_BOOL)0;
1437 T3_ = (n == 0);
1438 if (T3_) goto LA4_;
1439 T3_ = !(((*n).kind == ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 6)));
1440 LA4_: ;
1441 if (!T3_) goto LA5_;
1442 genericSeqAssign((&result), default_0, (&NTIseqLjsonnodeT__oLpBKXzW3hF9aCVMo5EymfQ_));
1443 goto BeforeRet_;
1444 }
1445 goto LA1_;
1446 LA5_: ;
1447 {
1448 genericSeqAssign((&result), (*n)._kind_7.elems, (&NTIseqLjsonnodeT__oLpBKXzW3hF9aCVMo5EymfQ_));
1449 goto BeforeRet_;
1450 }
1451 LA1_: ;
1452 }BeforeRet_: ;
1453 return result;
1454 }
N_NIMCALL(void,initFromJson__pureZjson_5264)1455 N_LIB_PRIVATE N_NIMCALL(void, initFromJson__pureZjson_5264)(NIM_BOOL* dst, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* jsonNode, NimStringDesc** jsonPath) {
1456 {
1457 NIM_BOOL T3_;
1458 tyObject_KeyError__t7nhKLvXTQS9cS8ByJU9bIag* T6_;
1459 NimStringDesc* T7_;
1460 T3_ = (NIM_BOOL)0;
1461 T3_ = eqeq___pureZjson_2044(jsonNode, ((tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*) NIM_NIL));
1462 if (!T3_) goto LA4_;
1463 T6_ = NIM_NIL;
1464 T6_ = (tyObject_KeyError__t7nhKLvXTQS9cS8ByJU9bIag*) newObj((&NTIrefkeyerror__8SzoIAgLw9ci2v0yafHj9b6Q_), sizeof(tyObject_KeyError__t7nhKLvXTQS9cS8ByJU9bIag));
1465 (*T6_).Sup.Sup.Sup.Sup.m_type = (&NTIkeyerror__t7nhKLvXTQS9cS8ByJU9bIag_);
1466 (*T6_).Sup.Sup.Sup.name = "KeyError";
1467 T7_ = NIM_NIL;
1468 T7_ = rawNewString(((*jsonPath) ? (*jsonPath)->Sup.len : 0) + 15);
1469 appendString(T7_, ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_25));
1470 appendString(T7_, (*jsonPath));
1471 asgnRef((void**) (&(*T6_).Sup.Sup.Sup.message), T7_);
1472 asgnRef((void**) (&(*T6_).Sup.Sup.Sup.parent), ((Exception*) NIM_NIL));
1473 raiseExceptionEx((Exception*)T6_, "KeyError", "initFromJson", "json.nim", 1050);
1474 }
1475 goto LA1_;
1476 LA4_: ;
1477 {
1478 NimStringDesc* msgX60gensym100_;
1479 tyArray__24KAM9afIUgUaqBaEBB6r9bg T11_;
1480 tyObject_JsonKindError__GezlryuJLt9aOJ0RpuN6G8g* T12_;
1481 NimStringDesc* T13_;
1482 if (!!(((2 &((NU8)1<<((NU)((*jsonNode).kind)&7U)))!=0))) goto LA9_;
1483 nimZeroMem((void*)T11_, sizeof(tyArray__24KAM9afIUgUaqBaEBB6r9bg));
1484 T11_[0] = dollar___pureZjson_5339(2);
1485 T11_[1] = copyString((*jsonPath));
1486 T11_[2] = reprEnum((NI)(*jsonNode).kind, (&NTIjsonnodekind__RUngo7nCHe6O8aBGIcrhtg_));
1487 msgX60gensym100_ = nsuFormatOpenArray(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_26), T11_, 3);
1488 T12_ = NIM_NIL;
1489 T12_ = (tyObject_JsonKindError__GezlryuJLt9aOJ0RpuN6G8g*) newObj((&NTIrefjsonkinderror__tn3kJ9cInprO2X2FSPir4WQ_), sizeof(tyObject_JsonKindError__GezlryuJLt9aOJ0RpuN6G8g));
1490 (*T12_).Sup.Sup.Sup.Sup.m_type = (&NTIjsonkinderror__GezlryuJLt9aOJ0RpuN6G8g_);
1491 (*T12_).Sup.Sup.Sup.name = "JsonKindError";
1492 T13_ = NIM_NIL;
1493 T13_ = (*T12_).Sup.Sup.Sup.message; (*T12_).Sup.Sup.Sup.message = copyStringRC1(msgX60gensym100_);
1494 if (T13_) nimGCunrefNoCycle(T13_);
1495 asgnRef((void**) (&(*T12_).Sup.Sup.Sup.parent), ((Exception*) NIM_NIL));
1496 raiseExceptionEx((Exception*)T12_, "JsonKindError", "initFromJson", "json.nim", 1057);
1497 }
1498 goto LA1_;
1499 LA9_: ;
1500 LA1_: ;
1501 (*dst) = (*jsonNode)._kind_4.bval;
1502 }
N_INLINE(void,pushSafePoint)1503 static N_INLINE(void, pushSafePoint)(TSafePoint* s) {
1504 (*s).prev = excHandler__system_2565;
1505 excHandler__system_2565 = s;
1506 }
N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q *,newJStringMove__pureZjson_78)1507 N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJStringMove__pureZjson_78)(NimStringDesc* s) {
1508 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
1509 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T1_;
1510 result = NIM_NIL;
1511 T1_ = NIM_NIL;
1512 T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*) newObj((&NTIjsonnode__zfzzuQ8txrdZAYK0WGWpHg_), sizeof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q));
1513 (*T1_).kind = ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 4);
1514 result = T1_;
1515 asgnRef((void**) (&(*result)._kind_1.str), s);
1516 return result;
1517 }
N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q *,newJRawNumber__pureZjson_75)1518 N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJRawNumber__pureZjson_75)(NimStringDesc* s) {
1519 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
1520 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T1_;
1521 NimStringDesc* T2_;
1522 result = NIM_NIL;
1523 T1_ = NIM_NIL;
1524 T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*) newObj((&NTIjsonnode__zfzzuQ8txrdZAYK0WGWpHg_), sizeof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q));
1525 (*T1_).kind = ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 4);
1526 T2_ = NIM_NIL;
1527 T2_ = (*T1_)._kind_1.str; (*T1_)._kind_1.str = copyStringRC1(s);
1528 if (T2_) nimGCunrefNoCycle(T2_);
1529 (*T1_).isUnquoted = NIM_TRUE;
1530 result = T1_;
1531 return result;
1532 }
N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q *,newJInt__pureZjson_81)1533 N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJInt__pureZjson_81)(NI64 n) {
1534 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
1535 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T1_;
1536 result = NIM_NIL;
1537 T1_ = NIM_NIL;
1538 T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*) newObj((&NTIjsonnode__zfzzuQ8txrdZAYK0WGWpHg_), sizeof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q));
1539 (*T1_).kind = ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 2);
1540 (*T1_)._kind_2.num = n;
1541 result = T1_;
1542 return result;
1543 }
N_INLINE(void,popSafePoint)1544 static N_INLINE(void, popSafePoint)(void) {
1545 excHandler__system_2565 = (*excHandler__system_2565).prev;
1546 }
N_INLINE(Exception *,nimBorrowCurrentException)1547 static N_INLINE(Exception*, nimBorrowCurrentException)(void) {
1548 Exception* result;
1549 result = NIM_NIL;
1550 result = currException__system_2566;
1551 return result;
1552 }
N_INLINE(void,popCurrentException)1553 static N_INLINE(void, popCurrentException)(void) {
1554 asgnRef((void**) (&currException__system_2566), (*currException__system_2566).up);
1555 }
N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q *,newJFloat__pureZjson_84)1556 N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJFloat__pureZjson_84)(NF n) {
1557 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
1558 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T1_;
1559 result = NIM_NIL;
1560 T1_ = NIM_NIL;
1561 T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*) newObj((&NTIjsonnode__zfzzuQ8txrdZAYK0WGWpHg_), sizeof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q));
1562 (*T1_).kind = ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 3);
1563 (*T1_)._kind_3.fnum = n;
1564 result = T1_;
1565 return result;
1566 }
N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q *,newJBool__pureZjson_87)1567 N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJBool__pureZjson_87)(NIM_BOOL b) {
1568 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
1569 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T1_;
1570 result = NIM_NIL;
1571 T1_ = NIM_NIL;
1572 T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*) newObj((&NTIjsonnode__zfzzuQ8txrdZAYK0WGWpHg_), sizeof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q));
1573 (*T1_).kind = ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 1);
1574 (*T1_)._kind_4.bval = b;
1575 result = T1_;
1576 return result;
1577 }
N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q *,newJNull__pureZjson_90)1578 N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJNull__pureZjson_90)(void) {
1579 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
1580 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T1_;
1581 result = NIM_NIL;
1582 T1_ = NIM_NIL;
1583 T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*) newObj((&NTIjsonnode__zfzzuQ8txrdZAYK0WGWpHg_), sizeof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q));
1584 (*T1_).kind = ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 0);
1585 result = T1_;
1586 return result;
1587 }
N_INLINE(NI,slotsNeeded__pureZcollectionsZtables_42)1588 static N_INLINE(NI, slotsNeeded__pureZcollectionsZtables_42)(NI count) {
1589 NI result;
1590 result = (NI)0;
1591 result = nextPowerOfTwo__pureZmath_177((NI)((NI)((NI)(((NI) (count)) * ((NI) 3)) / ((NI) 2)) + ((NI) 4)));
1592 return result;
1593 }
N_NIMCALL(void,initOrderedTable__pureZjson_94)1594 N_LIB_PRIVATE N_NIMCALL(void, initOrderedTable__pureZjson_94)(NI initialSize, tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* Result) {
1595 NI correctSizeX60gensym0_;
1596 unsureAsgnRef((void**)&(*Result).data, NIM_NIL);
1597 (*Result).counter = 0;
1598 (*Result).first = 0;
1599 (*Result).last = 0;
1600 correctSizeX60gensym0_ = slotsNeeded__pureZcollectionsZtables_42(((NI) (initialSize)));
1601 (*Result).counter = ((NI) 0);
1602 unsureAsgnRef((void**) (&(*Result).data), (tySequence__MlAD6nAPq9bHKla9cWiIZP0g*) newSeq((&NTIorderedkeyvaluepairseq__MlAD6nAPq9bHKla9cWiIZP0g_), ((NI) (correctSizeX60gensym0_))));
1603 (*Result).first = ((NI) -1);
1604 (*Result).last = ((NI) -1);
1605 }
N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q *,newJObject__pureZjson_92)1606 N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJObject__pureZjson_92)(void) {
1607 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
1608 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T1_;
1609 result = NIM_NIL;
1610 T1_ = NIM_NIL;
1611 T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*) newObj((&NTIjsonnode__zfzzuQ8txrdZAYK0WGWpHg_), sizeof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q));
1612 (*T1_).kind = ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 5);
1613 initOrderedTable__pureZjson_94(((NI) 2), (&(*T1_)._kind_6.fields));
1614 result = T1_;
1615 return result;
1616 }
N_INLINE(NIM_BOOL,mustRehash__pureZjson_692)1617 static N_INLINE(NIM_BOOL, mustRehash__pureZjson_692)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* t) {
1618 NIM_BOOL result;
1619 NIM_BOOL T1_;
1620 NI T2_;
1621 NI T4_;
1622 result = (NIM_BOOL)0;
1623 T1_ = (NIM_BOOL)0;
1624 T2_ = ((*t).data ? (*t).data->Sup.len : 0);
1625 T1_ = ((NI)(T2_ * ((NI) 2)) < (NI)((*t).counter * ((NI) 3)));
1626 if (T1_) goto LA3_;
1627 T4_ = ((*t).data ? (*t).data->Sup.len : 0);
1628 T1_ = ((NI)(T4_ - (*t).counter) < ((NI) 4));
1629 LA3_: ;
1630 result = T1_;
1631 return result;
1632 }
N_NIMCALL(void,rawInsert__pureZjson_1264)1633 N_LIB_PRIVATE N_NIMCALL(void, rawInsert__pureZjson_1264)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* t, tySequence__MlAD6nAPq9bHKla9cWiIZP0g** data, NimStringDesc* key, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* val, NI hc, NI h) {
1634 NimStringDesc* T1_;
1635 T1_ = NIM_NIL;
1636 T1_ = (*data)->data[h].Field2; (*data)->data[h].Field2 = copyStringRC1(key);
1637 if (T1_) nimGCunrefNoCycle(T1_);
1638 asgnRef((void**) (&(*data)->data[h].Field3), val);
1639 (*data)->data[h].Field0 = hc;
1640 (*data)->data[h].Field1 = ((NI) -1);
1641 {
1642 if (!((*t).first < ((NI) 0))) goto LA4_;
1643 (*t).first = h;
1644 }
1645 LA4_: ;
1646 {
1647 if (!(((NI) 0) <= (*t).last)) goto LA8_;
1648 (*data)->data[(*t).last].Field1 = h;
1649 }
1650 LA8_: ;
1651 (*t).last = h;
1652 }
N_NIMCALL(void,enlarge__pureZjson_853)1653 N_LIB_PRIVATE N_NIMCALL(void, enlarge__pureZjson_853)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* t) {
1654 tySequence__MlAD6nAPq9bHKla9cWiIZP0g* n;
1655 NI T1_;
1656 NI h;
1657 tySequence__MlAD6nAPq9bHKla9cWiIZP0g* T2_;
1658 n = NIM_NIL;
1659 T1_ = ((*t).data ? (*t).data->Sup.len : 0);
1660 n = (tySequence__MlAD6nAPq9bHKla9cWiIZP0g*) newSeq((&NTIorderedkeyvaluepairseq__MlAD6nAPq9bHKla9cWiIZP0g_), ((NI) ((NI)(T1_ * ((NI) 2)))));
1661 h = (*t).first;
1662 (*t).first = ((NI) -1);
1663 (*t).last = ((NI) -1);
1664 T2_ = NIM_NIL;
1665 T2_ = (*t).data;
1666 unsureAsgnRef((void**) (&(*t).data), n);
1667 n = T2_;
1668 {
1669 while (1) {
1670 NI nxt;
1671 NI eh;
1672 if (!(((NI) 0) <= h)) goto LA4;
1673 nxt = n->data[h].Field1;
1674 eh = n->data[h].Field0;
1675 {
1676 NIM_BOOL T7_;
1677 NI j;
1678 NI T10_;
1679 NimStringDesc* T15_;
1680 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T16_;
1681 T7_ = (NIM_BOOL)0;
1682 T7_ = isFilled__pureZcollectionsZtables_31(eh);
1683 if (!T7_) goto LA8_;
1684 T10_ = (((*t).data ? (*t).data->Sup.len : 0)-1);
1685 j = (NI)(eh & T10_);
1686 {
1687 while (1) {
1688 NIM_BOOL T13_;
1689 NI T14_;
1690 T13_ = (NIM_BOOL)0;
1691 T13_ = isFilled__pureZcollectionsZtables_31((*t).data->data[j].Field0);
1692 if (!T13_) goto LA12;
1693 T14_ = (((*t).data ? (*t).data->Sup.len : 0)-1);
1694 j = nextTry__pureZcollectionsZtables_34(j, T14_);
1695 } LA12: ;
1696 }
1697 T15_ = NIM_NIL;
1698 T15_ = n->data[h].Field2;
1699 asgnRef((void**) (&n->data[h].Field2), NIM_NIL);
1700 T16_ = NIM_NIL;
1701 T16_ = n->data[h].Field3;
1702 asgnRef((void**) (&n->data[h].Field3), NIM_NIL);
1703 rawInsert__pureZjson_1264(t, (&(*t).data), T15_, T16_, n->data[h].Field0, j);
1704 }
1705 LA8_: ;
1706 h = nxt;
1707 } LA4: ;
1708 }
1709 }
N_NIMCALL(NI,rawGetKnownHC__pureZjson_1546)1710 N_LIB_PRIVATE N_NIMCALL(NI, rawGetKnownHC__pureZjson_1546)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* t, NimStringDesc* key, NI hc) {
1711 NI result;
1712 NI h;
1713 NI T6_;
1714 { result = (NI)0;
1715 {
1716 NI T3_;
1717 T3_ = ((*t).data ? (*t).data->Sup.len : 0);
1718 if (!(T3_ == ((NI) 0))) goto LA4_;
1719 result = ((NI) -1);
1720 goto BeforeRet_;
1721 }
1722 LA4_: ;
1723 T6_ = (((*t).data ? (*t).data->Sup.len : 0)-1);
1724 h = (NI)(hc & T6_);
1725 {
1726 while (1) {
1727 NIM_BOOL T9_;
1728 NI T16_;
1729 T9_ = (NIM_BOOL)0;
1730 T9_ = isFilled__pureZcollectionsZtables_31((*t).data->data[h].Field0);
1731 if (!T9_) goto LA8;
1732 {
1733 NIM_BOOL T12_;
1734 T12_ = (NIM_BOOL)0;
1735 T12_ = ((*t).data->data[h].Field0 == hc);
1736 if (!(T12_)) goto LA13_;
1737 T12_ = eqStrings((*t).data->data[h].Field2, key);
1738 LA13_: ;
1739 if (!T12_) goto LA14_;
1740 result = h;
1741 goto BeforeRet_;
1742 }
1743 LA14_: ;
1744 T16_ = (((*t).data ? (*t).data->Sup.len : 0)-1);
1745 h = nextTry__pureZcollectionsZtables_34(h, T16_);
1746 } LA8: ;
1747 }
1748 result = (NI)(((NI) -1) - h);
1749 }BeforeRet_: ;
1750 return result;
1751 }
N_NIMCALL(void,X5BX5Deq___pureZjson_287)1752 N_LIB_PRIVATE N_NIMCALL(void, X5BX5Deq___pureZjson_287)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* t, NimStringDesc* key, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* val) {
1753 NI hc;
1754 NI index;
1755 {
1756 NI T3_;
1757 NI correctSizeX60gensym13_;
1758 T3_ = ((*t).data ? (*t).data->Sup.len : 0);
1759 if (!(T3_ == ((NI) 0))) goto LA4_;
1760 correctSizeX60gensym13_ = slotsNeeded__pureZcollectionsZtables_42(((NI) 32));
1761 (*t).counter = ((NI) 0);
1762 unsureAsgnRef((void**) (&(*t).data), (tySequence__MlAD6nAPq9bHKla9cWiIZP0g*) newSeq((&NTIorderedkeyvaluepairseq__MlAD6nAPq9bHKla9cWiIZP0g_), ((NI) (correctSizeX60gensym13_))));
1763 (*t).first = ((NI) -1);
1764 (*t).last = ((NI) -1);
1765 }
1766 LA4_: ;
1767 hc = (NI)0;
1768 index = rawGet__pureZjson_356((&(*t)), key, (&hc));
1769 {
1770 if (!(((NI) 0) <= index)) goto LA8_;
1771 asgnRef((void**) (&(*t).data->data[index].Field3), val);
1772 }
1773 goto LA6_;
1774 LA8_: ;
1775 {
1776 {
1777 NI T13_;
1778 NI correctSizeX60gensym18_;
1779 T13_ = ((*t).data ? (*t).data->Sup.len : 0);
1780 if (!(T13_ == ((NI) 0))) goto LA14_;
1781 correctSizeX60gensym18_ = slotsNeeded__pureZcollectionsZtables_42(((NI) 32));
1782 (*t).counter = ((NI) 0);
1783 unsureAsgnRef((void**) (&(*t).data), (tySequence__MlAD6nAPq9bHKla9cWiIZP0g*) newSeq((&NTIorderedkeyvaluepairseq__MlAD6nAPq9bHKla9cWiIZP0g_), ((NI) (correctSizeX60gensym18_))));
1784 (*t).first = ((NI) -1);
1785 (*t).last = ((NI) -1);
1786 }
1787 LA14_: ;
1788 {
1789 NIM_BOOL T18_;
1790 T18_ = (NIM_BOOL)0;
1791 T18_ = mustRehash__pureZjson_692((&(*t)));
1792 if (!T18_) goto LA19_;
1793 enlarge__pureZjson_853(t);
1794 index = rawGetKnownHC__pureZjson_1546((&(*t)), key, hc);
1795 }
1796 LA19_: ;
1797 index = (NI)(((NI) -1) - index);
1798 rawInsert__pureZjson_1264(t, (&(*t).data), key, val, hc, index);
1799 (*t).counter += ((NI) 1);
1800 }
1801 LA6_: ;
1802 }
N_INLINE(void,X5BX5Deq___pureZjson_1923)1803 static N_INLINE(void, X5BX5Deq___pureZjson_1923)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* obj, NimStringDesc* key, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* val) {
1804 X5BX5Deq___pureZjson_287((&(*obj)._kind_6.fields), key, val);
1805 }
N_INLINE(void,nimGCunrefRC1)1806 static N_INLINE(void, nimGCunrefRC1)(void* p) {
1807 tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T1_;
1808 T1_ = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
1809 T1_ = usrToCell__system_5271(p);
1810 decRef__system_5316(T1_);
1811 }
N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q *,newJArray__pureZjson_123)1812 N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJArray__pureZjson_123)(void) {
1813 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
1814 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T1_;
1815 result = NIM_NIL;
1816 T1_ = NIM_NIL;
1817 T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*) newObj((&NTIjsonnode__zfzzuQ8txrdZAYK0WGWpHg_), sizeof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q));
1818 (*T1_).kind = ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 6);
1819 if ((*T1_)._kind_7.elems) { nimGCunrefRC1((*T1_)._kind_7.elems); (*T1_)._kind_7.elems = NIM_NIL; }
1820 result = T1_;
1821 return result;
1822 }
N_NIMCALL(void,add__pureZjson_222)1823 N_LIB_PRIVATE N_NIMCALL(void, add__pureZjson_222)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* father, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* child) {
1824 NI T1_;
1825 asgnRef((void**) (&(*father)._kind_7.elems), (tySequence__oLpBKXzW3hF9aCVMo5EymfQ*) incrSeqV3((TGenericSeq*)((*father)._kind_7.elems), (&NTIseqLjsonnodeT__oLpBKXzW3hF9aCVMo5EymfQ_)));
1826 T1_ = (*father)._kind_7.elems->Sup.len++;
1827 asgnRef((void**) (&(*father)._kind_7.elems->data[T1_]), child);
1828 }
N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q *,parseJson__pureZjson_5178)1829 N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, parseJson__pureZjson_5178)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* p, NIM_BOOL rawIntegers, NIM_BOOL rawFloats, NI depth) {
1830 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* volatile result;
1831 result = NIM_NIL;
1832 switch ((*p).tok) {
1833 case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 2):
1834 {
1835 tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T2_;
1836 result = newJStringMove__pureZjson_78((*p).a);
1837 unsureAsgnRef((void**) (&(*p).a), ((NimStringDesc*) NIM_NIL));
1838 T2_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
1839 T2_ = getTok__pureZparsejson_425(p);
1840 (void)(T2_);
1841 }
1842 break;
1843 case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 3):
1844 {
1845 tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T12_;
1846 {
1847 if (!rawIntegers) goto LA6_;
1848 result = newJRawNumber__pureZjson_75((*p).a);
1849 }
1850 goto LA4_;
1851 LA6_: ;
1852 {
1853 TSafePoint TM__9b9bytt1stv9cZ8uqII7HFgew_33;
1854 NI64 T9_;
1855 pushSafePoint(&TM__9b9bytt1stv9cZ8uqII7HFgew_33);
1856 TM__9b9bytt1stv9cZ8uqII7HFgew_33.status = _setjmp(TM__9b9bytt1stv9cZ8uqII7HFgew_33.context);
1857 if (TM__9b9bytt1stv9cZ8uqII7HFgew_33.status == 0) {
1858 T9_ = (NI64)0;
1859 T9_ = nsuParseBiggestInt((*p).a);
1860 result = newJInt__pureZjson_81(T9_);
1861 popSafePoint();
1862 }
1863 else {
1864 popSafePoint();
1865 if (isObj(nimBorrowCurrentException()->Sup.m_type, (&NTIvalueerror__yoNlBGx0D2tRizIdhQuENw_))) {
1866 TM__9b9bytt1stv9cZ8uqII7HFgew_33.status = 0;
1867 result = newJRawNumber__pureZjson_75((*p).a);
1868 popCurrentException();
1869 }
1870 }
1871 if (TM__9b9bytt1stv9cZ8uqII7HFgew_33.status != 0) reraiseException();
1872 }
1873 LA4_: ;
1874 T12_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
1875 T12_ = getTok__pureZparsejson_425(p);
1876 (void)(T12_);
1877 }
1878 break;
1879 case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 4):
1880 {
1881 tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T22_;
1882 {
1883 if (!rawFloats) goto LA16_;
1884 result = newJRawNumber__pureZjson_75((*p).a);
1885 }
1886 goto LA14_;
1887 LA16_: ;
1888 {
1889 TSafePoint TM__9b9bytt1stv9cZ8uqII7HFgew_34;
1890 NF T19_;
1891 pushSafePoint(&TM__9b9bytt1stv9cZ8uqII7HFgew_34);
1892 TM__9b9bytt1stv9cZ8uqII7HFgew_34.status = _setjmp(TM__9b9bytt1stv9cZ8uqII7HFgew_34.context);
1893 if (TM__9b9bytt1stv9cZ8uqII7HFgew_34.status == 0) {
1894 T19_ = (NF)0;
1895 T19_ = nsuParseFloat((*p).a);
1896 result = newJFloat__pureZjson_84(T19_);
1897 popSafePoint();
1898 }
1899 else {
1900 popSafePoint();
1901 if (isObj(nimBorrowCurrentException()->Sup.m_type, (&NTIvalueerror__yoNlBGx0D2tRizIdhQuENw_))) {
1902 TM__9b9bytt1stv9cZ8uqII7HFgew_34.status = 0;
1903 result = newJRawNumber__pureZjson_75((*p).a);
1904 popCurrentException();
1905 }
1906 }
1907 if (TM__9b9bytt1stv9cZ8uqII7HFgew_34.status != 0) reraiseException();
1908 }
1909 LA14_: ;
1910 T22_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
1911 T22_ = getTok__pureZparsejson_425(p);
1912 (void)(T22_);
1913 }
1914 break;
1915 case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 5):
1916 {
1917 tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T24_;
1918 result = newJBool__pureZjson_87(NIM_TRUE);
1919 T24_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
1920 T24_ = getTok__pureZparsejson_425(p);
1921 (void)(T24_);
1922 }
1923 break;
1924 case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 6):
1925 {
1926 tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T26_;
1927 result = newJBool__pureZjson_87(NIM_FALSE);
1928 T26_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
1929 T26_ = getTok__pureZparsejson_425(p);
1930 (void)(T26_);
1931 }
1932 break;
1933 case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 7):
1934 {
1935 tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T28_;
1936 result = newJNull__pureZjson_90();
1937 T28_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
1938 T28_ = getTok__pureZparsejson_425(p);
1939 (void)(T28_);
1940 }
1941 break;
1942 case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 8):
1943 {
1944 tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T34_;
1945 {
1946 if (!(((NI) 1000) < depth)) goto LA32_;
1947 raiseParseErr__pureZparsejson_580((&(*p)), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_18));
1948 }
1949 LA32_: ;
1950 result = newJObject__pureZjson_92();
1951 T34_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
1952 T34_ = getTok__pureZparsejson_425(p);
1953 (void)(T34_);
1954 {
1955 while (1) {
1956 NimStringDesc* key;
1957 tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T41_;
1958 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* val;
1959 tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T46_;
1960 if (!!(((*p).tok == ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 9)))) goto LA36;
1961 {
1962 if (!!(((*p).tok == ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 2)))) goto LA39_;
1963 raiseParseErr__pureZparsejson_580((&(*p)), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_35));
1964 }
1965 LA39_: ;
1966 key = copyString((*p).a);
1967 T41_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
1968 T41_ = getTok__pureZparsejson_425(p);
1969 (void)(T41_);
1970 eat__pureZparsejson_602(p, ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 12));
1971 val = parseJson__pureZjson_5178(p, rawIntegers, rawFloats, (NI)(depth + ((NI) 1)));
1972 X5BX5Deq___pureZjson_1923(result, key, val);
1973 {
1974 if (!!(((*p).tok == ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 13)))) goto LA44_;
1975 goto LA35;
1976 }
1977 LA44_: ;
1978 T46_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
1979 T46_ = getTok__pureZparsejson_425(p);
1980 (void)(T46_);
1981 } LA36: ;
1982 } LA35: ;
1983 eat__pureZparsejson_602(p, ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 9));
1984 }
1985 break;
1986 case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 10):
1987 {
1988 tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T52_;
1989 {
1990 if (!(((NI) 1000) < depth)) goto LA50_;
1991 raiseParseErr__pureZparsejson_580((&(*p)), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_15));
1992 }
1993 LA50_: ;
1994 result = newJArray__pureZjson_123();
1995 T52_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
1996 T52_ = getTok__pureZparsejson_425(p);
1997 (void)(T52_);
1998 {
1999 while (1) {
2000 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T55_;
2001 tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T60_;
2002 if (!!(((*p).tok == ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 11)))) goto LA54;
2003 T55_ = NIM_NIL;
2004 T55_ = parseJson__pureZjson_5178(p, rawIntegers, rawFloats, (NI)(depth + ((NI) 1)));
2005 add__pureZjson_222(result, T55_);
2006 {
2007 if (!!(((*p).tok == ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 13)))) goto LA58_;
2008 goto LA53;
2009 }
2010 LA58_: ;
2011 T60_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
2012 T60_ = getTok__pureZparsejson_425(p);
2013 (void)(T60_);
2014 } LA54: ;
2015 } LA53: ;
2016 eat__pureZparsejson_602(p, ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 11));
2017 }
2018 break;
2019 case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 0):
2020 case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 9):
2021 case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 11):
2022 case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 12):
2023 case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 13):
2024 case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 1):
2025 {
2026 raiseParseErr__pureZparsejson_580((&(*p)), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_16));
2027 }
2028 break;
2029 }
2030 return result;
2031 }
N_INLINE(void,close__pureZparsejson_151)2032 static N_INLINE(void, close__pureZparsejson_151)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my) {
2033 close__pureZlexbase_14(&my->Sup);
2034 }
N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q *,parseJson__pureZjson_5216)2035 N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, parseJson__pureZjson_5216)(tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* s, NimStringDesc* filename, NIM_BOOL rawIntegers, NIM_BOOL rawFloats) {
2036 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* volatile result;
2037 tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ p;
2038 TSafePoint TM__9b9bytt1stv9cZ8uqII7HFgew_32;
2039 tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T1_;
2040 result = NIM_NIL;
2041 nimZeroMem((void*)(&p), sizeof(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ));
2042 p.Sup.Sup.m_type = (&NTIjsonparser__KWIQnzXEOUqdWsnCUL9atyQ_);
2043 open__pureZparsejson_97((&p), s, filename, NIM_FALSE);
2044 pushSafePoint(&TM__9b9bytt1stv9cZ8uqII7HFgew_32);
2045 TM__9b9bytt1stv9cZ8uqII7HFgew_32.status = _setjmp(TM__9b9bytt1stv9cZ8uqII7HFgew_32.context);
2046 if (TM__9b9bytt1stv9cZ8uqII7HFgew_32.status == 0) {
2047 T1_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
2048 T1_ = getTok__pureZparsejson_425((&p));
2049 (void)(T1_);
2050 result = parseJson__pureZjson_5178((&p), rawIntegers, rawFloats, ((NI) 0));
2051 eat__pureZparsejson_602((&p), ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 1));
2052 popSafePoint();
2053 }
2054 else {
2055 popSafePoint();
2056 }
2057 {
2058 close__pureZparsejson_151((&p));
2059 if (TM__9b9bytt1stv9cZ8uqII7HFgew_32.status != 0) nimLeaveFinally();
2060 }
2061 if (TM__9b9bytt1stv9cZ8uqII7HFgew_32.status != 0) reraiseException();
2062 return result;
2063 }
N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q *,parseFile__pureZjson_5228)2064 N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, parseFile__pureZjson_5228)(NimStringDesc* filename) {
2065 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
2066 tyObject_FileStreamObj__9bEVSsOIpkY9cf5lCtaS39bPQ* stream;
2067 result = NIM_NIL;
2068 stream = newFileStream__pureZstreams_832(filename, ((tyEnum_FileMode__ZJfK20XeZ9bv2j1pZjw9aswg) 0), ((NI) -1));
2069 {
2070 tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw* T5_;
2071 NimStringDesc* T6_;
2072 if (!(stream == ((tyObject_FileStreamObj__9bEVSsOIpkY9cf5lCtaS39bPQ*) NIM_NIL))) goto LA3_;
2073 T5_ = NIM_NIL;
2074 T5_ = (tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw*) newObj((&NTIrefioerror__HMIVdYjdZYWskTmTQVo5BQ_), sizeof(tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw));
2075 (*T5_).Sup.Sup.Sup.m_type = (&NTIioerror__iLZrPn9anoh9ad1MmO0RczFw_);
2076 (*T5_).Sup.Sup.name = "IOError";
2077 T6_ = NIM_NIL;
2078 T6_ = rawNewString((filename ? filename->Sup.len : 0) + 23);
2079 appendString(T6_, ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_31));
2080 appendString(T6_, filename);
2081 asgnRef((void**) (&(*T5_).Sup.Sup.message), T6_);
2082 asgnRef((void**) (&(*T5_).Sup.Sup.parent), ((Exception*) NIM_NIL));
2083 raiseExceptionEx((Exception*)T5_, "IOError", "parseFile", "json.nim", 1042);
2084 }
2085 LA3_: ;
2086 result = parseJson__pureZjson_5216((*((tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ**) (&(stream)))), filename, NIM_FALSE, NIM_FALSE);
2087 return result;
2088 }
N_INLINE(NimStringDesc *,spaces__pureZstrutils_1029)2089 static N_INLINE(NimStringDesc*, spaces__pureZstrutils_1029)(NI n) {
2090 NimStringDesc* result;
2091 result = NIM_NIL;
2092 result = nsuRepeatChar(32, n);
2093 return result;
2094 }
N_NIMCALL(void,indent__pureZjson_4320)2095 N_LIB_PRIVATE N_NIMCALL(void, indent__pureZjson_4320)(NimStringDesc** s, NI i) {
2096 NimStringDesc* T1_;
2097 T1_ = NIM_NIL;
2098 T1_ = spaces__pureZstrutils_1029(((NI) (i)));
2099 unsureAsgnRef((void**) (&(*s)), resizeString((*s), (T1_ ? T1_->Sup.len : 0) + 0));
2100 appendString((*s), T1_);
2101 }
N_NIMCALL(void,nl__pureZjson_4328)2102 N_LIB_PRIVATE N_NIMCALL(void, nl__pureZjson_4328)(NimStringDesc** s, NIM_BOOL ml) {
2103 NimStringDesc* T1_;
2104 T1_ = NIM_NIL;
2105 {
2106 if (!ml) goto LA4_;
2107 T1_ = copyString(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_36));
2108 }
2109 goto LA2_;
2110 LA4_: ;
2111 {
2112 T1_ = copyString(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_37));
2113 }
2114 LA2_: ;
2115 unsureAsgnRef((void**) (&(*s)), resizeString((*s), (T1_ ? T1_->Sup.len : 0) + 0));
2116 appendString((*s), T1_);
2117 }
N_NIMCALL(NI,newIndent__pureZjson_4323)2118 N_LIB_PRIVATE N_NIMCALL(NI, newIndent__pureZjson_4323)(NI curr, NI indent, NIM_BOOL ml) {
2119 NI result;
2120 { result = (NI)0;
2121 {
2122 if (!ml) goto LA3_;
2123 result = (NI)(curr + indent);
2124 goto BeforeRet_;
2125 }
2126 goto LA1_;
2127 LA3_: ;
2128 {
2129 result = indent;
2130 goto BeforeRet_;
2131 }
2132 LA1_: ;
2133 }BeforeRet_: ;
2134 return result;
2135 }
N_NIMCALL(void,toPretty__pureZjson_4380)2136 N_LIB_PRIVATE N_NIMCALL(void, toPretty__pureZjson_4380)(NimStringDesc** result, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* node, NI indent, NIM_BOOL ml, NIM_BOOL lstArr, NI currIndent) {
2137 switch ((*node).kind) {
2138 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 5):
2139 {
2140 {
2141 if (!lstArr) goto LA4_;
2142 indent__pureZjson_4320(result, currIndent);
2143 }
2144 LA4_: ;
2145 {
2146 NI T8_;
2147 NI i;
2148 T8_ = (NI)0;
2149 T8_ = len__pureZjson_2142((&(*node)._kind_6.fields));
2150 if (!(((NI) 0) < T8_)) goto LA9_;
2151 unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
2152 appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_16));
2153 nl__pureZjson_4328(result, ml);
2154 i = ((NI) 0);
2155 {
2156 NimStringDesc* key;
2157 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* val;
2158 tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg colontmp_;
2159 NI L;
2160 key = NIM_NIL;
2161 val = NIM_NIL;
2162 nimZeroMem((void*)(&colontmp_), sizeof(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg));
2163 colontmp_.data = (*node)._kind_6.fields.data;
2164 colontmp_.counter = (*node)._kind_6.fields.counter;
2165 colontmp_.first = (*node)._kind_6.fields.first;
2166 colontmp_.last = (*node)._kind_6.fields.last;
2167 L = len__pureZjson_2142((&colontmp_));
2168 {
2169 NI h;
2170 if (!(((NI) 0) < colontmp_.counter)) goto LA14_;
2171 h = colontmp_.first;
2172 {
2173 while (1) {
2174 NI nxt;
2175 if (!(((NI) 0) <= h)) goto LA17;
2176 nxt = colontmp_.data->data[h].Field1;
2177 {
2178 NIM_BOOL T20_;
2179 NI T27_;
2180 NI T28_;
2181 T20_ = (NIM_BOOL)0;
2182 T20_ = isFilled__pureZcollectionsZtables_31(colontmp_.data->data[h].Field0);
2183 if (!T20_) goto LA21_;
2184 key = colontmp_.data->data[h].Field2;
2185 val = colontmp_.data->data[h].Field3;
2186 {
2187 if (!(((NI) 0) < i)) goto LA25_;
2188 unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
2189 appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_14));
2190 nl__pureZjson_4328(result, ml);
2191 }
2192 LA25_: ;
2193 i += ((NI) 1);
2194 T27_ = (NI)0;
2195 T27_ = newIndent__pureZjson_4323(currIndent, indent, ml);
2196 indent__pureZjson_4320(result, T27_);
2197 escapeJson__pureZjson_4352(key, result);
2198 unsureAsgnRef((void**) (&(*result)), resizeString((*result), 2));
2199 appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_38));
2200 T28_ = (NI)0;
2201 T28_ = newIndent__pureZjson_4323(currIndent, indent, ml);
2202 toPretty__pureZjson_4380(result, val, indent, ml, NIM_FALSE, T28_);
2203 }
2204 LA21_: ;
2205 h = nxt;
2206 } LA17: ;
2207 }
2208 }
2209 LA14_: ;
2210 }
2211 nl__pureZjson_4328(result, ml);
2212 indent__pureZjson_4320(result, currIndent);
2213 unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
2214 appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_18));
2215 }
2216 goto LA6_;
2217 LA9_: ;
2218 {
2219 unsureAsgnRef((void**) (&(*result)), resizeString((*result), 2));
2220 appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_39));
2221 }
2222 LA6_: ;
2223 }
2224 break;
2225 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 4):
2226 {
2227 {
2228 if (!lstArr) goto LA33_;
2229 indent__pureZjson_4320(result, currIndent);
2230 }
2231 LA33_: ;
2232 toUgly__pureZjson_4362(result, node);
2233 }
2234 break;
2235 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 2):
2236 {
2237 {
2238 if (!lstArr) goto LA38_;
2239 indent__pureZjson_4320(result, currIndent);
2240 }
2241 LA38_: ;
2242 addInt__stdZprivateZdigitsutils_167(result, (*node)._kind_2.num);
2243 }
2244 break;
2245 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 3):
2246 {
2247 {
2248 if (!lstArr) goto LA43_;
2249 indent__pureZjson_4320(result, currIndent);
2250 }
2251 LA43_: ;
2252 addFloat__system_3122(result, (*node)._kind_3.fnum);
2253 }
2254 break;
2255 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 1):
2256 {
2257 NimStringDesc* T50_;
2258 {
2259 if (!lstArr) goto LA48_;
2260 indent__pureZjson_4320(result, currIndent);
2261 }
2262 LA48_: ;
2263 T50_ = NIM_NIL;
2264 {
2265 if (!(*node)._kind_4.bval) goto LA53_;
2266 T50_ = copyString(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_19));
2267 }
2268 goto LA51_;
2269 LA53_: ;
2270 {
2271 T50_ = copyString(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_20));
2272 }
2273 LA51_: ;
2274 unsureAsgnRef((void**) (&(*result)), resizeString((*result), (T50_ ? T50_->Sup.len : 0) + 0));
2275 appendString((*result), T50_);
2276 }
2277 break;
2278 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 6):
2279 {
2280 {
2281 if (!lstArr) goto LA59_;
2282 indent__pureZjson_4320(result, currIndent);
2283 }
2284 LA59_: ;
2285 {
2286 NI T63_;
2287 T63_ = ((*node)._kind_7.elems ? (*node)._kind_7.elems->Sup.len : 0);
2288 if (!!((T63_ == ((NI) 0)))) goto LA64_;
2289 unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
2290 appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_13));
2291 nl__pureZjson_4328(result, ml);
2292 {
2293 NI i_2;
2294 NI colontmp__2;
2295 NI T67_;
2296 NI res;
2297 i_2 = (NI)0;
2298 colontmp__2 = (NI)0;
2299 T67_ = ((*node)._kind_7.elems ? (*node)._kind_7.elems->Sup.len : 0);
2300 colontmp__2 = (NI)(T67_ - ((NI) 1));
2301 res = ((NI) 0);
2302 {
2303 while (1) {
2304 NI T74_;
2305 if (!(res <= colontmp__2)) goto LA69;
2306 i_2 = res;
2307 {
2308 if (!(((NI) 0) < i_2)) goto LA72_;
2309 unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
2310 appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_14));
2311 nl__pureZjson_4328(result, ml);
2312 }
2313 LA72_: ;
2314 T74_ = (NI)0;
2315 T74_ = newIndent__pureZjson_4323(currIndent, indent, ml);
2316 toPretty__pureZjson_4380(result, (*node)._kind_7.elems->data[i_2], indent, ml, NIM_TRUE, T74_);
2317 res += ((NI) 1);
2318 } LA69: ;
2319 }
2320 }
2321 nl__pureZjson_4328(result, ml);
2322 indent__pureZjson_4320(result, currIndent);
2323 unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
2324 appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_15));
2325 }
2326 goto LA61_;
2327 LA64_: ;
2328 {
2329 unsureAsgnRef((void**) (&(*result)), resizeString((*result), 2));
2330 appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_40));
2331 }
2332 LA61_: ;
2333 }
2334 break;
2335 case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 0):
2336 {
2337 {
2338 if (!lstArr) goto LA79_;
2339 indent__pureZjson_4320(result, currIndent);
2340 }
2341 LA79_: ;
2342 unsureAsgnRef((void**) (&(*result)), resizeString((*result), 4));
2343 appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_21));
2344 }
2345 break;
2346 }
2347 }
N_NIMCALL(NimStringDesc *,pretty__pureZjson_4461)2348 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, pretty__pureZjson_4461)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* node, NI indent) {
2349 NimStringDesc* result;
2350 result = NIM_NIL;
2351 result = ((NimStringDesc*) NIM_NIL);
2352 toPretty__pureZjson_4380((&result), node, indent, NIM_TRUE, NIM_FALSE, ((NI) 0));
2353 return result;
2354 }
N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q *,percent___pureZjson_1790)2355 N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, percent___pureZjson_1790)(NimStringDesc* s) {
2356 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
2357 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T1_;
2358 NimStringDesc* T2_;
2359 result = NIM_NIL;
2360 T1_ = NIM_NIL;
2361 T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*) newObj((&NTIjsonnode__zfzzuQ8txrdZAYK0WGWpHg_), sizeof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q));
2362 (*T1_).kind = ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 4);
2363 T2_ = NIM_NIL;
2364 T2_ = (*T1_)._kind_1.str; (*T1_)._kind_1.str = copyStringRC1(s);
2365 if (T2_) nimGCunrefNoCycle(T2_);
2366 result = T1_;
2367 return result;
2368 }
N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q *,percent___pureZjson_1816)2369 N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, percent___pureZjson_1816)(NIM_BOOL b) {
2370 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
2371 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T1_;
2372 result = NIM_NIL;
2373 T1_ = NIM_NIL;
2374 T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*) newObj((&NTIjsonnode__zfzzuQ8txrdZAYK0WGWpHg_), sizeof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q));
2375 (*T1_).kind = ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 1);
2376 (*T1_)._kind_4.bval = b;
2377 result = T1_;
2378 return result;
2379 }
N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q *,percent___pureZjson_1800)2380 N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, percent___pureZjson_1800)(NI n) {
2381 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
2382 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T1_;
2383 result = NIM_NIL;
2384 T1_ = NIM_NIL;
2385 T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*) newObj((&NTIjsonnode__zfzzuQ8txrdZAYK0WGWpHg_), sizeof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q));
2386 (*T1_).kind = ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 2);
2387 (*T1_)._kind_2.num = ((NI64) (n));
2388 result = T1_;
2389 return result;
2390 }
N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q *,percent___pureZjson_1819)2391 N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, percent___pureZjson_1819)(tyTuple__jq7X5k7hWG0tdTZTDkiyGQ* keyVals, NI keyValsLen_0) {
2392 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
2393 { result = NIM_NIL;
2394 {
2395 if (!(keyValsLen_0 == ((NI) 0))) goto LA3_;
2396 result = newJArray__pureZjson_123();
2397 goto BeforeRet_;
2398 }
2399 LA3_: ;
2400 result = newJObject__pureZjson_92();
2401 {
2402 NimStringDesc** key;
2403 tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q** val;
2404 NI i;
2405 key = (NimStringDesc**)0;
2406 val = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q**)0;
2407 i = ((NI) 0);
2408 {
2409 while (1) {
2410 if (!(i < keyValsLen_0)) goto LA7;
2411 key = (&keyVals[i].Field0);
2412 val = &keyVals[i].Field1;
2413 X5BX5Deq___pureZjson_287((&(*result)._kind_6.fields), (*key), (*val));
2414 i += ((NI) 1);
2415 } LA7: ;
2416 }
2417 }
2418 }BeforeRet_: ;
2419 return result;
2420 }
N_NIMCALL(void,stdlib_jsonDatInit000)2421 N_LIB_PRIVATE N_NIMCALL(void, stdlib_jsonDatInit000)(void) {
2422 static TNimNode* TM__9b9bytt1stv9cZ8uqII7HFgew_22_7[7];
2423 NI TM__9b9bytt1stv9cZ8uqII7HFgew_24;
2424 static char* NIM_CONST TM__9b9bytt1stv9cZ8uqII7HFgew_23[7] = {
2425 "JNull",
2426 "JBool",
2427 "JInt",
2428 "JFloat",
2429 "JString",
2430 "JObject",
2431 "JArray"};
2432 static TNimNode* TM__9b9bytt1stv9cZ8uqII7HFgew_28_2[2];
2433 static TNimNode* TM__9b9bytt1stv9cZ8uqII7HFgew_29_4[4];
2434 static TNimNode* TM__9b9bytt1stv9cZ8uqII7HFgew_30_4[4];
2435 static TNimNode TM__9b9bytt1stv9cZ8uqII7HFgew_0[28];
2436 NTIjsonnodekind__RUngo7nCHe6O8aBGIcrhtg_.size = sizeof(tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg);
2437 NTIjsonnodekind__RUngo7nCHe6O8aBGIcrhtg_.align = NIM_ALIGNOF(tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg);
2438 NTIjsonnodekind__RUngo7nCHe6O8aBGIcrhtg_.kind = 14;
2439 NTIjsonnodekind__RUngo7nCHe6O8aBGIcrhtg_.base = 0;
2440 NTIjsonnodekind__RUngo7nCHe6O8aBGIcrhtg_.flags = 3;
2441 for (TM__9b9bytt1stv9cZ8uqII7HFgew_24 = 0; TM__9b9bytt1stv9cZ8uqII7HFgew_24 < 7; TM__9b9bytt1stv9cZ8uqII7HFgew_24++) {
2442 TM__9b9bytt1stv9cZ8uqII7HFgew_0[TM__9b9bytt1stv9cZ8uqII7HFgew_24+0].kind = 1;
2443 TM__9b9bytt1stv9cZ8uqII7HFgew_0[TM__9b9bytt1stv9cZ8uqII7HFgew_24+0].offset = TM__9b9bytt1stv9cZ8uqII7HFgew_24;
2444 TM__9b9bytt1stv9cZ8uqII7HFgew_0[TM__9b9bytt1stv9cZ8uqII7HFgew_24+0].name = TM__9b9bytt1stv9cZ8uqII7HFgew_23[TM__9b9bytt1stv9cZ8uqII7HFgew_24];
2445 TM__9b9bytt1stv9cZ8uqII7HFgew_22_7[TM__9b9bytt1stv9cZ8uqII7HFgew_24] = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[TM__9b9bytt1stv9cZ8uqII7HFgew_24+0];
2446 }
2447 TM__9b9bytt1stv9cZ8uqII7HFgew_0[7].len = 7; TM__9b9bytt1stv9cZ8uqII7HFgew_0[7].kind = 2; TM__9b9bytt1stv9cZ8uqII7HFgew_0[7].sons = &TM__9b9bytt1stv9cZ8uqII7HFgew_22_7[0];
2448 NTIjsonnodekind__RUngo7nCHe6O8aBGIcrhtg_.node = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[7];
2449 NTIjsonnodeobj__df9bshXB7C9cTiWPIOtX3j1Q_.size = sizeof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q);
2450 NTIjsonnodeobj__df9bshXB7C9cTiWPIOtX3j1Q_.align = NIM_ALIGNOF(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q);
2451 NTIjsonnodeobj__df9bshXB7C9cTiWPIOtX3j1Q_.kind = 18;
2452 NTIjsonnodeobj__df9bshXB7C9cTiWPIOtX3j1Q_.base = 0;
2453 NTIjsonnodeobj__df9bshXB7C9cTiWPIOtX3j1Q_.flags = 2;
2454 TM__9b9bytt1stv9cZ8uqII7HFgew_28_2[0] = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[9];
2455 TM__9b9bytt1stv9cZ8uqII7HFgew_0[9].kind = 1;
2456 TM__9b9bytt1stv9cZ8uqII7HFgew_0[9].offset = offsetof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q, isUnquoted);
2457 TM__9b9bytt1stv9cZ8uqII7HFgew_0[9].typ = (&NTIbool__VaVACK0bpYmqIQ0mKcHfQQ_);
2458 TM__9b9bytt1stv9cZ8uqII7HFgew_0[9].name = "isUnquoted";
2459 TM__9b9bytt1stv9cZ8uqII7HFgew_28_2[1] = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[10];
2460 TM__9b9bytt1stv9cZ8uqII7HFgew_0[10].kind = 3;
2461 TM__9b9bytt1stv9cZ8uqII7HFgew_0[10].offset = offsetof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q, kind);
2462 TM__9b9bytt1stv9cZ8uqII7HFgew_0[10].typ = (&NTIjsonnodekind__RUngo7nCHe6O8aBGIcrhtg_);
2463 TM__9b9bytt1stv9cZ8uqII7HFgew_0[10].name = "kind";
2464 TM__9b9bytt1stv9cZ8uqII7HFgew_0[10].sons = &NimDT___df9bshXB7C9cTiWPIOtX3j1Q_kind[0];
2465 TM__9b9bytt1stv9cZ8uqII7HFgew_0[10].len = 7;
2466 TM__9b9bytt1stv9cZ8uqII7HFgew_0[11].kind = 1;
2467 TM__9b9bytt1stv9cZ8uqII7HFgew_0[11].offset = offsetof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q, _kind_1.str);
2468 TM__9b9bytt1stv9cZ8uqII7HFgew_0[11].typ = (&NTIstring__77mFvmsOLKik79ci2hXkHEg_);
2469 TM__9b9bytt1stv9cZ8uqII7HFgew_0[11].name = "str";
2470 NimDT___df9bshXB7C9cTiWPIOtX3j1Q_kind[4] = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[11];
2471 TM__9b9bytt1stv9cZ8uqII7HFgew_0[12].kind = 1;
2472 TM__9b9bytt1stv9cZ8uqII7HFgew_0[12].offset = offsetof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q, _kind_2.num);
2473 TM__9b9bytt1stv9cZ8uqII7HFgew_0[12].typ = (&NTIbiggestint__Aav8dQoMlCFnZRxA0IhTHQ_);
2474 TM__9b9bytt1stv9cZ8uqII7HFgew_0[12].name = "num";
2475 NimDT___df9bshXB7C9cTiWPIOtX3j1Q_kind[2] = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[12];
2476 TM__9b9bytt1stv9cZ8uqII7HFgew_0[13].kind = 1;
2477 TM__9b9bytt1stv9cZ8uqII7HFgew_0[13].offset = offsetof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q, _kind_3.fnum);
2478 TM__9b9bytt1stv9cZ8uqII7HFgew_0[13].typ = (&NTIfloat__w9bl9a1ul9ctRJWiMl9cNnIMvg_);
2479 TM__9b9bytt1stv9cZ8uqII7HFgew_0[13].name = "fnum";
2480 NimDT___df9bshXB7C9cTiWPIOtX3j1Q_kind[3] = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[13];
2481 TM__9b9bytt1stv9cZ8uqII7HFgew_0[14].kind = 1;
2482 TM__9b9bytt1stv9cZ8uqII7HFgew_0[14].offset = offsetof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q, _kind_4.bval);
2483 TM__9b9bytt1stv9cZ8uqII7HFgew_0[14].typ = (&NTIbool__VaVACK0bpYmqIQ0mKcHfQQ_);
2484 TM__9b9bytt1stv9cZ8uqII7HFgew_0[14].name = "bval";
2485 NimDT___df9bshXB7C9cTiWPIOtX3j1Q_kind[1] = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[14];
2486 TM__9b9bytt1stv9cZ8uqII7HFgew_0[15].len = 0; TM__9b9bytt1stv9cZ8uqII7HFgew_0[15].kind = 2;
2487 NimDT___df9bshXB7C9cTiWPIOtX3j1Q_kind[0] = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[15];
2488 NTIorderedtable__ZZvSdVkA2s2sIyifu4cpkg_.size = sizeof(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg);
2489 NTIorderedtable__ZZvSdVkA2s2sIyifu4cpkg_.align = NIM_ALIGNOF(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg);
2490 NTIorderedtable__ZZvSdVkA2s2sIyifu4cpkg_.kind = 18;
2491 NTIorderedtable__ZZvSdVkA2s2sIyifu4cpkg_.base = 0;
2492 TM__9b9bytt1stv9cZ8uqII7HFgew_29_4[0] = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[18];
2493 NTIorderedkeyvaluepair__awOivLjlO76sGdHY7nQUjQ_.size = sizeof(tyTuple__awOivLjlO76sGdHY7nQUjQ);
2494 NTIorderedkeyvaluepair__awOivLjlO76sGdHY7nQUjQ_.align = NIM_ALIGNOF(tyTuple__awOivLjlO76sGdHY7nQUjQ);
2495 NTIorderedkeyvaluepair__awOivLjlO76sGdHY7nQUjQ_.kind = 18;
2496 NTIorderedkeyvaluepair__awOivLjlO76sGdHY7nQUjQ_.base = 0;
2497 TM__9b9bytt1stv9cZ8uqII7HFgew_30_4[0] = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[20];
2498 TM__9b9bytt1stv9cZ8uqII7HFgew_0[20].kind = 1;
2499 TM__9b9bytt1stv9cZ8uqII7HFgew_0[20].offset = offsetof(tyTuple__awOivLjlO76sGdHY7nQUjQ, Field0);
2500 TM__9b9bytt1stv9cZ8uqII7HFgew_0[20].typ = (&NTIint__rR5Bzr1D5krxoo1NcNyeMA_);
2501 TM__9b9bytt1stv9cZ8uqII7HFgew_0[20].name = "Field0";
2502 TM__9b9bytt1stv9cZ8uqII7HFgew_30_4[1] = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[21];
2503 TM__9b9bytt1stv9cZ8uqII7HFgew_0[21].kind = 1;
2504 TM__9b9bytt1stv9cZ8uqII7HFgew_0[21].offset = offsetof(tyTuple__awOivLjlO76sGdHY7nQUjQ, Field1);
2505 TM__9b9bytt1stv9cZ8uqII7HFgew_0[21].typ = (&NTIint__rR5Bzr1D5krxoo1NcNyeMA_);
2506 TM__9b9bytt1stv9cZ8uqII7HFgew_0[21].name = "Field1";
2507 TM__9b9bytt1stv9cZ8uqII7HFgew_30_4[2] = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[22];
2508 TM__9b9bytt1stv9cZ8uqII7HFgew_0[22].kind = 1;
2509 TM__9b9bytt1stv9cZ8uqII7HFgew_0[22].offset = offsetof(tyTuple__awOivLjlO76sGdHY7nQUjQ, Field2);
2510 TM__9b9bytt1stv9cZ8uqII7HFgew_0[22].typ = (&NTIstring__77mFvmsOLKik79ci2hXkHEg_);
2511 TM__9b9bytt1stv9cZ8uqII7HFgew_0[22].name = "Field2";
2512 TM__9b9bytt1stv9cZ8uqII7HFgew_30_4[3] = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[23];
2513 TM__9b9bytt1stv9cZ8uqII7HFgew_0[23].kind = 1;
2514 TM__9b9bytt1stv9cZ8uqII7HFgew_0[23].offset = offsetof(tyTuple__awOivLjlO76sGdHY7nQUjQ, Field3);
2515 TM__9b9bytt1stv9cZ8uqII7HFgew_0[23].typ = (&NTIjsonnode__zfzzuQ8txrdZAYK0WGWpHg_);
2516 TM__9b9bytt1stv9cZ8uqII7HFgew_0[23].name = "Field3";
2517 TM__9b9bytt1stv9cZ8uqII7HFgew_0[19].len = 4; TM__9b9bytt1stv9cZ8uqII7HFgew_0[19].kind = 2; TM__9b9bytt1stv9cZ8uqII7HFgew_0[19].sons = &TM__9b9bytt1stv9cZ8uqII7HFgew_30_4[0];
2518 NTIorderedkeyvaluepair__awOivLjlO76sGdHY7nQUjQ_.node = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[19];
2519 NTIorderedkeyvaluepairseq__MlAD6nAPq9bHKla9cWiIZP0g_.size = sizeof(tySequence__MlAD6nAPq9bHKla9cWiIZP0g*);
2520 NTIorderedkeyvaluepairseq__MlAD6nAPq9bHKla9cWiIZP0g_.align = NIM_ALIGNOF(tySequence__MlAD6nAPq9bHKla9cWiIZP0g*);
2521 NTIorderedkeyvaluepairseq__MlAD6nAPq9bHKla9cWiIZP0g_.kind = 24;
2522 NTIorderedkeyvaluepairseq__MlAD6nAPq9bHKla9cWiIZP0g_.base = (&NTIorderedkeyvaluepair__awOivLjlO76sGdHY7nQUjQ_);
2523 NTIorderedkeyvaluepairseq__MlAD6nAPq9bHKla9cWiIZP0g_.marker = Marker_tySequence__MlAD6nAPq9bHKla9cWiIZP0g;
2524 TM__9b9bytt1stv9cZ8uqII7HFgew_0[18].kind = 1;
2525 TM__9b9bytt1stv9cZ8uqII7HFgew_0[18].offset = offsetof(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg, data);
2526 TM__9b9bytt1stv9cZ8uqII7HFgew_0[18].typ = (&NTIorderedkeyvaluepairseq__MlAD6nAPq9bHKla9cWiIZP0g_);
2527 TM__9b9bytt1stv9cZ8uqII7HFgew_0[18].name = "data";
2528 TM__9b9bytt1stv9cZ8uqII7HFgew_29_4[1] = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[24];
2529 TM__9b9bytt1stv9cZ8uqII7HFgew_0[24].kind = 1;
2530 TM__9b9bytt1stv9cZ8uqII7HFgew_0[24].offset = offsetof(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg, counter);
2531 TM__9b9bytt1stv9cZ8uqII7HFgew_0[24].typ = (&NTIint__rR5Bzr1D5krxoo1NcNyeMA_);
2532 TM__9b9bytt1stv9cZ8uqII7HFgew_0[24].name = "counter";
2533 TM__9b9bytt1stv9cZ8uqII7HFgew_29_4[2] = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[25];
2534 TM__9b9bytt1stv9cZ8uqII7HFgew_0[25].kind = 1;
2535 TM__9b9bytt1stv9cZ8uqII7HFgew_0[25].offset = offsetof(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg, first);
2536 TM__9b9bytt1stv9cZ8uqII7HFgew_0[25].typ = (&NTIint__rR5Bzr1D5krxoo1NcNyeMA_);
2537 TM__9b9bytt1stv9cZ8uqII7HFgew_0[25].name = "first";
2538 TM__9b9bytt1stv9cZ8uqII7HFgew_29_4[3] = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[26];
2539 TM__9b9bytt1stv9cZ8uqII7HFgew_0[26].kind = 1;
2540 TM__9b9bytt1stv9cZ8uqII7HFgew_0[26].offset = offsetof(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg, last);
2541 TM__9b9bytt1stv9cZ8uqII7HFgew_0[26].typ = (&NTIint__rR5Bzr1D5krxoo1NcNyeMA_);
2542 TM__9b9bytt1stv9cZ8uqII7HFgew_0[26].name = "last";
2543 TM__9b9bytt1stv9cZ8uqII7HFgew_0[17].len = 4; TM__9b9bytt1stv9cZ8uqII7HFgew_0[17].kind = 2; TM__9b9bytt1stv9cZ8uqII7HFgew_0[17].sons = &TM__9b9bytt1stv9cZ8uqII7HFgew_29_4[0];
2544 NTIorderedtable__ZZvSdVkA2s2sIyifu4cpkg_.node = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[17];
2545 TM__9b9bytt1stv9cZ8uqII7HFgew_0[16].kind = 1;
2546 TM__9b9bytt1stv9cZ8uqII7HFgew_0[16].offset = offsetof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q, _kind_6.fields);
2547 TM__9b9bytt1stv9cZ8uqII7HFgew_0[16].typ = (&NTIorderedtable__ZZvSdVkA2s2sIyifu4cpkg_);
2548 TM__9b9bytt1stv9cZ8uqII7HFgew_0[16].name = "fields";
2549 NimDT___df9bshXB7C9cTiWPIOtX3j1Q_kind[5] = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[16];
2550 TM__9b9bytt1stv9cZ8uqII7HFgew_0[27].kind = 1;
2551 TM__9b9bytt1stv9cZ8uqII7HFgew_0[27].offset = offsetof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q, _kind_7.elems);
2552 TM__9b9bytt1stv9cZ8uqII7HFgew_0[27].typ = (&NTIseqLjsonnodeT__oLpBKXzW3hF9aCVMo5EymfQ_);
2553 TM__9b9bytt1stv9cZ8uqII7HFgew_0[27].name = "elems";
2554 NimDT___df9bshXB7C9cTiWPIOtX3j1Q_kind[6] = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[27];
2555 TM__9b9bytt1stv9cZ8uqII7HFgew_0[8].len = 2; TM__9b9bytt1stv9cZ8uqII7HFgew_0[8].kind = 2; TM__9b9bytt1stv9cZ8uqII7HFgew_0[8].sons = &TM__9b9bytt1stv9cZ8uqII7HFgew_28_2[0];
2556 NTIjsonnodeobj__df9bshXB7C9cTiWPIOtX3j1Q_.node = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[8];
2557 NTIjsonnode__zfzzuQ8txrdZAYK0WGWpHg_.size = sizeof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*);
2558 NTIjsonnode__zfzzuQ8txrdZAYK0WGWpHg_.align = NIM_ALIGNOF(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*);
2559 NTIjsonnode__zfzzuQ8txrdZAYK0WGWpHg_.kind = 22;
2560 NTIjsonnode__zfzzuQ8txrdZAYK0WGWpHg_.base = (&NTIjsonnodeobj__df9bshXB7C9cTiWPIOtX3j1Q_);
2561 NTIjsonnode__zfzzuQ8txrdZAYK0WGWpHg_.marker = Marker_tyRef__zfzzuQ8txrdZAYK0WGWpHg;
2562 NTIseqLjsonnodeT__oLpBKXzW3hF9aCVMo5EymfQ_.size = sizeof(tySequence__oLpBKXzW3hF9aCVMo5EymfQ*);
2563 NTIseqLjsonnodeT__oLpBKXzW3hF9aCVMo5EymfQ_.align = NIM_ALIGNOF(tySequence__oLpBKXzW3hF9aCVMo5EymfQ*);
2564 NTIseqLjsonnodeT__oLpBKXzW3hF9aCVMo5EymfQ_.kind = 24;
2565 NTIseqLjsonnodeT__oLpBKXzW3hF9aCVMo5EymfQ_.base = (&NTIjsonnode__zfzzuQ8txrdZAYK0WGWpHg_);
2566 NTIseqLjsonnodeT__oLpBKXzW3hF9aCVMo5EymfQ_.marker = Marker_tySequence__oLpBKXzW3hF9aCVMo5EymfQ;
2567 }
2568
2569