Esempio n. 1
0
N_NIMCALL(void, append_118042)(tlinkedlist118023* list, tlistentry118017* entry) {
	nimfr("append", "lists.nim")
	nimln(33, "lists.nim");
	(*list).Counter = addInt((*list).Counter, 1);
	nimln(34, "lists.nim");
	asgnRef((void**) &(*entry).Next, NIM_NIL);
	nimln(35, "lists.nim");
	asgnRef((void**) &(*entry).Prev, (*list).Tail);
	nimln(36, "lists.nim");
	{
		nimln(36, "lists.nim");
		nimln(36, "lists.nim");
		if (!!(((*list).Tail == NIM_NIL))) goto LA3;
		nimln(37, "lists.nim");
		{
			nimln(37, "lists.nim");
			nimln(37, "lists.nim");
			if (!!(((*(*list).Tail).Next == NIM_NIL))) goto LA7;
			nimln(37, "lists.nim");
			failedassertimpl_80421(((NimStringDesc*) &TMP260));
		}
		LA7: ;
		nimln(38, "lists.nim");
		asgnRef((void**) &(*(*list).Tail).Next, entry);
	}
	LA3: ;
	nimln(39, "lists.nim");
	unsureAsgnRef((void**) &(*list).Tail, entry);
	nimln(40, "lists.nim");
	{
		nimln(40, "lists.nim");
		if (!((*list).Head == NIM_NIL)) goto LA11;
		nimln(40, "lists.nim");
		unsureAsgnRef((void**) &(*list).Head, entry);
	}
	LA11: ;
	popFrame();
}
Esempio n. 2
0
N_NIMCALL(void, prepend_118300)(tlinkedlist118023* list, tlistentry118017* entry) {
	nimfr("prepend", "lists.nim")
	nimln(61, "lists.nim");
	(*list).Counter = addInt((*list).Counter, 1);
	nimln(62, "lists.nim");
	asgnRef((void**) &(*entry).Prev, NIM_NIL);
	nimln(63, "lists.nim");
	asgnRef((void**) &(*entry).Next, (*list).Head);
	nimln(64, "lists.nim");
	{
		nimln(64, "lists.nim");
		nimln(64, "lists.nim");
		if (!!(((*list).Head == NIM_NIL))) goto LA3;
		nimln(65, "lists.nim");
		{
			nimln(65, "lists.nim");
			nimln(65, "lists.nim");
			if (!!(((*(*list).Head).Prev == NIM_NIL))) goto LA7;
			nimln(65, "lists.nim");
			failedassertimpl_80421(((NimStringDesc*) &TMP264));
		}
		LA7: ;
		nimln(66, "lists.nim");
		asgnRef((void**) &(*(*list).Head).Prev, entry);
	}
	LA3: ;
	nimln(67, "lists.nim");
	unsureAsgnRef((void**) &(*list).Head, entry);
	nimln(68, "lists.nim");
	{
		nimln(68, "lists.nim");
		if (!((*list).Tail == NIM_NIL)) goto LA11;
		nimln(68, "lists.nim");
		unsureAsgnRef((void**) &(*list).Tail, entry);
	}
	LA11: ;
	popFrame();
}
N_NIMCALL(void, remove_147633_3771138726)(Tlinkedlist147013* list0, Tlistentry147007* entry0) {
	(*list0).counter -= ((NI) 1);
	{
		if (!(entry0 == (*list0).tail)) goto LA3;
		unsureAsgnRef((void**) (&(*list0).tail), (*entry0).prev);
	}
	LA3: ;
	{
		if (!(entry0 == (*list0).head)) goto LA7;
		unsureAsgnRef((void**) (&(*list0).head), (*entry0).next);
	}
	LA7: ;
	{
		if (!!(((*entry0).next == NIM_NIL))) goto LA11;
		asgnRef((void**) (&(*(*entry0).next).prev), (*entry0).prev);
	}
	LA11: ;
	{
		if (!!(((*entry0).prev == NIM_NIL))) goto LA15;
		asgnRef((void**) (&(*(*entry0).prev).next), (*entry0).next);
	}
	LA15: ;
}
Esempio n. 4
0
N_NIMCALL(void, openbaselexer_179035)(Tbaselexer179024* L, Tllstream178204* inputstream, NI buflen) {
	void* LOC1;
	(*L).bufpos = ((NI) 0);
	(*L).buflen = buflen;
	LOC1 = 0;
	LOC1 = alloc_6001(((NI) ((NI)(buflen * ((NI) 1)))));
	(*L).buf = ((NCSTRING) (LOC1));
	(*L).sentinel = (NI)(buflen - ((NI) 1));
	(*L).linestart = ((NI) 0);
	(*L).linenumber = ((NI) 1);
	unsureAsgnRef((void**) (&(*L).stream), inputstream);
	fillbuffer_179097(L);
	skiputf8bom_180416(L);
}
Esempio n. 5
0
N_NIMCALL(void, open_245040)(Baselexer245024* L, Streamobj137027* input, NI buflen) {
	void* LOC1;
	unsureAsgnRef((void**) (&(*L).input), input);
	(*L).bufpos = ((NI) 0);
	(*L).buflen = buflen;
	LOC1 = 0;
	LOC1 = alloc_6001(((NI) ((NI)(buflen * ((NI) 1)))));
	(*L).buf = ((NCSTRING) (LOC1));
	(*L).sentinel = (NI)(buflen - ((NI) 1));
	(*L).linestart = ((NI) 0);
	(*L).linenumber = ((NI) 1);
	fillbuffer_245102(L);
	skiputf8bom_246416(L);
}
N_NIMCALL(void, openbaselexer_284023_4037054349)(Tbaselexer284015* L0, Tllstream283204* inputstream0, NI buflen0) {
	void* LOC1;
	(*L0).bufpos = ((NI) 0);
	(*L0).buflen = buflen0;
	LOC1 = (void*)0;
	LOC1 = alloc_7801_1689653243(((NI) ((NI)(buflen0 * ((NI) 1)))));
	(*L0).buf = ((NCSTRING) (LOC1));
	(*L0).sentinel = (NI)(buflen0 - ((NI) 1));
	(*L0).linestart = ((NI) 0);
	(*L0).linenumber = ((NI) 1);
	unsureAsgnRef((void**) (&(*L0).stream), inputstream0);
	fillbuffer_284058_4037054349(L0);
	skiputf8bom_285410_4037054349(L0);
}
Esempio n. 7
0
N_NIMCALL(void, remove_129639)(Tlinkedlist129028* list, Tlistentry129022* entry) {
	(*list).counter -= ((NI) 1);
	{
		if (!(entry == (*list).tail)) goto LA3;
		unsureAsgnRef((void**) (&(*list).tail), (*entry).prev);
	}
	LA3: ;
	{
		if (!(entry == (*list).head)) goto LA7;
		unsureAsgnRef((void**) (&(*list).head), (*entry).next);
	}
	LA7: ;
	{
		if (!!(((*entry).next == NIM_NIL))) goto LA11;
		asgnRef((void**) (&(*(*entry).next).prev), (*entry).prev);
	}
	LA11: ;
	{
		if (!!(((*entry).prev == NIM_NIL))) goto LA15;
		asgnRef((void**) (&(*(*entry).prev).next), (*entry).next);
	}
	LA15: ;
}
Esempio n. 8
0
N_NIMCALL(void, openbaselexer_203023)(Tbaselexer203015* L, Tllstream202204* inputstream, NI buflen) {
	void* LOC1;
	(*L).bufpos = ((NI) 0);
	(*L).buflen = buflen;
	LOC1 = 0;
	LOC1 = alloc_7401(((NI) ((NI)(buflen * ((NI) 1)))));
	(*L).buf = ((NCSTRING) (LOC1));
	(*L).sentinel = (NI)(buflen - ((NI) 1));
	(*L).linestart = ((NI) 0);
	(*L).linenumber = ((NI) 1);
	unsureAsgnRef((void**) (&(*L).stream), inputstream);
	fillbuffer_203058(L);
	skiputf8bom_204410(L);
}
Esempio n. 9
0
N_NIMCALL(void, openbaselexer_AhdjJJ6lkJ2zIxQnYdvcGQ)(Tbaselexer_z9a7O76kH1tJ9aXJ3h2MdEzA* L0, Tllstream_IHsOGFu33dIY69a9bLlFHlHw* inputstream0, NI buflen0) {
	void* LOC1;
	(*L0).bufpos = ((NI) 0);
	(*L0).buflen = buflen0;
	LOC1 = (void*)0;
	LOC1 = alloc_4cubgSerkjpuLcj5MXjiLw_2(((NI) ((NI)(buflen0 * ((NI) 1)))));
	(*L0).buf = ((NCSTRING) (LOC1));
	(*L0).sentinel = (NI)(buflen0 - ((NI) 1));
	(*L0).linestart = ((NI) 0);
	(*L0).linenumber = ((NI) 1);
	unsureAsgnRef((void**) (&(*L0).stream), inputstream0);
	fillbuffer_cotVgXvyGKbiStcXgf0NTw(L0);
	skiputf8bom_fpEvLjybfvf8F82rXLe7RQ(L0);
}
Esempio n. 10
0
N_NIMCALL(void, remove_OHo5UGptcxVKInJo6EIoMg_2)(Tlinkedlist_9aBiIjAa4z2zTLjp4yMUvLw* list0, Tlistentry_U4JkVlrJQaACKZ9a9cwCla3Q* entry0) {
	(*list0).counter -= ((NI) 1);
	{
		if (!(entry0 == (*list0).tail)) goto LA3;
		unsureAsgnRef((void**) (&(*list0).tail), (*entry0).prev);
	}
	LA3: ;
	{
		if (!(entry0 == (*list0).head)) goto LA7;
		unsureAsgnRef((void**) (&(*list0).head), (*entry0).next);
	}
	LA7: ;
	{
		if (!!(((*entry0).next == NIM_NIL))) goto LA11;
		asgnRef((void**) (&(*(*entry0).next).prev), (*entry0).prev);
	}
	LA11: ;
	{
		if (!!(((*entry0).prev == NIM_NIL))) goto LA15;
		asgnRef((void**) (&(*(*entry0).prev).next), (*entry0).next);
	}
	LA15: ;
}
Esempio n. 11
0
N_NIMCALL(void, remove_109636)(tlinkedlist109020* list, tlistentry109014* entry) {
	nimfr("Remove", "lists.nim")
	nimln(85, "lists.nim");
	(*list).Counter = subInt((*list).Counter, 1);
	nimln(86, "lists.nim");
	{
		nimln(86, "lists.nim");
		if (!(entry == (*list).Tail)) goto LA3;
		nimln(87, "lists.nim");
		unsureAsgnRef((void**) &(*list).Tail, (*entry).Prev);
	}	LA3: ;
	nimln(88, "lists.nim");
	{
		nimln(88, "lists.nim");
		if (!(entry == (*list).Head)) goto LA7;
		nimln(89, "lists.nim");
		unsureAsgnRef((void**) &(*list).Head, (*entry).Next);
	}	LA7: ;
	nimln(90, "lists.nim");
	{
		nimln(698, "system.nim");
		nimln(698, "system.nim");
		if (!!(((*entry).Next == NIM_NIL))) goto LA11;
		nimln(90, "lists.nim");
		asgnRef((void**) &(*(*entry).Next).Prev, (*entry).Prev);
	}	LA11: ;
	nimln(91, "lists.nim");
	{
		nimln(698, "system.nim");
		nimln(698, "system.nim");
		if (!!(((*entry).Prev == NIM_NIL))) goto LA15;
		nimln(91, "lists.nim");
		asgnRef((void**) &(*(*entry).Prev).Next, (*entry).Next);
	}	LA15: ;
	popFrame();
}
Esempio n. 12
0
/*   (c) 2011 Andreas Rumpf */

