File: %40msuggestsymdb.nim.c

package info (click to toggle)
nim 2.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,911,644 kB
  • sloc: sh: 24,603; ansic: 1,761; python: 1,492; makefile: 1,013; sql: 298; asm: 141; xml: 13
file content (245 lines) | stat: -rw-r--r-- 10,557 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
/* Generated by Nim Compiler v2.2.0 */
#define NIM_INTBITS 32
#define NIM_EmulateOverflowChecks

#include "nimbase.h"
#include <string.h>
#undef LANGUAGE_C
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef linux
#undef mips
#undef near
#undef far
#undef powerpc
#undef unix
typedef struct tySequence__9aCujOg9b8Xgx9aYJJEMRHVwg tySequence__9aCujOg9b8Xgx9aYJJEMRHVwg;
typedef struct tySequence__9aCujOg9b8Xgx9aYJJEMRHVwg_Content tySequence__9aCujOg9b8Xgx9aYJJEMRHVwg_Content;
typedef struct tyObject_TinyLineInfo__qW2GTIPjeOQ42q9c2MPWLLA tyObject_TinyLineInfo__qW2GTIPjeOQ42q9c2MPWLLA;
typedef struct tySequence__yUWoZehF86MIc40opFgacw tySequence__yUWoZehF86MIc40opFgacw;
typedef struct tySequence__yUWoZehF86MIc40opFgacw_Content tySequence__yUWoZehF86MIc40opFgacw_Content;
typedef struct tySequence__d8ZV4IMgHt9biik9cS9a0hrmg tySequence__d8ZV4IMgHt9biik9cS9a0hrmg;
typedef struct tySequence__d8ZV4IMgHt9biik9cS9a0hrmg_Content tySequence__d8ZV4IMgHt9biik9cS9a0hrmg_Content;
typedef struct tyObject_SuggestFileSymbolDatabase__o0ahEzaLn5a7TdNqH4OVqQ tyObject_SuggestFileSymbolDatabase__o0ahEzaLn5a7TdNqH4OVqQ;
typedef struct tySequence__ZCZaCk14bTmSb6LMW9aWPVA tySequence__ZCZaCk14bTmSb6LMW9aWPVA;
typedef struct tySequence__ZCZaCk14bTmSb6LMW9aWPVA_Content tySequence__ZCZaCk14bTmSb6LMW9aWPVA_Content;
typedef struct tyObject_PackedBoolArray__1pk9boftqWMNDE1oh5HcIhw tyObject_PackedBoolArray__1pk9boftqWMNDE1oh5HcIhw;
typedef struct tyObject_PackedSet__uMCH0vzAEgrsmOKwCWxFrA tyObject_PackedSet__uMCH0vzAEgrsmOKwCWxFrA;
typedef struct tyObject_TrunkcolonObjectType___lmbdIZwAo9agPlTE1wBREkA tyObject_TrunkcolonObjectType___lmbdIZwAo9agPlTE1wBREkA;
typedef struct tySequence__ZeWVlH6DqG79b1pTDhrrUYA tySequence__ZeWVlH6DqG79b1pTDhrrUYA;
typedef struct tySequence__ZeWVlH6DqG79b1pTDhrrUYA_Content tySequence__ZeWVlH6DqG79b1pTDhrrUYA_Content;
typedef struct tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A;
typedef struct tyObject_TType__8qAQZfpTDk89aeclTNn4d9cg tyObject_TType__8qAQZfpTDk89aeclTNn4d9cg;
typedef struct tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg;
struct tySequence__9aCujOg9b8Xgx9aYJJEMRHVwg {
  NI len; tySequence__9aCujOg9b8Xgx9aYJJEMRHVwg_Content* p;
};
struct tyObject_TinyLineInfo__qW2GTIPjeOQ42q9c2MPWLLA {
	NU16 line;
	NI16 col;
};
struct tySequence__yUWoZehF86MIc40opFgacw {
  NI len; tySequence__yUWoZehF86MIc40opFgacw_Content* p;
};
struct tySequence__d8ZV4IMgHt9biik9cS9a0hrmg {
  NI len; tySequence__d8ZV4IMgHt9biik9cS9a0hrmg_Content* p;
};
struct tySequence__ZCZaCk14bTmSb6LMW9aWPVA {
  NI len; tySequence__ZCZaCk14bTmSb6LMW9aWPVA_Content* p;
};
struct tySequence__ZeWVlH6DqG79b1pTDhrrUYA {
  NI len; tySequence__ZeWVlH6DqG79b1pTDhrrUYA_Content* p;
};
typedef NI tyArray__emiAJ8okywrJw7ZHLzlXbQ[34];
struct tyObject_PackedSet__uMCH0vzAEgrsmOKwCWxFrA {
	NI elems;
	NI counter;
	NI max;
	tyObject_TrunkcolonObjectType___lmbdIZwAo9agPlTE1wBREkA* head;
	tySequence__ZeWVlH6DqG79b1pTDhrrUYA data;
	tyArray__emiAJ8okywrJw7ZHLzlXbQ a;
};
struct tyObject_PackedBoolArray__1pk9boftqWMNDE1oh5HcIhw {
	tyObject_PackedSet__uMCH0vzAEgrsmOKwCWxFrA s;
	NI len;
};
struct tyObject_SuggestFileSymbolDatabase__o0ahEzaLn5a7TdNqH4OVqQ {
	tySequence__9aCujOg9b8Xgx9aYJJEMRHVwg lineInfo;
	tySequence__ZCZaCk14bTmSb6LMW9aWPVA sym;
	tySequence__yUWoZehF86MIc40opFgacw caughtExceptions;
	tyObject_PackedBoolArray__1pk9boftqWMNDE1oh5HcIhw caughtExceptionsSet;
	tyObject_PackedBoolArray__1pk9boftqWMNDE1oh5HcIhw isDecl;
	NI32 fileIndex;
	NIM_BOOL trackCaughtExceptions;
	NIM_BOOL isSorted;
};
struct tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A {
	NI rc;
	NI rootIdx;
};
struct tySequence__9aCujOg9b8Xgx9aYJJEMRHVwg_Content { NI cap; tyObject_TinyLineInfo__qW2GTIPjeOQ42q9c2MPWLLA data[SEQ_DECL_SIZE]; };
struct tySequence__yUWoZehF86MIc40opFgacw_Content { NI cap; tySequence__d8ZV4IMgHt9biik9cS9a0hrmg data[SEQ_DECL_SIZE]; };
struct tySequence__d8ZV4IMgHt9biik9cS9a0hrmg_Content { NI cap; tyObject_TType__8qAQZfpTDk89aeclTNn4d9cg* data[SEQ_DECL_SIZE]; };
struct tySequence__ZCZaCk14bTmSb6LMW9aWPVA_Content { NI cap; tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg* data[SEQ_DECL_SIZE]; };
struct tySequence__ZeWVlH6DqG79b1pTDhrrUYA_Content { NI cap; tyObject_TrunkcolonObjectType___lmbdIZwAo9agPlTE1wBREkA* data[SEQ_DECL_SIZE]; };
typedef NU tyArray__cC4ce9cdvDKtIpar5g9cDejA[16];
struct tyObject_TrunkcolonObjectType___lmbdIZwAo9agPlTE1wBREkA {
	tyObject_TrunkcolonObjectType___lmbdIZwAo9agPlTE1wBREkA* next;
	NI key;
	tyArray__cC4ce9cdvDKtIpar5g9cDejA bits;
};
N_LIB_PRIVATE N_NIMCALL(void, alignedDealloc)(void* p_p0, NI align_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___ast_u3284)(tySequence__d8ZV4IMgHt9biik9cS9a0hrmg dest_p0);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___suggestsymdb_u660)(tySequence__9aCujOg9b8Xgx9aYJJEMRHVwg dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___ast_u4820)(tySequence__ZCZaCk14bTmSb6LMW9aWPVA dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___suggestsymdb_u785)(tySequence__yUWoZehF86MIc40opFgacw dest_p0);
static N_INLINE(NIM_BOOL, nimDecRefIsLastDyn)(void* p_p0);
static N_INLINE(NI, minuspercent___system_u799)(NI x_p0, NI y_p1);
N_LIB_PRIVATE N_NIMCALL(void, unregisterCycle__system_u3037)(tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A* s_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZcollectionsZintsets_u60)(tyObject_TrunkcolonObjectType___lmbdIZwAo9agPlTE1wBREkA* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, nimRawDispose)(void* p_p0, NI alignment_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZcollectionsZintsets_u94)(tySequence__ZeWVlH6DqG79b1pTDhrrUYA dest_p0);
static N_INLINE(void, nimZeroMem)(void* p_p0, NI size_p1);
static N_INLINE(void, nimSetMem__systemZmemory_u7)(void* a_p0, int v_p1, NI size_p2);
extern NIM_BOOL nimInErrorMode__system_u4274;
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___suggestsymdb_u660)(tySequence__9aCujOg9b8Xgx9aYJJEMRHVwg dest_p0) {
	if (dest_p0.p && !(dest_p0.p->cap & NIM_STRLIT_FLAG)) {
 alignedDealloc(dest_p0.p, NIM_ALIGNOF(tyObject_TinyLineInfo__qW2GTIPjeOQ42q9c2MPWLLA));
}
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
	NIM_BOOL* result;
	result = (&nimInErrorMode__system_u4274);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___suggestsymdb_u785)(tySequence__yUWoZehF86MIc40opFgacw dest_p0) {
	NI colontmp_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	colontmp_ = ((NI)0);
	{
		while (1) {
			NI T3_;
			T3_ = dest_p0.len;
			if (!(colontmp_ < T3_)) goto LA2;
			eqdestroy___ast_u3284(dest_p0.p->data[colontmp_]);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			colontmp_ += ((NI)1);
		} LA2: ;
	}
	if (dest_p0.p && !(dest_p0.p->cap & NIM_STRLIT_FLAG)) {
 alignedDealloc(dest_p0.p, NIM_ALIGNOF(tySequence__d8ZV4IMgHt9biik9cS9a0hrmg));
}
	}BeforeRet_: ;
}
static N_INLINE(NI, minuspercent___system_u799)(NI x_p0, NI y_p1) {
	NI result;
	result = ((NI) ((NU)((NU32)(((NU) (x_p0))) - (NU32)(((NU) (y_p1))))));
	return result;
}
static N_INLINE(NIM_BOOL, nimDecRefIsLastDyn)(void* p_p0) {
	NIM_BOOL result;
	result = (NIM_BOOL)0;
	{
		tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A* cell;
		NI T5_;
		if (!!((p_p0 == NIM_NIL))) goto LA3_;
		T5_ = (NI)0;
		T5_ = minuspercent___system_u799(((NI) (ptrdiff_t) (p_p0)), ((NI)8));
		cell = ((tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A*) (T5_));
		{
			if (!((NI)((*cell).rc & ((NI)-16)) == ((NI)0))) goto LA8_;
			result = NIM_TRUE;
		}
		goto LA6_;
LA8_: ;
		{
			(*cell).rc -= ((NI)16);
		}
LA6_: ;
		{
			if (!result) goto LA13_;
			{
				if (!(((NI)0) < (*cell).rootIdx)) goto LA17_;
				unregisterCycle__system_u3037(cell);
			}
LA17_: ;
		}
LA13_: ;
	}
LA3_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___suggestsymdb_u1026)(tyObject_SuggestFileSymbolDatabase__o0ahEzaLn5a7TdNqH4OVqQ* dest_p0) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	eqdestroy___suggestsymdb_u660((*dest_p0).lineInfo);
	eqdestroy___ast_u4820((*dest_p0).sym);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	eqdestroy___suggestsymdb_u785((*dest_p0).caughtExceptions);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = nimDecRefIsLastDyn((*dest_p0).caughtExceptionsSet.s.head);
		if (!T3_) goto LA4_;
		eqdestroy___pureZcollectionsZintsets_u60((&(*(*dest_p0).caughtExceptionsSet.s.head)));
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		nimRawDispose((*dest_p0).caughtExceptionsSet.s.head, ((NI)4));
	}
