Example #1
0
N_NIMCALL(void, rawinsert_145042)(Stringtableobj144212* t, Keyvaluepairseq144210** data, NimStringDesc* key, NimStringDesc* val) {
    NI h;
    NI LOC1;
    NimStringDesc* LOC4;
    NimStringDesc* LOC5;
    LOC1 = 0;
    LOC1 = myhash_144377(t, key);
    h = (NI)(LOC1 & ((*data) ? ((*data)->Sup.len-1) : -1));
    {
        while (1) {
            if (!!((*data)->data[h].Field0 == 0)) goto LA3;
            h = nexttry_144607(h, ((*data) ? ((*data)->Sup.len-1) : -1));
        }
LA3:
        ;
    }
    LOC4 = 0;
    LOC4 = (*data)->data[h].Field0;
    (*data)->data[h].Field0 = copyStringRC1(key);
    if (LOC4) nimGCunrefNoCycle(LOC4);
    LOC5 = 0;
    LOC5 = (*data)->data[h].Field1;
    (*data)->data[h].Field1 = copyStringRC1(val);
    if (LOC5) nimGCunrefNoCycle(LOC5);
}
Example #2
0
N_NIMCALL(void, rawinsert_112864)(tstringtable112610* t, tkeyvaluepairseq112608** data, NimStringDesc* key, NimStringDesc* val) {
	NI h;
	NI LOC1;
	NimStringDesc* LOC3;
	NimStringDesc* LOC4;
	nimfr("RawInsert", "strtabs.nim")
	nimln(120, "strtabs.nim");
	nimln(120, "strtabs.nim");
	nimln(120, "strtabs.nim");
	LOC1 = 0;
	LOC1 = myhash_112702(t, key);
	nimln(120, "strtabs.nim");
	h = (NI)(LOC1 & ((*data)->Sup.len-1));
	nimln(121, "strtabs.nim");
	while (1) {
		nimln(121, "strtabs.nim");
		nimln(121, "strtabs.nim");
		if ((NU)(h) >= (NU)((*data)->Sup.len)) raiseIndexError();
		if (!!((*data)->data[h].Field0 == 0)) goto LA2;
		nimln(122, "strtabs.nim");
		nimln(122, "strtabs.nim");
		h = nexttry_112805(h, ((*data)->Sup.len-1));
	} LA2: ;
	nimln(123, "strtabs.nim");
	if ((NU)(h) >= (NU)((*data)->Sup.len)) raiseIndexError();
	LOC3 = 0;
	LOC3 = (*data)->data[h].Field0; (*data)->data[h].Field0 = copyStringRC1(key);
	if (LOC3) nimGCunrefNoCycle(LOC3);
	nimln(124, "strtabs.nim");
	if ((NU)(h) >= (NU)((*data)->Sup.len)) raiseIndexError();
	LOC4 = 0;
	LOC4 = (*data)->data[h].Field1; (*data)->data[h].Field1 = copyStringRC1(val);
	if (LOC4) nimGCunrefNoCycle(LOC4);
	popFrame();
}N_NIMCALL(void, TMP289)(void* p, NI op) {
Example #3
0
N_LIB_PRIVATE N_NIMCALL(void, add_6Dk5AMzZ7g2ybaU7xORwKQ)(tyObject_BTree_VZdzO0Tlflp7WMN4gS8oPg* b, NimStringDesc* key, tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* val) {
	tyObject_NodecolonObjectType__dNELmBSmY7nthjhZupWO6g* u;
	tyObject_NodecolonObjectType__dNELmBSmY7nthjhZupWO6g* t;
	tyObject_NodecolonObjectType__dNELmBSmY7nthjhZupWO6g* T5_;
	NimStringDesc* T6_;
	NimStringDesc* T7_;
{	u = insert_O82ZQMloo1CCPQ4SKpentA((*b).root, key, val);
	(*b).entries += ((NI) 1);
	{
		if (!(u == NIM_NIL)) goto LA3_;
		goto BeforeRet_;
	}
	LA3_: ;
	T5_ = (tyObject_NodecolonObjectType__dNELmBSmY7nthjhZupWO6g*)0;
	T5_ = (tyObject_NodecolonObjectType__dNELmBSmY7nthjhZupWO6g*) newObj((&NTI_tPE9ckDbaXj82MdUy0JgA7w_), sizeof(tyObject_NodecolonObjectType__dNELmBSmY7nthjhZupWO6g));
	(*T5_).entries = ((NI) 2);
	(*T5_).isInternal = NIM_TRUE;
	t = T5_;
	T6_ = (NimStringDesc*)0;
	T6_ = (*t).keys[(((NI) 0))- 0]; (*t).keys[(((NI) 0))- 0] = copyStringRC1((*(*b).root).keys[(((NI) 0))- 0]);
	if (T6_) nimGCunrefNoCycle(T6_);
	asgnRefNoCycle((void**) (&(*t)._UisInternal.S2.links[(((NI) 0))- 0]), (*b).root);
	T7_ = (NimStringDesc*)0;
	T7_ = (*t).keys[(((NI) 1))- 0]; (*t).keys[(((NI) 1))- 0] = copyStringRC1((*u).keys[(((NI) 0))- 0]);
	if (T7_) nimGCunrefNoCycle(T7_);
	asgnRefNoCycle((void**) (&(*t)._UisInternal.S2.links[(((NI) 1))- 0]), u);
	unsureAsgnRef((void**) (&(*b).root), t);
	}BeforeRet_: ;
}
Example #4
0
N_LIB_PRIVATE N_NIMCALL(void, rawInsert_XSijCUNMoyDFcaS9bIkWTUQ)(tyObject_StringTableObj_V5PVrt9bIxZEeV7lfvqqtNg* t, tySequence_xv3aaFd3JCw8NbmALHiezQ** data, NimStringDesc* key, NimStringDesc* val) {
	NI h;
	NI T1_;
	NI T2_;
	NimStringDesc* T6_;
	NimStringDesc* T7_;
	T1_ = (NI)0;
	T1_ = myhash_j2b5ExM8jHC3fdJfR8v9aMw_2(t, key);
	T2_ = (((*data) ? (*data)->Sup.len : 0)-1);
	h = (NI)(T1_ & T2_);
	{
		while (1) {
			NI T5_;
			if (!(*data)->data[h].Field2) goto LA4;
			T5_ = (((*data) ? (*data)->Sup.len : 0)-1);
			h = nextTry_4tI2vxIqcy1tNTBufKNbkgstrtabs(h, T5_);
		} LA4: ;
	}
	T6_ = (NimStringDesc*)0;
	T6_ = (*data)->data[h].Field0; (*data)->data[h].Field0 = copyStringRC1(key);
	if (T6_) nimGCunrefNoCycle(T6_);
	T7_ = (NimStringDesc*)0;
	T7_ = (*data)->data[h].Field1; (*data)->data[h].Field1 = copyStringRC1(val);
	if (T7_) nimGCunrefNoCycle(T7_);
	(*data)->data[h].Field2 = NIM_TRUE;
}
Example #5
0
NIM_EXTERNC N_NOINLINE(void, compiler_optionsInit)(void) {
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	NimStringDesc* LOC3;
	NimStringDesc* LOC4;
	NimStringDesc* LOC5;
	NimStringDesc* LOC6;
	NimStringDesc* LOC7;
	NimStringDesc* LOC8;
	NimStringDesc* LOC9;
	NimStringDesc* LOC10;
	goptions_153126 = 2202238;
	gglobaloptions_153128 = 8388608;
	gcmd_153130 = ((NU8) 0);
	gselectedgc_153131 = ((NU8) 3);
	LOC1 = 0;
	LOC1 = outfile_153134; outfile_153134 = copyStringRC1(((NimStringDesc*) &TMP39));
	if (LOC1) nimGCunrefNoCycle(LOC1);
	LOC2 = 0;
	LOC2 = docseesrcurl_153135; docseesrcurl_153135 = copyStringRC1(((NimStringDesc*) &TMP39));
	if (LOC2) nimGCunrefNoCycle(LOC2);
	LOC3 = 0;
	LOC3 = headerfile_153136; headerfile_153136 = copyStringRC1(((NimStringDesc*) &TMP39));
	if (LOC3) nimGCunrefNoCycle(LOC3);
	gverbosity_153137 = ((NI) 1);
	LOC4 = 0;
	LOC4 = gevalexpr_153140; gevalexpr_153140 = copyStringRC1(((NimStringDesc*) &TMP39));
	if (LOC4) nimGCunrefNoCycle(LOC4);
	isserving_153143 = NIM_FALSE;
	gnonimblepath_153144 = NIM_FALSE;
	asgnRef((void**) (&gconfigvars_153231), nstnewStringTable(((NU8) 2)));
	asgnRef((void**) (&gdlloverrides_153232), nstnewStringTable(((NU8) 1)));
	LOC5 = 0;
	LOC5 = libpath_153233; libpath_153233 = copyStringRC1(((NimStringDesc*) &TMP39));
	if (LOC5) nimGCunrefNoCycle(LOC5);
	LOC6 = 0;
	LOC6 = gprojectname_153234; gprojectname_153234 = copyStringRC1(((NimStringDesc*) &TMP39));
	if (LOC6) nimGCunrefNoCycle(LOC6);
	LOC7 = 0;
	LOC7 = gprojectpath_153235; gprojectpath_153235 = copyStringRC1(((NimStringDesc*) &TMP39));
	if (LOC7) nimGCunrefNoCycle(LOC7);
	LOC8 = 0;
	LOC8 = gprojectfull_153236; gprojectfull_153236 = copyStringRC1(((NimStringDesc*) &TMP39));
	if (LOC8) nimGCunrefNoCycle(LOC8);
	LOC9 = 0;
	LOC9 = nimcachedir_153238; nimcachedir_153238 = copyStringRC1(((NimStringDesc*) &TMP39));
	if (LOC9) nimGCunrefNoCycle(LOC9);
	LOC10 = 0;
	LOC10 = command_153239; command_153239 = copyStringRC1(((NimStringDesc*) &TMP39));
	if (LOC10) nimGCunrefNoCycle(LOC10);
	if (commandargs_153259) nimGCunrefNoCycle(commandargs_153259);
	commandargs_153259 = (TY121008*) newSeqRC1((&NTI121008), 0);
	gkeepcomments_153260 = NIM_TRUE;
	if (implicitimports_153280) nimGCunrefNoCycle(implicitimports_153280);
	implicitimports_153280 = (TY121008*) newSeqRC1((&NTI121008), 0);
	if (implicitincludes_153300) nimGCunrefNoCycle(implicitincludes_153300);
	implicitincludes_153300 = (TY121008*) newSeqRC1((&NTI121008), 0);
	asgnRef((void**) (&packagecache_153601), nstnewStringTable(((NU8) 1)));
}
Example #6
0
NIM_EXTERNC N_NOINLINE(void, compiler_serviceInit000)(void) {
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	LOC1 = 0;
	LOC1 = curcaascmd_531201; curcaascmd_531201 = copyStringRC1(((NimStringDesc*) &TMP1195));
	if (LOC1) nimGCunrefNoCycle(LOC1);
	LOC2 = 0;
	LOC2 = lastcaascmd_531202; lastcaascmd_531202 = copyStringRC1(((NimStringDesc*) &TMP1195));
	if (LOC2) nimGCunrefNoCycle(LOC2);
}
Example #7
0
NIM_EXTERNC N_NOINLINE(void, compiler_serviceInit)(void) {
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	LOC1 = 0;
	LOC1 = curcaascmd_521204; curcaascmd_521204 = copyStringRC1(((NimStringDesc*) &TMP1075));
	if (LOC1) nimGCunrefNoCycle(LOC1);
	LOC2 = 0;
	LOC2 = lastcaascmd_521205; lastcaascmd_521205 = copyStringRC1(((NimStringDesc*) &TMP1075));
	if (LOC2) nimGCunrefNoCycle(LOC2);
}
NIM_EXTERNC N_NOINLINE(void, compiler_serviceInit000)(void) {
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
nimRegisterGlobalMarker(T3526807654_2);
nimRegisterGlobalMarker(T3526807654_4);
	LOC1 = (NimStringDesc*)0;
	LOC1 = curcaascmd_593201_3526807654; curcaascmd_593201_3526807654 = copyStringRC1(((NimStringDesc*) &T3526807654_3));
	if (LOC1) nimGCunrefNoCycle(LOC1);
	LOC2 = (NimStringDesc*)0;
	LOC2 = lastcaascmd_593202_3526807654; lastcaascmd_593202_3526807654 = copyStringRC1(((NimStringDesc*) &T3526807654_3));
	if (LOC2) nimGCunrefNoCycle(LOC2);
}
Example #9
0
NIM_EXTERNC N_NOINLINE(void, compiler_serviceInit000)(void) {
	NimStringDesc* T1_;
	NimStringDesc* T2_;
nimRegisterGlobalMarker(TM_AxyNANBXigTKyIcRAbufXw_2);
nimRegisterGlobalMarker(TM_AxyNANBXigTKyIcRAbufXw_4);
	T1_ = (NimStringDesc*)0;
	T1_ = curCaasCmd_d9bbs0fkusQpq9c9aV1N2b4Ew; curCaasCmd_d9bbs0fkusQpq9c9aV1N2b4Ew = copyStringRC1(((NimStringDesc*) &TM_AxyNANBXigTKyIcRAbufXw_3));
	if (T1_) nimGCunrefNoCycle(T1_);
	T2_ = (NimStringDesc*)0;
	T2_ = lastCaasCmd_XN0FKBK4eJUnsxrDhlKHzg; lastCaasCmd_XN0FKBK4eJUnsxrDhlKHzg = copyStringRC1(((NimStringDesc*) &TM_AxyNANBXigTKyIcRAbufXw_3));
	if (T2_) nimGCunrefNoCycle(T2_);
}
Example #10
0
NIM_EXTERNC N_NOINLINE(void, compiler_serviceInit)(void) {
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	nimfr("service", "service.nim")
	nimln(24, "service.nim");
	LOC1 = 0;
	LOC1 = curcaascmd_521204; curcaascmd_521204 = copyStringRC1(((NimStringDesc*) &TMP10628));
	if (LOC1) nimGCunrefNoCycle(LOC1);
	nimln(25, "service.nim");
	LOC2 = 0;
	LOC2 = lastcaascmd_521205; lastcaascmd_521205 = copyStringRC1(((NimStringDesc*) &TMP10628));
	if (LOC2) nimGCunrefNoCycle(LOC2);
	popFrame();
}
Example #11
0
N_NIMCALL(Tctx263036*, newctx_263267)(Tsym214822* module) {
	Tctx263036* result;
	Tctx263036* LOC1;
	PprocHEX3Aobjecttype263221* LOC2;
	NimStringDesc* LOC3;
	result = 0;
	LOC1 = 0;
	LOC1 = (Tctx263036*) newObj((&NTI263034), sizeof(Tctx263036));
	(*LOC1).Sup.Sup.m_type = (&NTI263036);
	if ((*LOC1).code) nimGCunrefNoCycle((*LOC1).code);
	(*LOC1).code = (TY263242*) newSeqRC1((&NTI263242), 0);
	if ((*LOC1).debug) nimGCunrefNoCycle((*LOC1).debug);
	(*LOC1).debug = (TY183093*) newSeqRC1((&NTI183093), 0);
	asgnRefNoCycle((void**) (&(*LOC1).globals), newnode_215401(((NU8) 126)));
	asgnRefNoCycle((void**) (&(*LOC1).constants), newnode_215401(((NU8) 115)));
	if ((*LOC1).types) nimGCunrefNoCycle((*LOC1).types);
	(*LOC1).types = (Ttypeseq214824*) newSeqRC1((&NTI214824), 0);
	LOC2 = 0;
	LOC2 = (PprocHEX3Aobjecttype263221*) newObj((&NTI263028), sizeof(PprocHEX3Aobjecttype263221));
	if ((*LOC2).blocks) nimGCunrefNoCycle((*LOC2).blocks);
	(*LOC2).blocks = (TY263222*) newSeqRC1((&NTI263222), 0);
	asgnRefNoCycle((void**) (&(*LOC1).prc), LOC2);
	asgnRefNoCycle((void**) (&(*LOC1).module), module);
	(*LOC1).loopiterations = ((NI) 1500000);
	(*LOC1).comesfromheuristic = unknownlineinfo_183090();
	if ((*LOC1).callbacks) nimGCunref((*LOC1).callbacks);
	(*LOC1).callbacks = (TY263261*) newSeqRC1((&NTI263261), 0);
	LOC3 = 0;
	LOC3 = (*LOC1).errorflag; (*LOC1).errorflag = copyStringRC1(((NimStringDesc*) &TMP2843));
	if (LOC3) nimGCunrefNoCycle(LOC3);
	result = LOC1;
	return result;
}
Example #12
0
N_NIMCALL(void, send_518209)(Socketimpl513407* socket, NimStringDesc* data, NU8 flags) {
	NI sent;
{	sent = send_517716(socket, ((void*) (data->data)), (data ? data->Sup.len : 0));
	{
		NI32 lasterror;
		if (!(sent < ((NI) 0))) goto LA3;
		lasterror = oslasterror_115833();
		{
			NIM_BOOL LOC7;
			LOC7 = 0;
			LOC7 = isdisconnectionerror_513481(flags, lasterror);
			if (!LOC7) goto LA8;
			goto BeforeRet;
		}
		LA8: ;
		socketerror_514027(socket, ((NI) -1), NIM_FALSE, lasterror);
	}
	LA3: ;
	{
		Oserror3433* e_518220;
		NimStringDesc* LOC14;
		if (!!((sent == (data ? data->Sup.len : 0)))) goto LA12;
		e_518220 = 0;
		e_518220 = (Oserror3433*) newObj((&NTI115812), sizeof(Oserror3433));
		(*e_518220).Sup.Sup.Sup.m_type = (&NTI3433);
		LOC14 = 0;
		LOC14 = (*e_518220).Sup.Sup.message; (*e_518220).Sup.Sup.message = copyStringRC1(((NimStringDesc*) &TMP4996));
		if (LOC14) nimGCunrefNoCycle(LOC14);
		raiseException((Exception*)e_518220, "OSError");
	}
	LA12: ;
	}BeforeRet: ;
}
Example #13
0
N_NIMCALL(void, rawinsert_137893)(ttable137540* t, tkeyvaluepairseq137543** data, NimStringDesc* key, NI32 val) {
	NI h;
	NI LOC1;
	NimStringDesc* LOC3;
	nimfr("RawInsert", "tables.nim")
	nimln(81, "tables.nim");
	nimln(81, "tables.nim");
	nimln(81, "tables.nim");
	LOC1 = 0;
	LOC1 = hash_111826(key);
	nimln(81, "tables.nim");
	h = (NI)(LOC1 & ((*data)->Sup.len-1));
	nimln(82, "tables.nim");
	while (1) {
		nimln(82, "tables.nim");
		if ((NU)(h) >= (NU)((*data)->Sup.len)) raiseIndexError();
		if (!((*data)->data[h].Field0 == ((NU8) 1))) goto LA2;
		nimln(83, "tables.nim");
		nimln(83, "tables.nim");
		h = nexttry_118405(h, ((*data)->Sup.len-1));
	} LA2: ;
	nimln(84, "tables.nim");
	if ((NU)(h) >= (NU)((*data)->Sup.len)) raiseIndexError();
	LOC3 = 0;
	LOC3 = (*data)->data[h].Field1; (*data)->data[h].Field1 = copyStringRC1(key);
	if (LOC3) nimGCunrefNoCycle(LOC3);
	nimln(85, "tables.nim");
	if ((NU)(h) >= (NU)((*data)->Sup.len)) raiseIndexError();
	(*data)->data[h].Field2 = val;
	nimln(86, "tables.nim");
	if ((NU)(h) >= (NU)((*data)->Sup.len)) raiseIndexError();
	(*data)->data[h].Field0 = ((NU8) 1);
	popFrame();
}
Example #14
0
N_NIMCALL(Tctx_hJGtOysUvnnuB9cLutWG9a2w*, newctx_hd62uCqiA5HQrQPFO4Zv8g)(Tsym_AXG7xcvKqaxY6koRX1xkCw* module0, IdentcacheHEX3Aobjecttype_TzLHS09bRH9a0TYLs39cqcNaw* cache0) {
	Tctx_hJGtOysUvnnuB9cLutWG9a2w* result0;
	Tctx_hJGtOysUvnnuB9cLutWG9a2w* LOC1;
	PprocHEX3Aobjecttype_VFEBuxrDHC6kHPzc1TWaRQ* LOC2;
	NimStringDesc* LOC3;
	result0 = (Tctx_hJGtOysUvnnuB9cLutWG9a2w*)0;
	LOC1 = (Tctx_hJGtOysUvnnuB9cLutWG9a2w*)0;
	LOC1 = (Tctx_hJGtOysUvnnuB9cLutWG9a2w*) newObj((&NTI_gNGB4FjqF4LwE1IhC7zxeQ), sizeof(Tctx_hJGtOysUvnnuB9cLutWG9a2w));
	(*LOC1).Sup.Sup.m_type = (&NTI_hJGtOysUvnnuB9cLutWG9a2w);
	if ((*LOC1).code) nimGCunrefNoCycle((*LOC1).code);
	(*LOC1).code = (TY_9bAGqSvkAaFL9bWjsEPslrFA*) newSeqRC1((&NTI_9bAGqSvkAaFL9bWjsEPslrFA), 0);
	if ((*LOC1).debug) nimGCunrefNoCycle((*LOC1).debug);
	(*LOC1).debug = (TY_dRkMGUPOSmkGlhHeIeiomQ*) newSeqRC1((&NTI_dRkMGUPOSmkGlhHeIeiomQ), 0);
	asgnRefNoCycle((void**) (&(*LOC1).globals), newnode_IgnRxkID5wXTWvTZf9ct0rA(((Tnodekind_G4E4Gxe7oI2Cm03rkiOzQw) 126)));
	asgnRefNoCycle((void**) (&(*LOC1).constants), newnode_IgnRxkID5wXTWvTZf9ct0rA(((Tnodekind_G4E4Gxe7oI2Cm03rkiOzQw) 115)));
	if ((*LOC1).types) nimGCunrefNoCycle((*LOC1).types);
	(*LOC1).types = (TY_zuqP4Riz26Oi5fWgPYVEgA*) newSeqRC1((&NTI_zuqP4Riz26Oi5fWgPYVEgA), 0);
	LOC2 = (PprocHEX3Aobjecttype_VFEBuxrDHC6kHPzc1TWaRQ*)0;
	LOC2 = (PprocHEX3Aobjecttype_VFEBuxrDHC6kHPzc1TWaRQ*) newObj((&NTI_FM7mzTFsA8pyUhXVKKO6Gw), sizeof(PprocHEX3Aobjecttype_VFEBuxrDHC6kHPzc1TWaRQ));
	if ((*LOC2).blocks) nimGCunrefNoCycle((*LOC2).blocks);
	(*LOC2).blocks = (TY_JokFGfUW6i9b6aeU7xu6xBw*) newSeqRC1((&NTI_JokFGfUW6i9b6aeU7xu6xBw), 0);
	asgnRefNoCycle((void**) (&(*LOC1).prc), LOC2);
	asgnRefNoCycle((void**) (&(*LOC1).module), module0);
	(*LOC1).loopiterations = ((NI) 1500000);
	(*LOC1).comesfromheuristic = unknownlineinfo_Ad9ctQofZYxhKVXoXjdL0Fw();
	if ((*LOC1).callbacks) nimGCunref((*LOC1).callbacks);
	(*LOC1).callbacks = (TY_RsxI3z4wK8jTuZiO0576gQ*) newSeqRC1((&NTI_RsxI3z4wK8jTuZiO0576gQ), 0);
	LOC3 = (NimStringDesc*)0;
	LOC3 = (*LOC1).errorflag; (*LOC1).errorflag = copyStringRC1(((NimStringDesc*) &T_LKTmeQxNOMAggl6ESLJFSg_17));
	if (LOC3) nimGCunrefNoCycle(LOC3);
	asgnRefNoCycle((void**) (&(*LOC1).cache), cache0);
	result0 = LOC1;
	return result0;
}
Example #15
0
N_NIMCALL(void, getservbyname_511027)(NimStringDesc* name, NimStringDesc* proto, Servent509610* Result) {
	struct servent* s;
	nimfr("getServByName", "rawsockets.nim")
	nimln(245, "rawsockets.nim");
	s = getservbyname(name->data, proto->data);
	nimln(246, "rawsockets.nim");
	{
		Oserror3433* e_511216;
		NimStringDesc* LOC5;
		if (!(s == NIM_NIL)) goto LA3;
		e_511216 = 0;
		nimln(2265, "system.nim");
		e_511216 = (Oserror3433*) newObj((&NTI116812), sizeof(Oserror3433));
		(*e_511216).Sup.Sup.Sup.m_type = (&NTI3433);
		nimln(2266, "system.nim");
		LOC5 = 0;
		LOC5 = (*e_511216).Sup.Sup.message; (*e_511216).Sup.Sup.message = copyStringRC1(((NimStringDesc*) &TMP10617));
		if (LOC5) nimGCunrefNoCycle(LOC5);
		nimln(246, "rawsockets.nim");
		raiseException((Exception*)e_511216, "OSError");
	}
	LA3: ;
	nimln(247, "rawsockets.nim");
	unsureAsgnRef((void**) (&(*Result).name), cstrToNimstr((*s).s_name));
	nimln(248, "rawsockets.nim");
	unsureAsgnRef((void**) (&(*Result).aliases), cstringarraytoseq_13843((*s).s_aliases));
	nimln(249, "rawsockets.nim");
	(*Result).port = ((NU16) ((*s).s_port));
	nimln(250, "rawsockets.nim");
	unsureAsgnRef((void**) (&(*Result).proto), cstrToNimstr((*s).s_proto));
	popFrame();
}
Example #16
0
N_NIMCALL(void, nstPut)(Stringtableobj140209* t, NimStringDesc* key, NimStringDesc* val) {
	NI index;
	index = rawget_140406(t, key);
	{
		NimStringDesc* LOC5;
		if (!(((NI) 0) <= index)) goto LA3;
		LOC5 = 0;
		LOC5 = (*t).data->data[index].Field1; (*t).data->data[index].Field1 = copyStringRC1(val);
		if (LOC5) nimGCunrefNoCycle(LOC5);
	}
	goto LA1;
	LA3: ;
	{
		{
			NIM_BOOL LOC9;
			LOC9 = 0;
			LOC9 = mustrehash_140315(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
			if (!LOC9) goto LA10;
			enlarge_140835(t);
		}
		LA10: ;
		rawinsert_140825(t, (&(*t).data), key, val);
		(*t).counter += ((NI) 1);
	}
	LA1: ;
}
Example #17
0
N_NIMCALL(void, rawinsert_167956)(ttable167560* t_167965, tkeyvaluepairseq167563** data_167973, NimStringDesc* key_167977, NI32 val_167979) {
	NI h;
	NI LOC1;
	NimStringDesc* LOC3;
	nimfr("rawInsert", "tables.nim")
	nimln(123, "tables.nim");
	nimln(123, "tables.nim");
	nimln(123, "tables.nim");
	LOC1 = 0;
	LOC1 = hash_120827(key_167977);
	nimln(123, "tables.nim");
	h = (NI)(LOC1 & ((*data_167973)->Sup.len-1));
	nimln(124, "tables.nim");
	while (1) {
		nimln(124, "tables.nim");
		if ((NU)(h) >= (NU)((*data_167973)->Sup.len)) raiseIndexError();
		if (!((*data_167973)->data[h].Field0 == ((NU8) 1))) goto LA2;
		nimln(125, "tables.nim");
		nimln(125, "tables.nim");
		h = nexttry_141606(h, ((*data_167973)->Sup.len-1));
	} LA2: ;
	nimln(126, "tables.nim");
	if ((NU)(h) >= (NU)((*data_167973)->Sup.len)) raiseIndexError();
	LOC3 = 0;
	LOC3 = (*data_167973)->data[h].Field1; (*data_167973)->data[h].Field1 = copyStringRC1(key_167977);
	if (LOC3) nimGCunrefNoCycle(LOC3);
	nimln(127, "tables.nim");
	if ((NU)(h) >= (NU)((*data_167973)->Sup.len)) raiseIndexError();
	(*data_167973)->data[h].Field2 = val_167979;
	nimln(128, "tables.nim");
	if ((NU)(h) >= (NU)((*data_167973)->Sup.len)) raiseIndexError();
	(*data_167973)->data[h].Field0 = ((NU8) 1);
	popFrame();
}
Example #18
0
N_NIMCALL(Tctx242048*, newctx_242281)(Tsym190843* module) {
	Tctx242048* result;
	Tctx242048* LOC1;
	PprocHEX3Aobjecttype242232* LOC2;
	NimStringDesc* LOC3;
	result = 0;
	LOC1 = 0;
	LOC1 = (Tctx242048*) newObj((&NTI242046), sizeof(Tctx242048));
	(*LOC1).Sup.Sup.m_type = (&NTI242048);
	if ((*LOC1).code) nimGCunrefNoCycle((*LOC1).code);
	(*LOC1).code = (TY242253*) newSeqRC1((&NTI242253), 0);
	if ((*LOC1).debug) nimGCunrefNoCycle((*LOC1).debug);
	(*LOC1).debug = (TY163040*) newSeqRC1((&NTI163040), 0);
	asgnRefNoCycle((void**) (&(*LOC1).globals), newnode_191401(((NU8) 126)));
	asgnRefNoCycle((void**) (&(*LOC1).constants), newnode_191401(((NU8) 115)));
	if ((*LOC1).types) nimGCunrefNoCycle((*LOC1).types);
	(*LOC1).types = (Ttypeseq190845*) newSeqRC1((&NTI190845), 0);
	LOC2 = 0;
	LOC2 = (PprocHEX3Aobjecttype242232*) newObj((&NTI242040), sizeof(PprocHEX3Aobjecttype242232));
	if ((*LOC2).blocks) nimGCunrefNoCycle((*LOC2).blocks);
	(*LOC2).blocks = (TY242233*) newSeqRC1((&NTI242233), 0);
	asgnRefNoCycle((void**) (&(*LOC1).prc), LOC2);
	asgnRefNoCycle((void**) (&(*LOC1).module), module);
	(*LOC1).loopiterations = ((NI) 1500000);
	(*LOC1).comesfromheuristic = unknownlineinfo_163031();
	if ((*LOC1).callbacks) nimGCunref((*LOC1).callbacks);
	(*LOC1).callbacks = (TY242272*) newSeqRC1((&NTI242272), 0);
	LOC3 = 0;
	LOC3 = (*LOC1).errorflag; (*LOC1).errorflag = copyStringRC1(((NimStringDesc*) &TMP2695));
	if (LOC3) nimGCunrefNoCycle(LOC3);
	result = LOC1;
	return result;
}
Example #19
0
N_NIMCALL(NimStringDesc*, paramstr_124809)(NI i) {
	NimStringDesc* result;
	Indexerror3455* e_124815;
	NimStringDesc* LOC7;
{	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = (i < ((NI) (cmdCount)));
		if (!(LOC3)) goto LA4;
		LOC3 = (((NI) 0) <= i);
		LA4: ;
		if (!LOC3) goto LA5;
		result = cstrToNimstr(cmdLine[(i)- 0]);
		goto BeforeRet;
	}
	LA5: ;
	e_124815 = 0;
	e_124815 = (Indexerror3455*) newObj((&NTI124816), sizeof(Indexerror3455));
	(*e_124815).Sup.Sup.m_type = (&NTI3455);
	LOC7 = 0;
	LOC7 = (*e_124815).Sup.message; (*e_124815).Sup.message = copyStringRC1(((NimStringDesc*) &TMP1146));
	if (LOC7) nimGCunrefNoCycle(LOC7);
	raiseException((Exception*)e_124815, "IndexError");
	}BeforeRet: ;
	return result;
}
Example #20
0
N_NIMCALL(void, clear_145256)(Stringtableobj144212* s, NU8 mode) {
    (*s).mode = mode;
    (*s).counter = ((NI) 0);
    (*s).data = (Keyvaluepairseq144210*) setLengthSeq(&((*s).data)->Sup, sizeof(TY145352), ((NI) 64));
    {
        NI i_145296;
        NI HEX3Atmp_145298;
        NI res_145301;
        i_145296 = 0;
        HEX3Atmp_145298 = 0;
        HEX3Atmp_145298 = (((*s).data ? (*s).data->Sup.len : 0) - 1);
        res_145301 = ((NI) 0);
        {
            while (1) {
                if (!(res_145301 <= HEX3Atmp_145298)) goto LA3;
                i_145296 = res_145301;
                {
                    NimStringDesc* LOC8;
                    if (!!((*s).data->data[i_145296].Field0 == 0)) goto LA6;
                    LOC8 = 0;
                    LOC8 = (*s).data->data[i_145296].Field0;
                    (*s).data->data[i_145296].Field0 = copyStringRC1(NIM_NIL);
                    if (LOC8) nimGCunrefNoCycle(LOC8);
                }
LA6:
                ;
                res_145301 += ((NI) 1);
            }
LA3:
            ;
        }
    }
}
Example #21
0
N_NIMCALL(void, getservbyport_511233)(NU16 port, NimStringDesc* proto, Servent509610* Result) {
	struct servent* s;
	nimfr("getServByPort", "rawsockets.nim")
	nimln(261, "rawsockets.nim");
	s = getservbyport(((int) (((NI)(NU)(NU16)(((NI16)chckRange(port, ((NI16) -32768), ((NI16) 32767))))))), proto->data);
	nimln(262, "rawsockets.nim");
	{
		Oserror3433* e_511416;
		NimStringDesc* LOC5;
		if (!(s == NIM_NIL)) goto LA3;
		e_511416 = 0;
		nimln(2265, "system.nim");
		e_511416 = (Oserror3433*) newObj((&NTI116812), sizeof(Oserror3433));
		(*e_511416).Sup.Sup.Sup.m_type = (&NTI3433);
		nimln(2266, "system.nim");
		LOC5 = 0;
		LOC5 = (*e_511416).Sup.Sup.message; (*e_511416).Sup.Sup.message = copyStringRC1(((NimStringDesc*) &TMP10617));
		if (LOC5) nimGCunrefNoCycle(LOC5);
		nimln(262, "rawsockets.nim");
		raiseException((Exception*)e_511416, "OSError");
	}
	LA3: ;
	nimln(263, "rawsockets.nim");
	unsureAsgnRef((void**) (&(*Result).name), cstrToNimstr((*s).s_name));
	nimln(264, "rawsockets.nim");
	unsureAsgnRef((void**) (&(*Result).aliases), cstringarraytoseq_13843((*s).s_aliases));
	nimln(265, "rawsockets.nim");
	(*Result).port = ((NU16) ((*s).s_port));
	nimln(266, "rawsockets.nim");
	unsureAsgnRef((void**) (&(*Result).proto), cstrToNimstr((*s).s_proto));
	popFrame();
}
Example #22
0
N_NIMCALL(tstringstream126030*, newstringstream_126131)(NimStringDesc* s) {
	tstringstream126030* result;
	NimStringDesc* LOC1;
	nimfr("newStringStream", "streams.nim")
	result = 0;
	nimln(234, "streams.nim");
	result = (tstringstream126030*) newObj((&NTI126028), sizeof(tstringstream126030));
	(*result).Sup.Sup.m_type = (&NTI126030);
	nimln(235, "streams.nim");
	LOC1 = 0;
	LOC1 = (*result).Data; (*result).Data = copyStringRC1(s);
	if (LOC1) nimGCunrefNoCycle(LOC1);
	nimln(236, "streams.nim");
	(*result).Pos = 0;
	nimln(237, "streams.nim");
	(*result).Sup.Closeimpl = ssclose_126125;
	nimln(238, "streams.nim");
	(*result).Sup.Atendimpl = ssatend_126034;
	nimln(239, "streams.nim");
	(*result).Sup.Setpositionimpl = sssetposition_126041;
	nimln(240, "streams.nim");
	(*result).Sup.Getpositionimpl = ssgetposition_126062;
	nimln(241, "streams.nim");
	(*result).Sup.Readdataimpl = ssreaddata_126069;
	nimln(242, "streams.nim");
	(*result).Sup.Writedataimpl = sswritedata_126099;
	popFrame();
	return result;
}
Example #23
0
N_NIMCALL(tstringstream142999*, newstringstream_143088)(NimStringDesc* s) {
	tstringstream142999* result;
	NimStringDesc* LOC1;
	nimfr("newStringStream", "streams.nim")
	result = 0;
	nimln(232, "streams.nim");
	result = (tstringstream142999*) newObj((&NTI142997), sizeof(tstringstream142999));
	(*result).Sup.Sup.m_type = (&NTI142999);
	nimln(233, "streams.nim");
	LOC1 = 0;
	LOC1 = (*result).Data; (*result).Data = copyStringRC1(s);
	if (LOC1) nimGCunrefNoCycle(LOC1);
	nimln(234, "streams.nim");
	(*result).Pos = 0;
	nimln(235, "streams.nim");
	(*result).Sup.Closeimpl = ssclose_143082;
	nimln(236, "streams.nim");
	(*result).Sup.Atendimpl = ssatend_143003;
	nimln(237, "streams.nim");
	(*result).Sup.Setpositionimpl = sssetposition_143010;
	nimln(238, "streams.nim");
	(*result).Sup.Getpositionimpl = ssgetposition_143031;
	nimln(239, "streams.nim");
	(*result).Sup.Readdataimpl = ssreaddata_143038;
	nimln(240, "streams.nim");
	(*result).Sup.Writedataimpl = sswritedata_143062;
	popFrame();
	return result;
}
N_NIMCALL(Tctx345035*, newctx_345286_984354655)(Tsym294834* module0) {
	Tctx345035* result0;
	Tctx345035* LOC1;
	PprocHEX3Aobjecttype345220* LOC2;
	NimStringDesc* LOC3;
	result0 = (Tctx345035*)0;
	LOC1 = (Tctx345035*)0;
	LOC1 = (Tctx345035*) newObj((&NTI345033), sizeof(Tctx345035));
	(*LOC1).Sup.Sup.m_type = (&NTI345035);
	if ((*LOC1).code) nimGCunrefNoCycle((*LOC1).code);
	(*LOC1).code = (TY345241*) newSeqRC1((&NTI345241), 0);
	if ((*LOC1).debug) nimGCunrefNoCycle((*LOC1).debug);
	(*LOC1).debug = (TY194083*) newSeqRC1((&NTI194083), 0);
	asgnRefNoCycle((void**) (&(*LOC1).globals), newnode_295401_850551059(((Tnodekind294020) 126)));
	asgnRefNoCycle((void**) (&(*LOC1).constants), newnode_295401_850551059(((Tnodekind294020) 115)));
	if ((*LOC1).types) nimGCunrefNoCycle((*LOC1).types);
	(*LOC1).types = (Ttypeseq294836*) newSeqRC1((&NTI294836), 0);
	LOC2 = (PprocHEX3Aobjecttype345220*)0;
	LOC2 = (PprocHEX3Aobjecttype345220*) newObj((&NTI345027), sizeof(PprocHEX3Aobjecttype345220));
	if ((*LOC2).blocks) nimGCunrefNoCycle((*LOC2).blocks);
	(*LOC2).blocks = (TY345221*) newSeqRC1((&NTI345221), 0);
	asgnRefNoCycle((void**) (&(*LOC1).prc), LOC2);
	asgnRefNoCycle((void**) (&(*LOC1).module), module0);
	(*LOC1).loopiterations = ((NI) 1500000);
	(*LOC1).comesfromheuristic = unknownlineinfo_194080_155036129();
	if ((*LOC1).callbacks) nimGCunref((*LOC1).callbacks);
	(*LOC1).callbacks = (TY345260*) newSeqRC1((&NTI345260), 0);
	LOC3 = (NimStringDesc*)0;
	LOC3 = (*LOC1).errorflag; (*LOC1).errorflag = copyStringRC1(((NimStringDesc*) &T984354655_23));
	if (LOC3) nimGCunrefNoCycle(LOC3);
	result0 = LOC1;
	return result0;
}
Example #25
0
N_NIMCALL(void, nstPut)(tstringtable112610* t, NimStringDesc* key, NimStringDesc* val) {
	NI index;
	nimfr("[]=", "strtabs.nim")
	nimln(135, "strtabs.nim");
	index = rawget_112812(t, key);
	nimln(136, "strtabs.nim");
	{
		NimStringDesc* LOC5;
		nimln(702, "system.nim");
		if (!(0 <= index)) goto LA3;
		nimln(137, "strtabs.nim");
		if ((NU)(index) >= (NU)((*t).Data->Sup.len)) raiseIndexError();
		LOC5 = 0;
		LOC5 = (*t).Data->data[index].Field1; (*t).Data->data[index].Field1 = copyStringRC1(val);
		if (LOC5) nimGCunrefNoCycle(LOC5);
	}	goto LA1;
	LA3: ;
	{
		nimln(139, "strtabs.nim");
		{
			NIM_BOOL LOC9;
			nimln(139, "strtabs.nim");
			nimln(139, "strtabs.nim");
			LOC9 = 0;
			LOC9 = mustrehash_112717((*t).Data->Sup.len, (*t).Counter);
			if (!LOC9) goto LA10;
			nimln(139, "strtabs.nim");
			enlarge_112876(t);		}		LA10: ;
		nimln(140, "strtabs.nim");
		rawinsert_112864(t, &(*t).Data, key, val);		nimln(141, "strtabs.nim");
		(*t).Counter = addInt((*t).Counter, 1);
	}	LA1: ;
	popFrame();
}
Example #26
0
N_LIB_PRIVATE N_NIMCALL(void, nstPut)(tyObject_StringTableObj_V5PVrt9bIxZEeV7lfvqqtNg* t, NimStringDesc* key, NimStringDesc* val) {
	NI index;
	index = rawGet_j2b5ExM8jHC3fdJfR8v9aMw(t, key);
	{
		NimStringDesc* T5_;
		if (!(((NI) 0) <= index)) goto LA3_;
		T5_ = (NimStringDesc*)0;
		T5_ = (*t).data->data[index].Field1; (*t).data->data[index].Field1 = copyStringRC1(val);
		if (T5_) nimGCunrefNoCycle(T5_);
	}
	goto LA1_;
	LA3_: ;
	{
		{
			NI T9_;
			NIM_BOOL T10_;
			T9_ = ((*t).data ? (*t).data->Sup.len : 0);
			T10_ = (NIM_BOOL)0;
			T10_ = mustRehash_K02IbeDTRFZ9b4m0M4Kahlg(T9_, (*t).counter);
			if (!T10_) goto LA11_;
			enlarge_FXZDHKcgdiC22y7FlOWZOQ(t);
		}
		LA11_: ;
		rawInsert_XSijCUNMoyDFcaS9bIkWTUQ(t, (&(*t).data), key, val);
		(*t).counter += ((NI) 1);
	}
	LA1_: ;
}
Example #27
0
N_NIMCALL(trope148007*, newrope_148135)(NimStringDesc* data) {
	trope148007* result;
	nimfr("newRope", "ropes.nim")
	result = 0;
	nimln(108, "ropes.nim");
	result = (trope148007*) newObj((&NTI148005), sizeof(trope148007));
	(*result).Sup.m_type = (&NTI148007);
	nimln(109, "ropes.nim");
	{
		NimStringDesc* LOC5;
		nimln(109, "ropes.nim");
		nimln(109, "ropes.nim");
		if (!!((data == NIM_NIL))) goto LA3;
		nimln(110, "ropes.nim");
		nimln(110, "ropes.nim");
		(*result).Length = data->Sup.len;
		nimln(111, "ropes.nim");
		LOC5 = 0;
		LOC5 = (*result).Data; (*result).Data = copyStringRC1(data);
		if (LOC5) nimGCunrefNoCycle(LOC5);
	}
	LA3: ;
	popFrame();
	return result;
}
Example #28
0
N_NIMCALL(void, ssclose_137661)(Streamobj137027* s_137663) {
	Stringstreamobj137554* s;
	NimStringDesc* LOC1;
	s = ((Stringstreamobj137554*) (s_137663));
	LOC1 = 0;
	LOC1 = (*s).data; (*s).data = copyStringRC1(NIM_NIL);
	if (LOC1) nimGCunrefNoCycle(LOC1);
}
Example #29
0
N_NIMCALL(void, ssclose_qQbp4Nsuc4ou9bqUUbaqJ6A_3)(Streamobj_RShkcoDOPnoCVhtpN1hDPQ* s_0oKy9bw20eQoZnoPxmQTRPQ) {
	Stringstreamobj_lGsM0FdhfyxyplfYoMsgFQ* s0;
	NimStringDesc* LOC1;
	s0 = ((Stringstreamobj_lGsM0FdhfyxyplfYoMsgFQ*) (s_0oKy9bw20eQoZnoPxmQTRPQ));
	LOC1 = (NimStringDesc*)0;
	LOC1 = (*s0).data; (*s0).data = copyStringRC1(NIM_NIL);
	if (LOC1) nimGCunrefNoCycle(LOC1);
}
N_NIMCALL(void, ssclose_158858_1780494535)(Streamobj157818* s_158860_1780494535) {
	Stringstreamobj158777* s0;
	NimStringDesc* LOC1;
	s0 = ((Stringstreamobj158777*) (s_158860_1780494535));
	LOC1 = (NimStringDesc*)0;
	LOC1 = (*s0).data; (*s0).data = copyStringRC1(NIM_NIL);
	if (LOC1) nimGCunrefNoCycle(LOC1);
}