typedef long int NI;
typedef unsigned long int NU;
#include "nimbase.h"

typedef struct TY60215 TY60215;
typedef struct TY60213 TY60213;
typedef struct TY60211 TY60211;
typedef struct TGenericSeq TGenericSeq;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct TY55548 TY55548;
typedef struct TY55530 TY55530;
typedef struct TY55528 TY55528;
typedef struct TY54011 TY54011;
typedef struct TY54005 TY54005;
typedef struct TNimObject TNimObject;
typedef struct NimStringDesc NimStringDesc;
typedef struct TY55552 TY55552;
typedef struct TY47538 TY47538;
typedef struct TY55526 TY55526;
typedef struct TY55540 TY55540;
typedef struct TY52008 TY52008;
typedef struct TY55544 TY55544;
typedef struct TY10802 TY10802;
typedef struct TY10814 TY10814;
typedef struct TY11196 TY11196;
typedef struct TY10818 TY10818;
typedef struct TY10810 TY10810;
typedef struct TY11194 TY11194;
typedef struct TY60071 TY60071;
typedef struct TY55564 TY55564;
typedef struct TY55562 TY55562;
typedef struct TY55560 TY55560;
typedef struct TY60099 TY60099;
typedef struct TY60101 TY60101;
typedef struct TY60084 TY60084;
typedef struct TY55570 TY55570;
typedef struct TY55568 TY55568;
typedef struct TY55566 TY55566;
typedef struct TY55520 TY55520;
typedef struct TY55550 TY55550;
typedef struct TY43013 TY43013;
struct TY60211 {
NI Key;
NI Val;
};
struct TGenericSeq {
NI len;
NI space;
};
struct TY60215 {
NI Counter;
TY60213* Data;
};
struct TNimType {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
};
struct TNimNode {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct TY55530 {
TNimType* m_type;
NI Counter;
TY55528* Data;
};
struct TNimObject {
TNimType* m_type;
};
struct TY54005 {
  TNimObject Sup;
NI Id;
};
typedef NIM_CHAR TY239[100000001];
struct NimStringDesc {
  TGenericSeq Sup;
TY239 data;
};
struct TY54011 {
  TY54005 Sup;
NimStringDesc* S;
TY54011* Next;
NI H;
};
struct TY47538 {
NI16 Line;
NI16 Col;
int Fileindex;
};
struct TY55540 {
NU8 K;
NU8 S;
NU8 Flags;
TY55552* T;
TY52008* R;
NI A;
};
struct TY55548 {
  TY54005 Sup;
NU8 Kind;
NU8 Magic;
TY55552* Typ;
TY54011* Name;
TY47538 Info;
TY55548* Owner;
NU32 Flags;
TY55530 Tab;
TY55526* Ast;
NU32 Options;
NI Position;
NI Offset;
TY55540 Loc;
TY55544* Annex;
};
struct TY10802 {
NI Refcount;
TNimType* Typ;
};
struct TY10818 {
NI Len;
NI Cap;
TY10802** D;
};
struct TY10814 {
NI Counter;
NI Max;
TY10810* Head;
TY10810** Data;
};
struct TY11194 {
NI Stackscans;
NI Cyclecollections;
NI Maxthreshold;
NI Maxstacksize;
NI Maxstackcells;
NI Cycletablesize;
};
struct TY11196 {
TY10818 Zct;
TY10818 Decstack;
TY10814 Cycleroots;
TY10818 Tempstack;
TY11194 Stat;
};
struct TY60071 {
NI H;
};
struct TY55560 {
TY54005* Key;
TNimObject* Val;
};
struct TY55564 {
NI Counter;
TY55562* Data;
};
struct TY60099 {
NI Tos;
TY60101* Stack;
};
struct TY60084 {
NI H;
TY54011* Name;
};
struct TY55566 {
TY54005* Key;
TY55526* Val;
};
struct TY55570 {
NI Counter;
TY55568* Data;
};
struct TY55526 {
TY55552* Typ;
NimStringDesc* Comment;
TY47538 Info;
NU8 Flags;
NU8 Kind;
union {
struct {NI64 Intval;
} S1;
struct {NF64 Floatval;
} S2;
struct {NimStringDesc* Strval;
} S3;
struct {TY55548* Sym;
} S4;
struct {TY54011* Ident;
} S5;
struct {TY55520* Sons;
} S6;
} KindU;
};
struct TY55552 {
  TY54005 Sup;
NU8 Kind;
TY55550* Sons;
TY55526* N;
NU8 Flags;
NU8 Callconv;
TY55548* Owner;
TY55548* Sym;
NI64 Size;
NI Align;
NI Containerid;
TY55540 Loc;
};
struct TY52008 {
  TNimObject Sup;
TY52008* Left;
TY52008* Right;
NI Length;
NimStringDesc* Data;
};
struct TY43013 {
  TNimObject Sup;
TY43013* Prev;
TY43013* Next;
};
struct TY55544 {
  TY43013 Sup;
NU8 Kind;
NIM_BOOL Generated;
TY52008* Name;
TY55526* Path;
};
typedef NI TY8814[16];
struct TY10810 {
TY10810* Next;
NI Key;
TY8814 Bits;
};
struct TY60213 {
  TGenericSeq Sup;
  TY60211 data[SEQ_DECL_SIZE];
};
struct TY55528 {
  TGenericSeq Sup;
  TY55548* data[SEQ_DECL_SIZE];
};
struct TY55562 {
  TGenericSeq Sup;
  TY55560 data[SEQ_DECL_SIZE];
};
struct TY60101 {
  TGenericSeq Sup;
  TY55530 data[SEQ_DECL_SIZE];
};
struct TY55568 {
  TGenericSeq Sup;
  TY55566 data[SEQ_DECL_SIZE];
};
struct TY55520 {
  TGenericSeq Sup;
  TY55526* data[SEQ_DECL_SIZE];
};
struct TY55550 {
  TGenericSeq Sup;
  TY55552* data[SEQ_DECL_SIZE];
};
N_NIMCALL(void*, newSeq)(TNimType* Typ_14404, NI Len_14405);
N_NIMCALL(void, unsureAsgnRef)(void** Dest_13226, void* Src_13227);
N_NIMCALL(NI, Nexttry_60205)(NI H_60207, NI Maxhash_60208);
N_NIMCALL(NIM_BOOL, Mustrehash_60201)(NI Length_60203, NI Counter_60204);
N_NIMCALL(void, Strtableenlarge_62293)(TY55530* T_62296);
N_NIMCALL(void, Strtablerawinsert_62256)(TY55528** Data_62259, TY55548* N_62260);
N_NIMCALL(void, Internalerror_48159)(TY47538 Info_48161, NimStringDesc* Errmsg_48162);
static N_INLINE(void, appendString)(NimStringDesc* Dest_18799, NimStringDesc* Src_18800);
N_NIMCALL(NimStringDesc*, rawNewString)(NI Space_18689);
static N_INLINE(void, asgnRef)(void** Dest_13214, void* Src_13215);
static N_INLINE(void, Incref_13202)(TY10802* C_13204);
static N_INLINE(NI, Atomicinc_3221)(NI* Memloc_3224, NI X_3225);
static N_INLINE(NIM_BOOL, Canbecycleroot_11616)(TY10802* C_11618);
static N_INLINE(void, Rtladdcycleroot_12252)(TY10802* C_12254);
N_NOINLINE(void, Incl_11080)(TY10814* S_11083, TY10802* Cell_11084);
static N_INLINE(TY10802*, Usrtocell_11612)(void* Usr_11614);
static N_INLINE(void, Decref_13001)(TY10802* C_13003);
static N_INLINE(NI, Atomicdec_3226)(NI* Memloc_3229, NI X_3230);
static N_INLINE(void, Rtladdzct_12601)(TY10802* C_12603);
N_NOINLINE(void, Addzct_11601)(TY10818* S_11604, TY10802* C_11605);
N_NIMCALL(TY55548*, Nextiter_60078)(TY60071* Ti_60081, TY55530* Tab_60082);
N_NIMCALL(NI, Iitablerawget_63101)(TY60215 T_63103, NI Key_63104);
N_NIMCALL(void, Iitablerawinsert_63119)(TY60213** Data_63122, NI Key_63123, NI Val_63124);
N_NIMCALL(NI, Idtablerawget_62732)(TY55564 T_62734, NI Key_62735);
static N_INLINE(void, asgnRefNoCycle)(void** Dest_13218, void* Src_13219);
N_NIMCALL(void, Idtablerawinsert_62784)(TY55562** Data_62787, TY54005* Key_62788, TNimObject* Val_62789);
N_NIMCALL(TY55548*, Strtableget_60066)(TY55530* T_60068, TY54011* Name_60069);
N_NIMCALL(TY55548*, Nextidentiter_60093)(TY60084* Ti_60096, TY55530* Tab_60097);
N_NIMCALL(NI, Idnodetablerawget_62917)(TY55570 T_62919, TY54005* Key_62920);
N_NIMCALL(void, Idnodetablerawinsert_62944)(TY55568** Data_62947, TY54005* Key_62948, TY55526* Val_62949);
static N_INLINE(NI, Sonslen_55804)(TY55526* N_55806);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* Seq_19003, NI Elemsize_19004, NI Newlen_19005);
N_NIMCALL(void, Initstrtable_55747)(TY55530* X_55750);
N_NIMCALL(NU8, Symtabadduniqueat_60135)(TY60099* Tab_60138, TY55548* E_60139, NI At_60140);
N_NIMCALL(NIM_BOOL, Strtableincl_62381)(TY55530* T_62384, TY55548* N_62385);
N_NIMCALL(void, Strtableadd_60061)(TY55530* T_60064, TY55548* N_60065);
N_NIMCALL(TY55548*, Lookupinrecord_60194)(TY55526* N_60196, TY54011* Field_60197);
static N_INLINE(TY55526*, Lastson_55810)(TY55526* N_55812);
STRING_LITERAL(TMP195609, "StrTableRawInsert: ", 19);
STRING_LITERAL(TMP196062, "getSymFromList", 14);
STRING_LITERAL(TMP196682, "lookupInRecord", 14);
STRING_LITERAL(TMP196683, "lookupInRecord(record case branch)", 34);
STRING_LITERAL(TMP196684, "lookupInRecord()", 16);
extern TNimType* NTI60213; /* TIIPairSeq */
extern TNimType* NTI55528; /* TSymSeq */
extern TY11196 Gch_11214;
extern TNimType* NTI55562; /* TIdPairSeq */
extern TNimType* NTI60101; /* seq[TStrTable] */
extern TNimType* NTI55568; /* TIdNodePairSeq */
N_NIMCALL(void, Initiitable_60220)(TY60215* X_60223) {
NI I_63098;
NI Res_63100;
(*X_60223).Counter = 0;
unsureAsgnRef((void**) &(*X_60223).Data, (TY60213*) newSeq(NTI60213, 8));
I_63098 = 0;
Res_63100 = 0;
Res_63100 = 0;
while (1) {
if (!(Res_63100 <= 7)) goto LA1;
I_63098 = Res_63100;
(*X_60223).Data->data[I_63098].Key = (-2147483647 -1);
Res_63100 += 1;
} LA1: ;
}
Esempio n. 13
0
static N_INLINE(NI, parsewhile_97054)(NimStringDesc* s, NimStringDesc** token, TY99946 validchars, NI start) {
	NI result;
	NI i;
	result = 0;
	i = start;
	{
		while (1) {
			if (!((validchars[((NU8)(s->data[i]))/8] &(1<<(((NU8)(s->data[i]))%8)))!=0)) goto LA2;
			i += ((NI) 1);
		} LA2: ;
	}
	result = (NI)(i - start);
	unsureAsgnRef((void**) (&(*token)), copyStrLast(s, start, (NI)(i - ((NI) 1))));
	return result;
}
Esempio n. 14
0
N_NIMCALL(void, enlarge_167886)(ttable167560* t_167895) {
	tkeyvaluepairseq167563* n;
	NI TMP909;
	NI i_167941;
	NI HEX3Atmp_168011;
	NI res_168013;
	tkeyvaluepairseq167563* LOC6;
	nimfr("enlarge", "tables.nim")
	n = 0;
	nimln(158, "tables.nim");
	nimln(158, "tables.nim");
	nimln(158, "tables.nim");
	TMP909 = mulInt((*t_167895).Data->Sup.len, 2);
	n = (tkeyvaluepairseq167563*) newSeq((&NTI167563), (NI64)(TMP909));
	i_167941 = 0;
	HEX3Atmp_168011 = 0;
	nimln(159, "tables.nim");
	nimln(159, "tables.nim");
	HEX3Atmp_168011 = ((*t_167895).Data->Sup.len-1);
	nimln(1451, "system.nim");
	res_168013 = 0;
	nimln(1452, "system.nim");
	while (1) {
		nimln(1452, "system.nim");
		if (!(res_168013 <= HEX3Atmp_168011)) goto LA1;
		nimln(1451, "system.nim");
		i_167941 = res_168013;
		nimln(160, "tables.nim");
		{
			nimln(160, "tables.nim");
			if ((NU)(i_167941) >= (NU)((*t_167895).Data->Sup.len)) raiseIndexError();
			if (!((*t_167895).Data->data[i_167941].Field0 == ((NU8) 1))) goto LA4;
			nimln(160, "tables.nim");
			if ((NU)(i_167941) >= (NU)((*t_167895).Data->Sup.len)) raiseIndexError();
			if ((NU)(i_167941) >= (NU)((*t_167895).Data->Sup.len)) raiseIndexError();
			rawinsert_167956(t_167895, &n, (*t_167895).Data->data[i_167941].Field1, (*t_167895).Data->data[i_167941].Field2);
		}
		LA4: ;
		nimln(1454, "system.nim");
		res_168013 = addInt(res_168013, 1);
	} LA1: ;
	nimln(161, "tables.nim");
	LOC6 = 0;
	LOC6 = (*t_167895).Data;
	unsureAsgnRef((void**) &(*t_167895).Data, n);
	n = LOC6;
	popFrame();
}
N_NIMCALL(Tsym292834*, firstidentexcluding_302900_2984716966)(Tidentiter299063* ti0, Tstrtable292806 tab0, Tident199010* s0, Intset268030* excluding0) {
	Tsym292834* result0;
	result0 = (Tsym292834*)0;
	(*ti0).h = (*s0).h;
	unsureAsgnRef((void**) (&(*ti0).name), s0);
	{
		if (!(tab0.counter == ((NI) 0))) goto LA3;
		result0 = NIM_NIL;
	}
	goto LA1;
	LA3: ;
	{
		result0 = nextidentexcluding_302862_2984716966(ti0, tab0, excluding0);
	}
	LA1: ;
	return result0;
}
Esempio n. 16
0
N_NIMCALL(Tsym191843*, initidentiter_199147)(Tidentiter199141* ti, Tstrtable191817 tab, Tident167021* s) {
	Tsym191843* result;
	result = 0;
	(*ti).h = (*s).h;
	unsureAsgnRef((void**) (&(*ti).name), s);
	{
		if (!(tab.counter == ((NI) 0))) goto LA3;
		result = NIM_NIL;
	}
	goto LA1;
	LA3: ;
	{
		result = nextidentiter_199156(ti, tab);
	}
	LA1: ;
	return result;
}
Esempio n. 17
0
N_NIMCALL(Tsym191843*, firstidentexcluding_204154)(Tidentiter199141* ti, Tstrtable191817 tab, Tident167021* s, Intset188056* excluding) {
	Tsym191843* result;
	result = 0;
	(*ti).h = (*s).h;
	unsureAsgnRef((void**) (&(*ti).name), s);
	{
		if (!(tab.counter == ((NI) 0))) goto LA3;
		result = NIM_NIL;
	}
	goto LA1;
	LA3: ;
	{
		result = nextidentexcluding_204104(ti, tab, excluding);
	}
	LA1: ;
	return result;
}
Esempio n. 18
0
N_NIMCALL(void, enlarge_221767)(ttable221029* t) {
	tkeyvaluepairseq221032* n;
	NI TMP3091;
	NI i_221806;
	NI HEX3Atmp_221861;
	NI res_221863;
	tkeyvaluepairseq221032* LOC6;
	nimfr("Enlarge", "tables.nim")
	n = 0;
	nimln(116, "tables.nim");
	nimln(116, "tables.nim");
	nimln(116, "tables.nim");
	TMP3091 = mulInt((*t).Data->Sup.len, 2);
	n = (tkeyvaluepairseq221032*) newSeq((&NTI221032), (NI64)(TMP3091));
	i_221806 = 0;
	HEX3Atmp_221861 = 0;
	nimln(117, "tables.nim");
	nimln(117, "tables.nim");
	HEX3Atmp_221861 = ((*t).Data->Sup.len-1);
	nimln(1301, "system.nim");
	res_221863 = 0;
	nimln(1302, "system.nim");
	while (1) {
		nimln(1302, "system.nim");
		if (!(res_221863 <= HEX3Atmp_221861)) goto LA1;
		nimln(1301, "system.nim");
		i_221806 = res_221863;
		nimln(118, "tables.nim");
		{
			nimln(118, "tables.nim");
			if ((NU)(i_221806) >= (NU)((*t).Data->Sup.len)) raiseIndexError();
			if (!((*t).Data->data[i_221806].Field0 == ((NU8) 1))) goto LA4;
			nimln(118, "tables.nim");
			if ((NU)(i_221806) >= (NU)((*t).Data->Sup.len)) raiseIndexError();
			if ((NU)(i_221806) >= (NU)((*t).Data->Sup.len)) raiseIndexError();
			rawinsert_221820(t, &n, (*t).Data->data[i_221806].Field1, (*t).Data->data[i_221806].Field2);		}		LA4: ;
		nimln(1304, "system.nim");
		res_221863 = addInt(res_221863, 1);
	} LA1: ;
	nimln(119, "tables.nim");
	LOC6 = 0;
	LOC6 = (*t).Data;
	unsureAsgnRef((void**) &(*t).Data, n);
	n = LOC6;
	popFrame();
}
Esempio n. 19
0
N_NIMCALL(void, enlarge_137840)(ttable137540* t) {
	tkeyvaluepairseq137543* n;
	NI TMP821;
	NI i_137879;
	NI HEX3Atmp_137934;
	NI res_137936;
	tkeyvaluepairseq137543* LOC6;
	nimfr("Enlarge", "tables.nim")
	n = 0;
	nimln(116, "tables.nim");
	nimln(116, "tables.nim");
	nimln(116, "tables.nim");
	TMP821 = mulInt((*t).Data->Sup.len, 2);
	n = (tkeyvaluepairseq137543*) newSeq((&NTI137543), (NI64)(TMP821));
	i_137879 = 0;
	HEX3Atmp_137934 = 0;
	nimln(117, "tables.nim");
	nimln(117, "tables.nim");
	HEX3Atmp_137934 = ((*t).Data->Sup.len-1);
	nimln(1301, "system.nim");
	res_137936 = 0;
	nimln(1302, "system.nim");
	while (1) {
		nimln(1302, "system.nim");
		if (!(res_137936 <= HEX3Atmp_137934)) goto LA1;
		nimln(1301, "system.nim");
		i_137879 = res_137936;
		nimln(118, "tables.nim");
		{
			nimln(118, "tables.nim");
			if ((NU)(i_137879) >= (NU)((*t).Data->Sup.len)) raiseIndexError();
			if (!((*t).Data->data[i_137879].Field0 == ((NU8) 1))) goto LA4;
			nimln(118, "tables.nim");
			if ((NU)(i_137879) >= (NU)((*t).Data->Sup.len)) raiseIndexError();
			if ((NU)(i_137879) >= (NU)((*t).Data->Sup.len)) raiseIndexError();
			rawinsert_137893(t, &n, (*t).Data->data[i_137879].Field1, (*t).Data->data[i_137879].Field2);		}		LA4: ;
		nimln(1304, "system.nim");
		res_137936 = addInt(res_137936, 1);
	} LA1: ;
	nimln(119, "tables.nim");
	LOC6 = 0;
	LOC6 = (*t).Data;
	unsureAsgnRef((void**) &(*t).Data, n);
	n = LOC6;
	popFrame();
}
Esempio n. 20
0
N_NIMCALL(Tsym215822*, firstidentexcluding_226500)(Tidentiter222084* ti, Tstrtable215794 tab, Tident190012* s, Intset212035 excluding) {
	Tsym215822* result;
	result = 0;
	(*ti).h = (*s).h;
	unsureAsgnRef((void**) (&(*ti).name), s);
	{
		if (!(tab.counter == ((NI) 0))) goto LA3;
		result = NIM_NIL;
	}
	goto LA1;
	LA3: ;
	{
		result = nextidentexcluding_226462(ti, tab, excluding);
	}
	LA1: ;
	return result;
}
Esempio n. 21
0
N_NIMCALL(Tsym215822*, initidentiter_222087)(Tidentiter222084* ti, Tstrtable215794 tab, Tident190012* s) {
	Tsym215822* result;
	result = 0;
	(*ti).h = (*s).h;
	unsureAsgnRef((void**) (&(*ti).name), s);
	{
		if (!(tab.counter == ((NI) 0))) goto LA3;
		result = NIM_NIL;
	}
	goto LA1;
	LA3: ;
	{
		result = nextidentiter_222093(ti, tab);
	}
	LA1: ;
	return result;
}
N_NIMCALL(Tsym292834*, initidentiter_299066_2984716966)(Tidentiter299063* ti0, Tstrtable292806 tab0, Tident199010* s0) {
	Tsym292834* result0;
	result0 = (Tsym292834*)0;
	(*ti0).h = (*s0).h;
	unsureAsgnRef((void**) (&(*ti0).name), s0);
	{
		if (!(tab0.counter == ((NI) 0))) goto LA3;
		result0 = NIM_NIL;
	}
	goto LA1;
	LA3: ;
	{
		result0 = nextidentiter_299072_2984716966(ti0, tab0);
	}
	LA1: ;
	return result0;
}
Esempio n. 23
0
N_NIMCALL(void, closepasses_251359)(tpasscontext251003** a) {
    tnode192813* m;
    NI i_251376;
    NI HEX3Atmp_251385;
    NI TMP3186;
    NI res_251387;
    nimfr("closePasses", "passes.nim")
    nimln(127, "passes.nim");
    m = NIM_NIL;
    i_251376 = 0;
    HEX3Atmp_251385 = 0;
    nimln(128, "passes.nim");
    nimln(128, "passes.nim");
    TMP3186 = subInt(gpasseslen_251179, 1);
    HEX3Atmp_251385 = (NI32)(TMP3186);
    nimln(1451, "system.nim");
    res_251387 = 0;
    nimln(1452, "system.nim");
    while (1) {
        nimln(1452, "system.nim");
        if (!(res_251387 <= HEX3Atmp_251385)) goto LA1;
        nimln(1451, "system.nim");
        i_251376 = res_251387;
        nimln(129, "passes.nim");
        {
            nimln(129, "passes.nim");
            nimln(129, "passes.nim");
            if ((NU)(i_251376) > (NU)(9)) raiseIndexError();
            if (!!(gpasses_251178[(i_251376)- 0].Field3 == 0)) goto LA4;
            nimln(129, "passes.nim");
            if ((NU)(i_251376) > (NU)(9)) raiseIndexError();
            if ((NU)(i_251376) > (NU)(9)) raiseIndexError();
            m = gpasses_251178[(i_251376)- 0].Field3(a[(i_251376)- 0], m);
        }
LA4:
        ;
        nimln(130, "passes.nim");
        if ((NU)(i_251376) > (NU)(9)) raiseIndexError();
        unsureAsgnRef((void**) &a[(i_251376)- 0], NIM_NIL);
        nimln(1454, "system.nim");
        res_251387 = addInt(res_251387, 1);
    }
LA1:
    ;
    popFrame();
}
Esempio n. 24
0
N_NIMCALL(void, open_290026)(tbaselexer290016* l, tstream142629* input, NI buflen) {
	NI TMP4657;
	void* LOC9;
	NI TMP4658;
	nimfr("open", "lexbase.nim")
	nimln(142, "lexbase.nim");
	{
		nimln(142, "lexbase.nim");
		nimln(142, "lexbase.nim");
		if (!!((0 < buflen))) goto LA3;
		nimln(142, "lexbase.nim");
		hiddenraiseassert_76017(((NimStringDesc*) &TMP4655));	}	LA3: ;
	nimln(143, "lexbase.nim");
	{
		nimln(143, "lexbase.nim");
		nimln(143, "lexbase.nim");
		nimln(143, "lexbase.nim");
		if (!!(!((input == NIM_NIL)))) goto LA7;
		nimln(143, "lexbase.nim");
		hiddenraiseassert_76017(((NimStringDesc*) &TMP4656));	}	LA7: ;
	nimln(144, "lexbase.nim");
	unsureAsgnRef((void**) &(*l).Input, input);
	nimln(145, "lexbase.nim");
	(*l).Bufpos = 0;
	nimln(146, "lexbase.nim");
	(*l).Buflen = buflen;
	nimln(147, "lexbase.nim");
	nimln(147, "lexbase.nim");
	nimln(147, "lexbase.nim");
	TMP4657 = mulInt(buflen, 1);
	LOC9 = 0;
	LOC9 = alloc_4001((NI64)(TMP4657));
	(*l).Buf = ((NCSTRING) (LOC9));
	nimln(148, "lexbase.nim");
	nimln(148, "lexbase.nim");
	TMP4658 = subInt(buflen, 1);
	(*l).Sentinel = (NI64)(TMP4658);
	nimln(149, "lexbase.nim");
	(*l).Linestart = 0;
	nimln(150, "lexbase.nim");
	(*l).Linenumber = 1;
	nimln(151, "lexbase.nim");
	fillbuffer_290071(l);	nimln(152, "lexbase.nim");
	skiputf8bom_291413(l);	popFrame();
}
Esempio n. 25
0
N_NIMCALL(void, initiitable_199282)(Tiitable199274* x) {
	(*x).counter = ((NI) 0);
	unsureAsgnRef((void**) (&(*x).data), (Tiipairseq199272*) newSeq((&NTI199272), ((NI) 8)));
	{
		NI i_205994;
		NI res_205998;
		i_205994 = 0;
		res_205998 = ((NI) 0);
		{
			while (1) {
				if (!(res_205998 <= ((NI) 7))) goto LA3;
				i_205994 = res_205998;
				(*x).data->data[i_205994].key = ((NI) (IL64(-9223372036854775807) - IL64(1)));
				res_205998 += ((NI) 1);
			} LA3: ;
		}
	}
}
Esempio n. 26
0
N_NIMCALL(void, inittable_221414)(NI initialsize, ttable221029* Result) {
	nimfr("initTable", "tables.nim")
	nimln(167, "tables.nim");
	{
		NIM_BOOL LOC3;
		nimln(167, "tables.nim");
		nimln(167, "tables.nim");
		LOC3 = 0;
		LOC3 = ispoweroftwo_116271(initialsize);
		if (!!(LOC3)) goto LA4;
		nimln(167, "tables.nim");
		hiddenraiseassert_77217(((NimStringDesc*) &TMP803));	}	LA4: ;
	nimln(168, "tables.nim");
	(*Result).Counter = 0;
	nimln(169, "tables.nim");
	unsureAsgnRef((void**) &(*Result).Data, (tkeyvaluepairseq221032*) newSeq((&NTI221032), initialsize));
	popFrame();
}
N_NIMCALL(void, initiitable_299148_2984716966)(Tiitable299142* x0) {
	(*x0).counter = ((NI) 0);
	unsureAsgnRef((void**) (&(*x0).data), (Tiipairseq299140*) newSeq((&NTI299140), ((NI) 8)));
	{
		NI i_304554_2984716966;
		NI res_304558_2984716966;
		i_304554_2984716966 = (NI)0;
		res_304558_2984716966 = ((NI) 0);
		{
			while (1) {
				if (!(res_304558_2984716966 <= ((NI) 7))) goto LA3;
				i_304554_2984716966 = res_304558_2984716966;
				(*x0).data->data[i_304554_2984716966].key = ((NI) (IL64(-9223372036854775807) - IL64(1)));
				res_304558_2984716966 += ((NI) 1);
			} LA3: ;
		}
	}
}
Esempio n. 28
0
N_NIMCALL(void, initiitable_222168)(Tiitable222163* x) {
	(*x).counter = ((NI) 0);
	unsureAsgnRef((void**) (&(*x).data), (Tiipairseq222161*) newSeq((&NTI222161), ((NI) 8)));
	{
		NI i_228154;
		NI res_228158;
		i_228154 = 0;
		res_228158 = ((NI) 0);
		{
			while (1) {
				if (!(res_228158 <= ((NI) 7))) goto LA3;
				i_228154 = res_228158;
				(*x).data->data[i_228154].key = ((NI) (-2147483647 -1));
				res_228158 += ((NI) 1);
			} LA3: ;
		}
	}
}
Esempio n. 29
0
N_NIMCALL(void, createstream_146441)(Streamobj138027** stream, int* handle, NU8 filemode) {
	FILE* f;
	Filestreamobj138692* LOC7;
	f = 0;
	{
		NIM_BOOL LOC3;
		NI32 LOC6;
		LOC3 = 0;
		LOC3 = open_13411(&f, (*handle), filemode);
		if (!!(LOC3)) goto LA4;
		LOC6 = 0;
		LOC6 = oslasterror_117033();
		raiseoserror_117009(LOC6);
	}
	LA4: ;
	LOC7 = 0;
	LOC7 = newfilestream_138758(f);
	unsureAsgnRef((void**) (&(*stream)), &LOC7->Sup);
}
Esempio n. 30
0
N_NIMCALL(void, enlarge_313185)(Table312052* t) {
    Keyvaluepairseq312055* n;
    Keyvaluepairseq312055* LOC1;
    n = 0;
    n = (Keyvaluepairseq312055*) newSeq((&NTI312055), ((NI) ((NI)(((*t).data ? (*t).data->Sup.len : 0) * ((NI) 2)))));
    LOC1 = 0;
    LOC1 = (*t).data;
    unsureAsgnRef((void**) (&(*t).data), n);
    n = LOC1;
    {
        NI i_313237;
        NI HEX3Atmp_313291;
        NI res_313294;
        i_313237 = 0;
        HEX3Atmp_313291 = 0;
        HEX3Atmp_313291 = (n ? (n->Sup.len-1) : -1);
        res_313294 = ((NI) 0);
        {
            while (1) {
                if (!(res_313294 <= HEX3Atmp_313291)) goto LA4;
                i_313237 = res_313294;
                {
                    NIM_BOOL LOC7;
                    NI j;
                    NI LOC10;
                    LOC7 = 0;
                    LOC7 = isfilled_157211(n->data[i_313237].Field0);
                    if (!LOC7) goto LA8;
                    LOC10 = 0;
                    LOC10 = rawgetknownhc_313239((*t), n->data[i_313237].Field1, n->data[i_313237].Field0);
                    j = (NI)(((NI) -1) - LOC10);
                    rawinsert_313265(t, (&(*t).data), n->data[i_313237].Field1, n->data[i_313237].Field2, n->data[i_313237].Field0, j);
                }
LA8:
                ;
                res_313294 += ((NI) 1);
            }
LA4:
            ;
        }
    }
}