LA4_: ;
	eqdestroy___pureZcollectionsZintsets_u94((*dest_p0).caughtExceptionsSet.s.data);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	{
		NIM_BOOL T8_;
		T8_ = (NIM_BOOL)0;
		T8_ = nimDecRefIsLastDyn((*dest_p0).isDecl.s.head);
		if (!T8_) goto LA9_;
		eqdestroy___pureZcollectionsZintsets_u60((&(*(*dest_p0).isDecl.s.head)));
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		nimRawDispose((*dest_p0).isDecl.s.head, ((NI)4));
	}
LA9_: ;
	eqdestroy___pureZcollectionsZintsets_u94((*dest_p0).isDecl.s.data);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
}
static N_INLINE(void, nimSetMem__systemZmemory_u7)(void* a_p0, int v_p1, NI size_p2) {
	void* T1_;
	T1_ = (void*)0;
	T1_ = memset(a_p0, v_p1, ((size_t) (size_p2)));
}
static N_INLINE(void, nimZeroMem)(void* p_p0, NI size_p1) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	nimSetMem__systemZmemory_u7(p_p0, ((int)0), size_p1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___suggestsymdb_u1023)(tyObject_SuggestFileSymbolDatabase__o0ahEzaLn5a7TdNqH4OVqQ* dest_p0) {
	(*dest_p0).lineInfo.len = 0; (*dest_p0).lineInfo.p = NIM_NIL;
	(*dest_p0).sym.len = 0; (*dest_p0).sym.p = NIM_NIL;
	(*dest_p0).caughtExceptions.len = 0; (*dest_p0).caughtExceptions.p = NIM_NIL;
	(*dest_p0).caughtExceptionsSet.s.elems = 0;
	(*dest_p0).caughtExceptionsSet.s.counter = 0;
	(*dest_p0).caughtExceptionsSet.s.max = 0;
	(*dest_p0).caughtExceptionsSet.s.head = 0;
	(*dest_p0).caughtExceptionsSet.s.data.len = 0; (*dest_p0).caughtExceptionsSet.s.data.p = NIM_NIL;
	nimZeroMem((void*)(*dest_p0).caughtExceptionsSet.s.a, sizeof(tyArray__emiAJ8okywrJw7ZHLzlXbQ));
	(*dest_p0).caughtExceptionsSet.len = 0;
	(*dest_p0).isDecl.s.elems = 0;
	(*dest_p0).isDecl.s.counter = 0;
	(*dest_p0).isDecl.s.max = 0;
	(*dest_p0).isDecl.s.head = 0;
	(*dest_p0).isDecl.s.data.len = 0; (*dest_p0).isDecl.s.data.p = NIM_NIL;
	nimZeroMem((void*)(*dest_p0).isDecl.s.a, sizeof(tyArray__emiAJ8okywrJw7ZHLzlXbQ));
	(*dest_p0).isDecl.len = 0;
	(*dest_p0).fileIndex = 0;
	(*dest_p0).trackCaughtExceptions = 0;
	(*dest_p0).isSorted = 0;
}