-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression from 1.6 to 2.0 (not present in devel
): Error: internal error: environment misses: m
#23466
Comments
!nim c import std/tables
template k(m: untyped): untyped =
var result: seq[typeof(m)]
for x in m:
result.add(x)
result
iterator g(m: Table[int, int]): int =
for h, e in m.keys.k:
discard
yield 0
proc y() =
proc b() =
for w in g(default(Table[int, int])):
discard
b()
y() |
🐧 Linux bisect by @juancarlospaco (collaborator)devel 👍 OKOutput
IRCompiled filesize99.02 Kb (101,392 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
#include <string.h>
#define nimfr_(proc, file) \
TFrame FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);
#define nimfrs_(proc, file, slots, length) \
struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename;NI len;VarSlot s[slots];} FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);
#define nimln_(n) \
FR_.line = n;
#define nimlf_(n, file) \
FR_.line = n; FR_.filename = file;
typedef struct tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q;
typedef struct tySequence__E8pi9b5QNahsURYzXMjh3qw tySequence__E8pi9b5QNahsURYzXMjh3qw;
typedef struct tySequence__E8pi9b5QNahsURYzXMjh3qw_Content tySequence__E8pi9b5QNahsURYzXMjh3qw_Content;
typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g tySequence__qwqHTkRvwhrRyENtudHQ7g;
typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content tySequence__qwqHTkRvwhrRyENtudHQ7g_Content;
typedef struct tyTuple__47w2DboNEPf69aPgubZdd7Q tyTuple__47w2DboNEPf69aPgubZdd7Q;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
struct tySequence__E8pi9b5QNahsURYzXMjh3qw {
NI len; tySequence__E8pi9b5QNahsURYzXMjh3qw_Content* p;
};
struct tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q {
tySequence__E8pi9b5QNahsURYzXMjh3qw data;
NI counter;
};
struct tySequence__qwqHTkRvwhrRyENtudHQ7g {
NI len; tySequence__qwqHTkRvwhrRyENtudHQ7g_Content* p;
};
struct tyTuple__47w2DboNEPf69aPgubZdd7Q {
NI Field0;
NI Field1;
NI Field2;
};
struct NimStrPayload {
NI cap;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
NI len;
NimStrPayload* p;
};
struct tySequence__E8pi9b5QNahsURYzXMjh3qw_Content { NI cap; tyTuple__47w2DboNEPf69aPgubZdd7Q data[SEQ_DECL_SIZE]; };
struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content { NI cap; NI data[SEQ_DECL_SIZE]; };
N_LIB_PRIVATE N_NIMCALL(void, y__temp_u572)(void);
N_LIB_PRIVATE N_NIMCALL(void, b__temp_u573)(void);
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);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(NI, len__temp_u59)(tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q t_p0);
static N_INLINE(NIM_BOOL, isFilled__pureZcollectionsZtables_u31)(NI hcode_p0);
static N_INLINE(void, nimFrame)(TFrame* s_p0);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4608)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i_p0, NI n_p1);
N_LIB_PRIVATE N_NIMCALL(void, add__temp_u365)(tySequence__qwqHTkRvwhrRyENtudHQ7g* x_p0, NI y_p1);
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl__stdZassertions_u254)(NimStringV2 msg_p0);
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___temp_u426)(tySequence__qwqHTkRvwhrRyENtudHQ7g* dest_p0, tySequence__qwqHTkRvwhrRyENtudHQ7g src_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u417)(tySequence__qwqHTkRvwhrRyENtudHQ7g dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, alignedDealloc)(void* p_p0, NI align_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u554)(tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
static const struct {
NI cap; NIM_CHAR data[156+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_2 = { 156 | NIM_STRLIT_FLAG, "/home/runner/.choosenim/toolchains/nim-#devel/lib/pure/collections/tables.nim(753, 13) `len(t) == L` the length of the table changed while iterating over it" };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_3 = {156, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_2};
static const struct {
NI cap; NIM_CHAR data[147+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_5 = { 147 | NIM_STRLIT_FLAG, "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/iterators.nim(187, 11) `len(a) == L` the length of the seq changed while iterating over it" };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_6 = {147, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_5};
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4392;
extern NIM_THREADVAR TFrame* framePtr__system_u2688;
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(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (&nimInErrorMode__system_u4392);
return result;
}
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_: ;
}
static N_INLINE(void, nimFrame)(TFrame* s_p0) {
{
if (!(framePtr__system_u2688 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s_p0).calldepth = ((NI16)0);
}
goto LA1_;
LA3_: ;
{
(*s_p0).calldepth = (NI16)((*framePtr__system_u2688).calldepth + ((NI16)1));
}
LA1_: ;
(*s_p0).prev = framePtr__system_u2688;
framePtr__system_u2688 = s_p0;
{
if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_;
callDepthLimitReached__system_u4608();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__system_u2688 = (*framePtr__system_u2688).prev;
}
static N_INLINE(NIM_BOOL, isFilled__pureZcollectionsZtables_u31)(NI hcode_p0) {
NIM_BOOL result;
nimfr_("isFilled", "/home/runner/.choosenim/toolchains/nim-#devel/lib/pure/collections/hashcommon.nim");
result = !((hcode_p0 == ((NI)0)));
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u417)(tySequence__qwqHTkRvwhrRyENtudHQ7g dest_p0) {
if (dest_p0.p && !(dest_p0.p->cap & NIM_STRLIT_FLAG)) {
alignedDealloc(dest_p0.p, NIM_ALIGNOF(NI));
}
}
N_LIB_PRIVATE N_NIMCALL(void, eqsink___temp_u426)(tySequence__qwqHTkRvwhrRyENtudHQ7g* dest_p0, tySequence__qwqHTkRvwhrRyENtudHQ7g src_p1) {
if ((*dest_p0).p != src_p1.p) { eqdestroy___temp_u417((*dest_p0));
}
(*dest_p0).len = src_p1.len; (*dest_p0).p = src_p1.p;
}
N_LIB_PRIVATE N_NIMCALL(void, b__temp_u573)(void) {
NIM_BOOL* nimErr_;
nimfr_("b", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q colontmp_;
NI w;
nimZeroMem((void*)(&colontmp_), sizeof(tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q));
w = (NI)0;
nimZeroMem((void*)(&colontmp_), sizeof(tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q));
{
tySequence__qwqHTkRvwhrRyENtudHQ7g colontmp__2;
tySequence__qwqHTkRvwhrRyENtudHQ7g resultX60gensym2_;
NI h;
NI e;
NI i;
NI L_2;
NI T18_;
colontmp__2.len = 0; colontmp__2.p = NIM_NIL;
resultX60gensym2_.len = 0; resultX60gensym2_.p = NIM_NIL;
h = (NI)0;
e = (NI)0;
{
NI* xX60gensym2_;
NI L;
xX60gensym2_ = (NI*)0;
L = len__temp_u59(colontmp_);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
{
NI h_2;
NI colontmp__3;
NI T5_;
NI res;
h_2 = (NI)0;
colontmp__3 = (NI)0;
T5_ = (colontmp_.data.len-1);
colontmp__3 = T5_;
res = ((NI)0);
{
while (1) {
NI TM__SRd76hP9cMfCzdUO857UhQQ_4;
if (!(res <= colontmp__3)) goto LA7;
h_2 = ((NI) (res));
{
NIM_BOOL T10_;
NI colontmpD_;
if (h_2 < 0 || h_2 >= colontmp_.data.len){ raiseIndexError2(h_2,colontmp_.data.len-1); goto BeforeRet_;
}
T10_ = (NIM_BOOL)0;
T10_ = isFilled__pureZcollectionsZtables_u31(colontmp_.data.p->data[h_2].Field0);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
if (!T10_) goto LA11_;
colontmpD_ = (NI)0;
if (h_2 < 0 || h_2 >= colontmp_.data.len){ raiseIndexError2(h_2,colontmp_.data.len-1); goto BeforeRet_;
}
xX60gensym2_ = (&colontmp_.data.p->data[h_2].Field1);
colontmpD_ = (*xX60gensym2_);
add__temp_u365((&resultX60gensym2_), colontmpD_);
{
NI T15_;
T15_ = (NI)0;
T15_ = len__temp_u59(colontmp_);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
if (!!((T15_ == L))) goto LA16_;
failedAssertImpl__stdZassertions_u254(TM__SRd76hP9cMfCzdUO857UhQQ_3);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA16_: ;
}
LA11_: ;
if (nimAddInt(res, ((NI)1), &TM__SRd76hP9cMfCzdUO857UhQQ_4)) { raiseOverflow(); goto BeforeRet_;
};
res = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_4);
} LA7: ;
}
}
}
eqsink___temp_u426((&colontmp__2), resultX60gensym2_);
i = ((NI)0);
T18_ = colontmp__2.len;
L_2 = T18_;
{
while (1) {
if (!(i < L_2)) goto LA20;
h = i;
if (i < 0 || i >= colontmp__2.len){ raiseIndexError2(i,colontmp__2.len-1); goto BeforeRet_;
}
e = colontmp__2.p->data[i];
i += ((NI)1);
{
NI T23_;
T23_ = colontmp__2.len;
if (!!((T23_ == L_2))) goto LA24_;
failedAssertImpl__stdZassertions_u254(TM__SRd76hP9cMfCzdUO857UhQQ_6);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA24_: ;
} LA20: ;
}
eqdestroy___temp_u417(colontmp__2);
}
w = ((NI)0);
eqdestroy___temp_u554((&colontmp_));
}
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, y__temp_u572)(void) {
NIM_BOOL* nimErr_;
nimfr_("y", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
b__temp_u573();
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE void PreMainInner(void) {
}
N_LIB_PRIVATE int cmdCount;
N_LIB_PRIVATE char** cmdLine;
N_LIB_PRIVATE char** gEnv;
N_LIB_PRIVATE void PreMain(void) {
#if 0
void (*volatile inner)(void);
inner = PreMainInner;
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000();
(*inner)();
#else
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000();
PreMainInner();
#endif
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
#if 0
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
(*inner)();
#else
PreMain();
NimMainInner();
#endif
}
int main(int argc, char** args, char** env) {
cmdLine = args;
cmdCount = argc;
gEnv = env;
NimMain();
return nim_program_result;
}
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) {
{
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
y__temp_u572();
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
} Stats
stable 👎 FAILOutput
IRCompiled filesize99.02 Kb (101,392 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
#include <string.h>
#define nimfr_(proc, file) \
TFrame FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);
#define nimfrs_(proc, file, slots, length) \
struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename;NI len;VarSlot s[slots];} FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);
#define nimln_(n) \
FR_.line = n;
#define nimlf_(n, file) \
FR_.line = n; FR_.filename = file;
typedef struct tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q;
typedef struct tySequence__E8pi9b5QNahsURYzXMjh3qw tySequence__E8pi9b5QNahsURYzXMjh3qw;
typedef struct tySequence__E8pi9b5QNahsURYzXMjh3qw_Content tySequence__E8pi9b5QNahsURYzXMjh3qw_Content;
typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g tySequence__qwqHTkRvwhrRyENtudHQ7g;
typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content tySequence__qwqHTkRvwhrRyENtudHQ7g_Content;
typedef struct tyTuple__47w2DboNEPf69aPgubZdd7Q tyTuple__47w2DboNEPf69aPgubZdd7Q;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
struct tySequence__E8pi9b5QNahsURYzXMjh3qw {
NI len; tySequence__E8pi9b5QNahsURYzXMjh3qw_Content* p;
};
struct tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q {
tySequence__E8pi9b5QNahsURYzXMjh3qw data;
NI counter;
};
struct tySequence__qwqHTkRvwhrRyENtudHQ7g {
NI len; tySequence__qwqHTkRvwhrRyENtudHQ7g_Content* p;
};
struct tyTuple__47w2DboNEPf69aPgubZdd7Q {
NI Field0;
NI Field1;
NI Field2;
};
struct NimStrPayload {
NI cap;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
NI len;
NimStrPayload* p;
};
struct tySequence__E8pi9b5QNahsURYzXMjh3qw_Content { NI cap; tyTuple__47w2DboNEPf69aPgubZdd7Q data[SEQ_DECL_SIZE]; };
struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content { NI cap; NI data[SEQ_DECL_SIZE]; };
N_LIB_PRIVATE N_NIMCALL(void, y__temp_u572)(void);
N_LIB_PRIVATE N_NIMCALL(void, b__temp_u573)(void);
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);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(NI, len__temp_u59)(tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q t_p0);
static N_INLINE(NIM_BOOL, isFilled__pureZcollectionsZtables_u31)(NI hcode_p0);
static N_INLINE(void, nimFrame)(TFrame* s_p0);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4608)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i_p0, NI n_p1);
N_LIB_PRIVATE N_NIMCALL(void, add__temp_u365)(tySequence__qwqHTkRvwhrRyENtudHQ7g* x_p0, NI y_p1);
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl__stdZassertions_u254)(NimStringV2 msg_p0);
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___temp_u426)(tySequence__qwqHTkRvwhrRyENtudHQ7g* dest_p0, tySequence__qwqHTkRvwhrRyENtudHQ7g src_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u417)(tySequence__qwqHTkRvwhrRyENtudHQ7g dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, alignedDealloc)(void* p_p0, NI align_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u554)(tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
static const struct {
NI cap; NIM_CHAR data[156+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_2 = { 156 | NIM_STRLIT_FLAG, "/home/runner/.choosenim/toolchains/nim-#devel/lib/pure/collections/tables.nim(753, 13) `len(t) == L` the length of the table changed while iterating over it" };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_3 = {156, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_2};
static const struct {
NI cap; NIM_CHAR data[147+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_5 = { 147 | NIM_STRLIT_FLAG, "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/iterators.nim(187, 11) `len(a) == L` the length of the seq changed while iterating over it" };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_6 = {147, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_5};
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4392;
extern NIM_THREADVAR TFrame* framePtr__system_u2688;
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(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (&nimInErrorMode__system_u4392);
return result;
}
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_: ;
}
static N_INLINE(void, nimFrame)(TFrame* s_p0) {
{
if (!(framePtr__system_u2688 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s_p0).calldepth = ((NI16)0);
}
goto LA1_;
LA3_: ;
{
(*s_p0).calldepth = (NI16)((*framePtr__system_u2688).calldepth + ((NI16)1));
}
LA1_: ;
(*s_p0).prev = framePtr__system_u2688;
framePtr__system_u2688 = s_p0;
{
if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_;
callDepthLimitReached__system_u4608();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__system_u2688 = (*framePtr__system_u2688).prev;
}
static N_INLINE(NIM_BOOL, isFilled__pureZcollectionsZtables_u31)(NI hcode_p0) {
NIM_BOOL result;
nimfr_("isFilled", "/home/runner/.choosenim/toolchains/nim-#devel/lib/pure/collections/hashcommon.nim");
result = !((hcode_p0 == ((NI)0)));
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u417)(tySequence__qwqHTkRvwhrRyENtudHQ7g dest_p0) {
if (dest_p0.p && !(dest_p0.p->cap & NIM_STRLIT_FLAG)) {
alignedDealloc(dest_p0.p, NIM_ALIGNOF(NI));
}
}
N_LIB_PRIVATE N_NIMCALL(void, eqsink___temp_u426)(tySequence__qwqHTkRvwhrRyENtudHQ7g* dest_p0, tySequence__qwqHTkRvwhrRyENtudHQ7g src_p1) {
if ((*dest_p0).p != src_p1.p) { eqdestroy___temp_u417((*dest_p0));
}
(*dest_p0).len = src_p1.len; (*dest_p0).p = src_p1.p;
}
N_LIB_PRIVATE N_NIMCALL(void, b__temp_u573)(void) {
NIM_BOOL* nimErr_;
nimfr_("b", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q colontmp_;
NI w;
nimZeroMem((void*)(&colontmp_), sizeof(tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q));
w = (NI)0;
nimZeroMem((void*)(&colontmp_), sizeof(tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q));
{
tySequence__qwqHTkRvwhrRyENtudHQ7g colontmp__2;
tySequence__qwqHTkRvwhrRyENtudHQ7g resultX60gensym2_;
NI h;
NI e;
NI i;
NI L_2;
NI T18_;
colontmp__2.len = 0; colontmp__2.p = NIM_NIL;
resultX60gensym2_.len = 0; resultX60gensym2_.p = NIM_NIL;
h = (NI)0;
e = (NI)0;
{
NI* xX60gensym2_;
NI L;
xX60gensym2_ = (NI*)0;
L = len__temp_u59(colontmp_);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
{
NI h_2;
NI colontmp__3;
NI T5_;
NI res;
h_2 = (NI)0;
colontmp__3 = (NI)0;
T5_ = (colontmp_.data.len-1);
colontmp__3 = T5_;
res = ((NI)0);
{
while (1) {
NI TM__SRd76hP9cMfCzdUO857UhQQ_4;
if (!(res <= colontmp__3)) goto LA7;
h_2 = ((NI) (res));
{
NIM_BOOL T10_;
NI colontmpD_;
if (h_2 < 0 || h_2 >= colontmp_.data.len){ raiseIndexError2(h_2,colontmp_.data.len-1); goto BeforeRet_;
}
T10_ = (NIM_BOOL)0;
T10_ = isFilled__pureZcollectionsZtables_u31(colontmp_.data.p->data[h_2].Field0);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
if (!T10_) goto LA11_;
colontmpD_ = (NI)0;
if (h_2 < 0 || h_2 >= colontmp_.data.len){ raiseIndexError2(h_2,colontmp_.data.len-1); goto BeforeRet_;
}
xX60gensym2_ = (&colontmp_.data.p->data[h_2].Field1);
colontmpD_ = (*xX60gensym2_);
add__temp_u365((&resultX60gensym2_), colontmpD_);
{
NI T15_;
T15_ = (NI)0;
T15_ = len__temp_u59(colontmp_);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
if (!!((T15_ == L))) goto LA16_;
failedAssertImpl__stdZassertions_u254(TM__SRd76hP9cMfCzdUO857UhQQ_3);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA16_: ;
}
LA11_: ;
if (nimAddInt(res, ((NI)1), &TM__SRd76hP9cMfCzdUO857UhQQ_4)) { raiseOverflow(); goto BeforeRet_;
};
res = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_4);
} LA7: ;
}
}
}
eqsink___temp_u426((&colontmp__2), resultX60gensym2_);
i = ((NI)0);
T18_ = colontmp__2.len;
L_2 = T18_;
{
while (1) {
if (!(i < L_2)) goto LA20;
h = i;
if (i < 0 || i >= colontmp__2.len){ raiseIndexError2(i,colontmp__2.len-1); goto BeforeRet_;
}
e = colontmp__2.p->data[i];
i += ((NI)1);
{
NI T23_;
T23_ = colontmp__2.len;
if (!!((T23_ == L_2))) goto LA24_;
failedAssertImpl__stdZassertions_u254(TM__SRd76hP9cMfCzdUO857UhQQ_6);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA24_: ;
} LA20: ;
}
eqdestroy___temp_u417(colontmp__2);
}
w = ((NI)0);
eqdestroy___temp_u554((&colontmp_));
}
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, y__temp_u572)(void) {
NIM_BOOL* nimErr_;
nimfr_("y", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
b__temp_u573();
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE void PreMainInner(void) {
}
N_LIB_PRIVATE int cmdCount;
N_LIB_PRIVATE char** cmdLine;
N_LIB_PRIVATE char** gEnv;
N_LIB_PRIVATE void PreMain(void) {
#if 0
void (*volatile inner)(void);
inner = PreMainInner;
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000();
(*inner)();
#else
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000();
PreMainInner();
#endif
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
#if 0
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
(*inner)();
#else
PreMain();
NimMainInner();
#endif
}
int main(int argc, char** args, char** env) {
cmdLine = args;
cmdCount = argc;
gEnv = env;
NimMain();
return nim_program_result;
}
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) {
{
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
y__temp_u572();
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
} Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("tables")
)
),
nnkTemplateDef.newTree(
newIdentNode("k"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("untyped"),
nnkIdentDefs.newTree(
newIdentNode("m"),
newIdentNode("untyped"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("result"),
nnkBracketExpr.newTree(
newIdentNode("seq"),
nnkCall.newTree(
newIdentNode("typeof"),
newIdentNode("m")
)
),
newEmptyNode()
)
),
nnkForStmt.newTree(
newIdentNode("x"),
newIdentNode("m"),
nnkStmtList.newTree(
nnkCall.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
newIdentNode("x")
)
)
),
newIdentNode("result")
)
),
nnkIteratorDef.newTree(
newIdentNode("g"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("m"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("int"),
newIdentNode("int")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkForStmt.newTree(
newIdentNode("h"),
newIdentNode("e"),
nnkDotExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("m"),
newIdentNode("keys")
),
newIdentNode("k")
),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkYieldStmt.newTree(
newLit(0)
)
)
),
nnkProcDef.newTree(
newIdentNode("y"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode()
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("b"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode()
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkForStmt.newTree(
newIdentNode("w"),
nnkCall.newTree(
newIdentNode("g"),
nnkCall.newTree(
newIdentNode("default"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("int"),
newIdentNode("int")
)
)
),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
)
)
),
nnkCall.newTree(
newIdentNode("b")
)
)
),
nnkCall.newTree(
newIdentNode("y")
)
) 2.0.2 👎 FAILOutput
IRCompiled filesize99.02 Kb (101,392 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
#include <string.h>
#define nimfr_(proc, file) \
TFrame FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);
#define nimfrs_(proc, file, slots, length) \
struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename;NI len;VarSlot s[slots];} FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);
#define nimln_(n) \
FR_.line = n;
#define nimlf_(n, file) \
FR_.line = n; FR_.filename = file;
typedef struct tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q;
typedef struct tySequence__E8pi9b5QNahsURYzXMjh3qw tySequence__E8pi9b5QNahsURYzXMjh3qw;
typedef struct tySequence__E8pi9b5QNahsURYzXMjh3qw_Content tySequence__E8pi9b5QNahsURYzXMjh3qw_Content;
typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g tySequence__qwqHTkRvwhrRyENtudHQ7g;
typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content tySequence__qwqHTkRvwhrRyENtudHQ7g_Content;
typedef struct tyTuple__47w2DboNEPf69aPgubZdd7Q tyTuple__47w2DboNEPf69aPgubZdd7Q;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
struct tySequence__E8pi9b5QNahsURYzXMjh3qw {
NI len; tySequence__E8pi9b5QNahsURYzXMjh3qw_Content* p;
};
struct tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q {
tySequence__E8pi9b5QNahsURYzXMjh3qw data;
NI counter;
};
struct tySequence__qwqHTkRvwhrRyENtudHQ7g {
NI len; tySequence__qwqHTkRvwhrRyENtudHQ7g_Content* p;
};
struct tyTuple__47w2DboNEPf69aPgubZdd7Q {
NI Field0;
NI Field1;
NI Field2;
};
struct NimStrPayload {
NI cap;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
NI len;
NimStrPayload* p;
};
struct tySequence__E8pi9b5QNahsURYzXMjh3qw_Content { NI cap; tyTuple__47w2DboNEPf69aPgubZdd7Q data[SEQ_DECL_SIZE]; };
struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content { NI cap; NI data[SEQ_DECL_SIZE]; };
N_LIB_PRIVATE N_NIMCALL(void, y__temp_u572)(void);
N_LIB_PRIVATE N_NIMCALL(void, b__temp_u573)(void);
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);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(NI, len__temp_u59)(tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q t_p0);
static N_INLINE(NIM_BOOL, isFilled__pureZcollectionsZtables_u31)(NI hcode_p0);
static N_INLINE(void, nimFrame)(TFrame* s_p0);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4608)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i_p0, NI n_p1);
N_LIB_PRIVATE N_NIMCALL(void, add__temp_u365)(tySequence__qwqHTkRvwhrRyENtudHQ7g* x_p0, NI y_p1);
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl__stdZassertions_u254)(NimStringV2 msg_p0);
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___temp_u426)(tySequence__qwqHTkRvwhrRyENtudHQ7g* dest_p0, tySequence__qwqHTkRvwhrRyENtudHQ7g src_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u417)(tySequence__qwqHTkRvwhrRyENtudHQ7g dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, alignedDealloc)(void* p_p0, NI align_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u554)(tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
static const struct {
NI cap; NIM_CHAR data[156+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_2 = { 156 | NIM_STRLIT_FLAG, "/home/runner/.choosenim/toolchains/nim-#devel/lib/pure/collections/tables.nim(753, 13) `len(t) == L` the length of the table changed while iterating over it" };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_3 = {156, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_2};
static const struct {
NI cap; NIM_CHAR data[147+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_5 = { 147 | NIM_STRLIT_FLAG, "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/iterators.nim(187, 11) `len(a) == L` the length of the seq changed while iterating over it" };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_6 = {147, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_5};
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4392;
extern NIM_THREADVAR TFrame* framePtr__system_u2688;
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(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (&nimInErrorMode__system_u4392);
return result;
}
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_: ;
}
static N_INLINE(void, nimFrame)(TFrame* s_p0) {
{
if (!(framePtr__system_u2688 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s_p0).calldepth = ((NI16)0);
}
goto LA1_;
LA3_: ;
{
(*s_p0).calldepth = (NI16)((*framePtr__system_u2688).calldepth + ((NI16)1));
}
LA1_: ;
(*s_p0).prev = framePtr__system_u2688;
framePtr__system_u2688 = s_p0;
{
if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_;
callDepthLimitReached__system_u4608();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__system_u2688 = (*framePtr__system_u2688).prev;
}
static N_INLINE(NIM_BOOL, isFilled__pureZcollectionsZtables_u31)(NI hcode_p0) {
NIM_BOOL result;
nimfr_("isFilled", "/home/runner/.choosenim/toolchains/nim-#devel/lib/pure/collections/hashcommon.nim");
result = !((hcode_p0 == ((NI)0)));
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u417)(tySequence__qwqHTkRvwhrRyENtudHQ7g dest_p0) {
if (dest_p0.p && !(dest_p0.p->cap & NIM_STRLIT_FLAG)) {
alignedDealloc(dest_p0.p, NIM_ALIGNOF(NI));
}
}
N_LIB_PRIVATE N_NIMCALL(void, eqsink___temp_u426)(tySequence__qwqHTkRvwhrRyENtudHQ7g* dest_p0, tySequence__qwqHTkRvwhrRyENtudHQ7g src_p1) {
if ((*dest_p0).p != src_p1.p) { eqdestroy___temp_u417((*dest_p0));
}
(*dest_p0).len = src_p1.len; (*dest_p0).p = src_p1.p;
}
N_LIB_PRIVATE N_NIMCALL(void, b__temp_u573)(void) {
NIM_BOOL* nimErr_;
nimfr_("b", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q colontmp_;
NI w;
nimZeroMem((void*)(&colontmp_), sizeof(tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q));
w = (NI)0;
nimZeroMem((void*)(&colontmp_), sizeof(tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q));
{
tySequence__qwqHTkRvwhrRyENtudHQ7g colontmp__2;
tySequence__qwqHTkRvwhrRyENtudHQ7g resultX60gensym2_;
NI h;
NI e;
NI i;
NI L_2;
NI T18_;
colontmp__2.len = 0; colontmp__2.p = NIM_NIL;
resultX60gensym2_.len = 0; resultX60gensym2_.p = NIM_NIL;
h = (NI)0;
e = (NI)0;
{
NI* xX60gensym2_;
NI L;
xX60gensym2_ = (NI*)0;
L = len__temp_u59(colontmp_);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
{
NI h_2;
NI colontmp__3;
NI T5_;
NI res;
h_2 = (NI)0;
colontmp__3 = (NI)0;
T5_ = (colontmp_.data.len-1);
colontmp__3 = T5_;
res = ((NI)0);
{
while (1) {
NI TM__SRd76hP9cMfCzdUO857UhQQ_4;
if (!(res <= colontmp__3)) goto LA7;
h_2 = ((NI) (res));
{
NIM_BOOL T10_;
NI colontmpD_;
if (h_2 < 0 || h_2 >= colontmp_.data.len){ raiseIndexError2(h_2,colontmp_.data.len-1); goto BeforeRet_;
}
T10_ = (NIM_BOOL)0;
T10_ = isFilled__pureZcollectionsZtables_u31(colontmp_.data.p->data[h_2].Field0);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
if (!T10_) goto LA11_;
colontmpD_ = (NI)0;
if (h_2 < 0 || h_2 >= colontmp_.data.len){ raiseIndexError2(h_2,colontmp_.data.len-1); goto BeforeRet_;
}
xX60gensym2_ = (&colontmp_.data.p->data[h_2].Field1);
colontmpD_ = (*xX60gensym2_);
add__temp_u365((&resultX60gensym2_), colontmpD_);
{
NI T15_;
T15_ = (NI)0;
T15_ = len__temp_u59(colontmp_);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
if (!!((T15_ == L))) goto LA16_;
failedAssertImpl__stdZassertions_u254(TM__SRd76hP9cMfCzdUO857UhQQ_3);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA16_: ;
}
LA11_: ;
if (nimAddInt(res, ((NI)1), &TM__SRd76hP9cMfCzdUO857UhQQ_4)) { raiseOverflow(); goto BeforeRet_;
};
res = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_4);
} LA7: ;
}
}
}
eqsink___temp_u426((&colontmp__2), resultX60gensym2_);
i = ((NI)0);
T18_ = colontmp__2.len;
L_2 = T18_;
{
while (1) {
if (!(i < L_2)) goto LA20;
h = i;
if (i < 0 || i >= colontmp__2.len){ raiseIndexError2(i,colontmp__2.len-1); goto BeforeRet_;
}
e = colontmp__2.p->data[i];
i += ((NI)1);
{
NI T23_;
T23_ = colontmp__2.len;
if (!!((T23_ == L_2))) goto LA24_;
failedAssertImpl__stdZassertions_u254(TM__SRd76hP9cMfCzdUO857UhQQ_6);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA24_: ;
} LA20: ;
}
eqdestroy___temp_u417(colontmp__2);
}
w = ((NI)0);
eqdestroy___temp_u554((&colontmp_));
}
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, y__temp_u572)(void) {
NIM_BOOL* nimErr_;
nimfr_("y", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
b__temp_u573();
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE void PreMainInner(void) {
}
N_LIB_PRIVATE int cmdCount;
N_LIB_PRIVATE char** cmdLine;
N_LIB_PRIVATE char** gEnv;
N_LIB_PRIVATE void PreMain(void) {
#if 0
void (*volatile inner)(void);
inner = PreMainInner;
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000();
(*inner)();
#else
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000();
PreMainInner();
#endif
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
#if 0
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
(*inner)();
#else
PreMain();
NimMainInner();
#endif
}
int main(int argc, char** args, char** env) {
cmdLine = args;
cmdCount = argc;
gEnv = env;
NimMain();
return nim_program_result;
}
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) {
{
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
y__temp_u572();
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
} Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("tables")
)
),
nnkTemplateDef.newTree(
newIdentNode("k"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("untyped"),
nnkIdentDefs.newTree(
newIdentNode("m"),
newIdentNode("untyped"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("result"),
nnkBracketExpr.newTree(
newIdentNode("seq"),
nnkCall.newTree(
newIdentNode("typeof"),
newIdentNode("m")
)
),
newEmptyNode()
)
),
nnkForStmt.newTree(
newIdentNode("x"),
newIdentNode("m"),
nnkStmtList.newTree(
nnkCall.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
newIdentNode("x")
)
)
),
newIdentNode("result")
)
),
nnkIteratorDef.newTree(
newIdentNode("g"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("m"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("int"),
newIdentNode("int")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkForStmt.newTree(
newIdentNode("h"),
newIdentNode("e"),
nnkDotExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("m"),
newIdentNode("keys")
),
newIdentNode("k")
),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkYieldStmt.newTree(
newLit(0)
)
)
),
nnkProcDef.newTree(
newIdentNode("y"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode()
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("b"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode()
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkForStmt.newTree(
newIdentNode("w"),
nnkCall.newTree(
newIdentNode("g"),
nnkCall.newTree(
newIdentNode("default"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("int"),
newIdentNode("int")
)
)
),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
)
)
),
nnkCall.newTree(
newIdentNode("b")
)
)
),
nnkCall.newTree(
newIdentNode("y")
)
) 1.6.14 👎 FAILOutput
IRCompiled filesize99.02 Kb (101,392 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
#include <string.h>
#define nimfr_(proc, file) \
TFrame FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);
#define nimfrs_(proc, file, slots, length) \
struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename;NI len;VarSlot s[slots];} FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);
#define nimln_(n) \
FR_.line = n;
#define nimlf_(n, file) \
FR_.line = n; FR_.filename = file;
typedef struct tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q;
typedef struct tySequence__E8pi9b5QNahsURYzXMjh3qw tySequence__E8pi9b5QNahsURYzXMjh3qw;
typedef struct tySequence__E8pi9b5QNahsURYzXMjh3qw_Content tySequence__E8pi9b5QNahsURYzXMjh3qw_Content;
typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g tySequence__qwqHTkRvwhrRyENtudHQ7g;
typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content tySequence__qwqHTkRvwhrRyENtudHQ7g_Content;
typedef struct tyTuple__47w2DboNEPf69aPgubZdd7Q tyTuple__47w2DboNEPf69aPgubZdd7Q;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
struct tySequence__E8pi9b5QNahsURYzXMjh3qw {
NI len; tySequence__E8pi9b5QNahsURYzXMjh3qw_Content* p;
};
struct tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q {
tySequence__E8pi9b5QNahsURYzXMjh3qw data;
NI counter;
};
struct tySequence__qwqHTkRvwhrRyENtudHQ7g {
NI len; tySequence__qwqHTkRvwhrRyENtudHQ7g_Content* p;
};
struct tyTuple__47w2DboNEPf69aPgubZdd7Q {
NI Field0;
NI Field1;
NI Field2;
};
struct NimStrPayload {
NI cap;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
NI len;
NimStrPayload* p;
};
struct tySequence__E8pi9b5QNahsURYzXMjh3qw_Content { NI cap; tyTuple__47w2DboNEPf69aPgubZdd7Q data[SEQ_DECL_SIZE]; };
struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content { NI cap; NI data[SEQ_DECL_SIZE]; };
N_LIB_PRIVATE N_NIMCALL(void, y__temp_u572)(void);
N_LIB_PRIVATE N_NIMCALL(void, b__temp_u573)(void);
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);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(NI, len__temp_u59)(tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q t_p0);
static N_INLINE(NIM_BOOL, isFilled__pureZcollectionsZtables_u31)(NI hcode_p0);
static N_INLINE(void, nimFrame)(TFrame* s_p0);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4608)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i_p0, NI n_p1);
N_LIB_PRIVATE N_NIMCALL(void, add__temp_u365)(tySequence__qwqHTkRvwhrRyENtudHQ7g* x_p0, NI y_p1);
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl__stdZassertions_u254)(NimStringV2 msg_p0);
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___temp_u426)(tySequence__qwqHTkRvwhrRyENtudHQ7g* dest_p0, tySequence__qwqHTkRvwhrRyENtudHQ7g src_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u417)(tySequence__qwqHTkRvwhrRyENtudHQ7g dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, alignedDealloc)(void* p_p0, NI align_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u554)(tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
static const struct {
NI cap; NIM_CHAR data[156+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_2 = { 156 | NIM_STRLIT_FLAG, "/home/runner/.choosenim/toolchains/nim-#devel/lib/pure/collections/tables.nim(753, 13) `len(t) == L` the length of the table changed while iterating over it" };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_3 = {156, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_2};
static const struct {
NI cap; NIM_CHAR data[147+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_5 = { 147 | NIM_STRLIT_FLAG, "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/iterators.nim(187, 11) `len(a) == L` the length of the seq changed while iterating over it" };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_6 = {147, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_5};
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4392;
extern NIM_THREADVAR TFrame* framePtr__system_u2688;
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(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (&nimInErrorMode__system_u4392);
return result;
}
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_: ;
}
static N_INLINE(void, nimFrame)(TFrame* s_p0) {
{
if (!(framePtr__system_u2688 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s_p0).calldepth = ((NI16)0);
}
goto LA1_;
LA3_: ;
{
(*s_p0).calldepth = (NI16)((*framePtr__system_u2688).calldepth + ((NI16)1));
}
LA1_: ;
(*s_p0).prev = framePtr__system_u2688;
framePtr__system_u2688 = s_p0;
{
if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_;
callDepthLimitReached__system_u4608();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__system_u2688 = (*framePtr__system_u2688).prev;
}
static N_INLINE(NIM_BOOL, isFilled__pureZcollectionsZtables_u31)(NI hcode_p0) {
NIM_BOOL result;
nimfr_("isFilled", "/home/runner/.choosenim/toolchains/nim-#devel/lib/pure/collections/hashcommon.nim");
result = !((hcode_p0 == ((NI)0)));
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u417)(tySequence__qwqHTkRvwhrRyENtudHQ7g dest_p0) {
if (dest_p0.p && !(dest_p0.p->cap & NIM_STRLIT_FLAG)) {
alignedDealloc(dest_p0.p, NIM_ALIGNOF(NI));
}
}
N_LIB_PRIVATE N_NIMCALL(void, eqsink___temp_u426)(tySequence__qwqHTkRvwhrRyENtudHQ7g* dest_p0, tySequence__qwqHTkRvwhrRyENtudHQ7g src_p1) {
if ((*dest_p0).p != src_p1.p) { eqdestroy___temp_u417((*dest_p0));
}
(*dest_p0).len = src_p1.len; (*dest_p0).p = src_p1.p;
}
N_LIB_PRIVATE N_NIMCALL(void, b__temp_u573)(void) {
NIM_BOOL* nimErr_;
nimfr_("b", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q colontmp_;
NI w;
nimZeroMem((void*)(&colontmp_), sizeof(tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q));
w = (NI)0;
nimZeroMem((void*)(&colontmp_), sizeof(tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q));
{
tySequence__qwqHTkRvwhrRyENtudHQ7g colontmp__2;
tySequence__qwqHTkRvwhrRyENtudHQ7g resultX60gensym2_;
NI h;
NI e;
NI i;
NI L_2;
NI T18_;
colontmp__2.len = 0; colontmp__2.p = NIM_NIL;
resultX60gensym2_.len = 0; resultX60gensym2_.p = NIM_NIL;
h = (NI)0;
e = (NI)0;
{
NI* xX60gensym2_;
NI L;
xX60gensym2_ = (NI*)0;
L = len__temp_u59(colontmp_);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
{
NI h_2;
NI colontmp__3;
NI T5_;
NI res;
h_2 = (NI)0;
colontmp__3 = (NI)0;
T5_ = (colontmp_.data.len-1);
colontmp__3 = T5_;
res = ((NI)0);
{
while (1) {
NI TM__SRd76hP9cMfCzdUO857UhQQ_4;
if (!(res <= colontmp__3)) goto LA7;
h_2 = ((NI) (res));
{
NIM_BOOL T10_;
NI colontmpD_;
if (h_2 < 0 || h_2 >= colontmp_.data.len){ raiseIndexError2(h_2,colontmp_.data.len-1); goto BeforeRet_;
}
T10_ = (NIM_BOOL)0;
T10_ = isFilled__pureZcollectionsZtables_u31(colontmp_.data.p->data[h_2].Field0);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
if (!T10_) goto LA11_;
colontmpD_ = (NI)0;
if (h_2 < 0 || h_2 >= colontmp_.data.len){ raiseIndexError2(h_2,colontmp_.data.len-1); goto BeforeRet_;
}
xX60gensym2_ = (&colontmp_.data.p->data[h_2].Field1);
colontmpD_ = (*xX60gensym2_);
add__temp_u365((&resultX60gensym2_), colontmpD_);
{
NI T15_;
T15_ = (NI)0;
T15_ = len__temp_u59(colontmp_);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
if (!!((T15_ == L))) goto LA16_;
failedAssertImpl__stdZassertions_u254(TM__SRd76hP9cMfCzdUO857UhQQ_3);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA16_: ;
}
LA11_: ;
if (nimAddInt(res, ((NI)1), &TM__SRd76hP9cMfCzdUO857UhQQ_4)) { raiseOverflow(); goto BeforeRet_;
};
res = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_4);
} LA7: ;
}
}
}
eqsink___temp_u426((&colontmp__2), resultX60gensym2_);
i = ((NI)0);
T18_ = colontmp__2.len;
L_2 = T18_;
{
while (1) {
if (!(i < L_2)) goto LA20;
h = i;
if (i < 0 || i >= colontmp__2.len){ raiseIndexError2(i,colontmp__2.len-1); goto BeforeRet_;
}
e = colontmp__2.p->data[i];
i += ((NI)1);
{
NI T23_;
T23_ = colontmp__2.len;
if (!!((T23_ == L_2))) goto LA24_;
failedAssertImpl__stdZassertions_u254(TM__SRd76hP9cMfCzdUO857UhQQ_6);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA24_: ;
} LA20: ;
}
eqdestroy___temp_u417(colontmp__2);
}
w = ((NI)0);
eqdestroy___temp_u554((&colontmp_));
}
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, y__temp_u572)(void) {
NIM_BOOL* nimErr_;
nimfr_("y", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
b__temp_u573();
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE void PreMainInner(void) {
}
N_LIB_PRIVATE int cmdCount;
N_LIB_PRIVATE char** cmdLine;
N_LIB_PRIVATE char** gEnv;
N_LIB_PRIVATE void PreMain(void) {
#if 0
void (*volatile inner)(void);
inner = PreMainInner;
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000();
(*inner)();
#else
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000();
PreMainInner();
#endif
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
#if 0
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
(*inner)();
#else
PreMain();
NimMainInner();
#endif
}
int main(int argc, char** args, char** env) {
cmdLine = args;
cmdCount = argc;
gEnv = env;
NimMain();
return nim_program_result;
}
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) {
{
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
y__temp_u572();
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
} Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("tables")
)
),
nnkTemplateDef.newTree(
newIdentNode("k"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("untyped"),
nnkIdentDefs.newTree(
newIdentNode("m"),
newIdentNode("untyped"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("result"),
nnkBracketExpr.newTree(
newIdentNode("seq"),
nnkCall.newTree(
newIdentNode("typeof"),
newIdentNode("m")
)
),
newEmptyNode()
)
),
nnkForStmt.newTree(
newIdentNode("x"),
newIdentNode("m"),
nnkStmtList.newTree(
nnkCall.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
newIdentNode("x")
)
)
),
newIdentNode("result")
)
),
nnkIteratorDef.newTree(
newIdentNode("g"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("m"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("int"),
newIdentNode("int")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkForStmt.newTree(
newIdentNode("h"),
newIdentNode("e"),
nnkDotExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("m"),
newIdentNode("keys")
),
newIdentNode("k")
),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkYieldStmt.newTree(
newLit(0)
)
)
),
nnkProcDef.newTree(
newIdentNode("y"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode()
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("b"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode()
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkForStmt.newTree(
newIdentNode("w"),
nnkCall.newTree(
newIdentNode("g"),
nnkCall.newTree(
newIdentNode("default"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("int"),
newIdentNode("int")
)
)
),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
)
)
),
nnkCall.newTree(
newIdentNode("b")
)
)
),
nnkCall.newTree(
newIdentNode("y")
)
) 1.4.8 👎 FAILOutput
IRCompiled filesize99.02 Kb (101,392 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
#include <string.h>
#define nimfr_(proc, file) \
TFrame FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);
#define nimfrs_(proc, file, slots, length) \
struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename;NI len;VarSlot s[slots];} FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);
#define nimln_(n) \
FR_.line = n;
#define nimlf_(n, file) \
FR_.line = n; FR_.filename = file;
typedef struct tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q;
typedef struct tySequence__E8pi9b5QNahsURYzXMjh3qw tySequence__E8pi9b5QNahsURYzXMjh3qw;
typedef struct tySequence__E8pi9b5QNahsURYzXMjh3qw_Content tySequence__E8pi9b5QNahsURYzXMjh3qw_Content;
typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g tySequence__qwqHTkRvwhrRyENtudHQ7g;
typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content tySequence__qwqHTkRvwhrRyENtudHQ7g_Content;
typedef struct tyTuple__47w2DboNEPf69aPgubZdd7Q tyTuple__47w2DboNEPf69aPgubZdd7Q;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
struct tySequence__E8pi9b5QNahsURYzXMjh3qw {
NI len; tySequence__E8pi9b5QNahsURYzXMjh3qw_Content* p;
};
struct tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q {
tySequence__E8pi9b5QNahsURYzXMjh3qw data;
NI counter;
};
struct tySequence__qwqHTkRvwhrRyENtudHQ7g {
NI len; tySequence__qwqHTkRvwhrRyENtudHQ7g_Content* p;
};
struct tyTuple__47w2DboNEPf69aPgubZdd7Q {
NI Field0;
NI Field1;
NI Field2;
};
struct NimStrPayload {
NI cap;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
NI len;
NimStrPayload* p;
};
struct tySequence__E8pi9b5QNahsURYzXMjh3qw_Content { NI cap; tyTuple__47w2DboNEPf69aPgubZdd7Q data[SEQ_DECL_SIZE]; };
struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content { NI cap; NI data[SEQ_DECL_SIZE]; };
N_LIB_PRIVATE N_NIMCALL(void, y__temp_u572)(void);
N_LIB_PRIVATE N_NIMCALL(void, b__temp_u573)(void);
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);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(NI, len__temp_u59)(tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q t_p0);
static N_INLINE(NIM_BOOL, isFilled__pureZcollectionsZtables_u31)(NI hcode_p0);
static N_INLINE(void, nimFrame)(TFrame* s_p0);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4608)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i_p0, NI n_p1);
N_LIB_PRIVATE N_NIMCALL(void, add__temp_u365)(tySequence__qwqHTkRvwhrRyENtudHQ7g* x_p0, NI y_p1);
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl__stdZassertions_u254)(NimStringV2 msg_p0);
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___temp_u426)(tySequence__qwqHTkRvwhrRyENtudHQ7g* dest_p0, tySequence__qwqHTkRvwhrRyENtudHQ7g src_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u417)(tySequence__qwqHTkRvwhrRyENtudHQ7g dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, alignedDealloc)(void* p_p0, NI align_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u554)(tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
static const struct {
NI cap; NIM_CHAR data[156+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_2 = { 156 | NIM_STRLIT_FLAG, "/home/runner/.choosenim/toolchains/nim-#devel/lib/pure/collections/tables.nim(753, 13) `len(t) == L` the length of the table changed while iterating over it" };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_3 = {156, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_2};
static const struct {
NI cap; NIM_CHAR data[147+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_5 = { 147 | NIM_STRLIT_FLAG, "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/iterators.nim(187, 11) `len(a) == L` the length of the seq changed while iterating over it" };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_6 = {147, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_5};
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4392;
extern NIM_THREADVAR TFrame* framePtr__system_u2688;
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(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (&nimInErrorMode__system_u4392);
return result;
}
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_: ;
}
static N_INLINE(void, nimFrame)(TFrame* s_p0) {
{
if (!(framePtr__system_u2688 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s_p0).calldepth = ((NI16)0);
}
goto LA1_;
LA3_: ;
{
(*s_p0).calldepth = (NI16)((*framePtr__system_u2688).calldepth + ((NI16)1));
}
LA1_: ;
(*s_p0).prev = framePtr__system_u2688;
framePtr__system_u2688 = s_p0;
{
if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_;
callDepthLimitReached__system_u4608();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__system_u2688 = (*framePtr__system_u2688).prev;
}
static N_INLINE(NIM_BOOL, isFilled__pureZcollectionsZtables_u31)(NI hcode_p0) {
NIM_BOOL result;
nimfr_("isFilled", "/home/runner/.choosenim/toolchains/nim-#devel/lib/pure/collections/hashcommon.nim");
result = !((hcode_p0 == ((NI)0)));
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u417)(tySequence__qwqHTkRvwhrRyENtudHQ7g dest_p0) {
if (dest_p0.p && !(dest_p0.p->cap & NIM_STRLIT_FLAG)) {
alignedDealloc(dest_p0.p, NIM_ALIGNOF(NI));
}
}
N_LIB_PRIVATE N_NIMCALL(void, eqsink___temp_u426)(tySequence__qwqHTkRvwhrRyENtudHQ7g* dest_p0, tySequence__qwqHTkRvwhrRyENtudHQ7g src_p1) {
if ((*dest_p0).p != src_p1.p) { eqdestroy___temp_u417((*dest_p0));
}
(*dest_p0).len = src_p1.len; (*dest_p0).p = src_p1.p;
}
N_LIB_PRIVATE N_NIMCALL(void, b__temp_u573)(void) {
NIM_BOOL* nimErr_;
nimfr_("b", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q colontmp_;
NI w;
nimZeroMem((void*)(&colontmp_), sizeof(tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q));
w = (NI)0;
nimZeroMem((void*)(&colontmp_), sizeof(tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q));
{
tySequence__qwqHTkRvwhrRyENtudHQ7g colontmp__2;
tySequence__qwqHTkRvwhrRyENtudHQ7g resultX60gensym2_;
NI h;
NI e;
NI i;
NI L_2;
NI T18_;
colontmp__2.len = 0; colontmp__2.p = NIM_NIL;
resultX60gensym2_.len = 0; resultX60gensym2_.p = NIM_NIL;
h = (NI)0;
e = (NI)0;
{
NI* xX60gensym2_;
NI L;
xX60gensym2_ = (NI*)0;
L = len__temp_u59(colontmp_);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
{
NI h_2;
NI colontmp__3;
NI T5_;
NI res;
h_2 = (NI)0;
colontmp__3 = (NI)0;
T5_ = (colontmp_.data.len-1);
colontmp__3 = T5_;
res = ((NI)0);
{
while (1) {
NI TM__SRd76hP9cMfCzdUO857UhQQ_4;
if (!(res <= colontmp__3)) goto LA7;
h_2 = ((NI) (res));
{
NIM_BOOL T10_;
NI colontmpD_;
if (h_2 < 0 || h_2 >= colontmp_.data.len){ raiseIndexError2(h_2,colontmp_.data.len-1); goto BeforeRet_;
}
T10_ = (NIM_BOOL)0;
T10_ = isFilled__pureZcollectionsZtables_u31(colontmp_.data.p->data[h_2].Field0);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
if (!T10_) goto LA11_;
colontmpD_ = (NI)0;
if (h_2 < 0 || h_2 >= colontmp_.data.len){ raiseIndexError2(h_2,colontmp_.data.len-1); goto BeforeRet_;
}
xX60gensym2_ = (&colontmp_.data.p->data[h_2].Field1);
colontmpD_ = (*xX60gensym2_);
add__temp_u365((&resultX60gensym2_), colontmpD_);
{
NI T15_;
T15_ = (NI)0;
T15_ = len__temp_u59(colontmp_);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
if (!!((T15_ == L))) goto LA16_;
failedAssertImpl__stdZassertions_u254(TM__SRd76hP9cMfCzdUO857UhQQ_3);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA16_: ;
}
LA11_: ;
if (nimAddInt(res, ((NI)1), &TM__SRd76hP9cMfCzdUO857UhQQ_4)) { raiseOverflow(); goto BeforeRet_;
};
res = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_4);
} LA7: ;
}
}
}
eqsink___temp_u426((&colontmp__2), resultX60gensym2_);
i = ((NI)0);
T18_ = colontmp__2.len;
L_2 = T18_;
{
while (1) {
if (!(i < L_2)) goto LA20;
h = i;
if (i < 0 || i >= colontmp__2.len){ raiseIndexError2(i,colontmp__2.len-1); goto BeforeRet_;
}
e = colontmp__2.p->data[i];
i += ((NI)1);
{
NI T23_;
T23_ = colontmp__2.len;
if (!!((T23_ == L_2))) goto LA24_;
failedAssertImpl__stdZassertions_u254(TM__SRd76hP9cMfCzdUO857UhQQ_6);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA24_: ;
} LA20: ;
}
eqdestroy___temp_u417(colontmp__2);
}
w = ((NI)0);
eqdestroy___temp_u554((&colontmp_));
}
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, y__temp_u572)(void) {
NIM_BOOL* nimErr_;
nimfr_("y", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
b__temp_u573();
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE void PreMainInner(void) {
}
N_LIB_PRIVATE int cmdCount;
N_LIB_PRIVATE char** cmdLine;
N_LIB_PRIVATE char** gEnv;
N_LIB_PRIVATE void PreMain(void) {
#if 0
void (*volatile inner)(void);
inner = PreMainInner;
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000();
(*inner)();
#else
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000();
PreMainInner();
#endif
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
#if 0
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
(*inner)();
#else
PreMain();
NimMainInner();
#endif
}
int main(int argc, char** args, char** env) {
cmdLine = args;
cmdCount = argc;
gEnv = env;
NimMain();
return nim_program_result;
}
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) {
{
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
y__temp_u572();
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
} Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("tables")
)
),
nnkTemplateDef.newTree(
newIdentNode("k"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("untyped"),
nnkIdentDefs.newTree(
newIdentNode("m"),
newIdentNode("untyped"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("result"),
nnkBracketExpr.newTree(
newIdentNode("seq"),
nnkCall.newTree(
newIdentNode("typeof"),
newIdentNode("m")
)
),
newEmptyNode()
)
),
nnkForStmt.newTree(
newIdentNode("x"),
newIdentNode("m"),
nnkStmtList.newTree(
nnkCall.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
newIdentNode("x")
)
)
),
newIdentNode("result")
)
),
nnkIteratorDef.newTree(
newIdentNode("g"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("m"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("int"),
newIdentNode("int")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkForStmt.newTree(
newIdentNode("h"),
newIdentNode("e"),
nnkDotExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("m"),
newIdentNode("keys")
),
newIdentNode("k")
),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkYieldStmt.newTree(
newLit(0)
)
)
),
nnkProcDef.newTree(
newIdentNode("y"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode()
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("b"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode()
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkForStmt.newTree(
newIdentNode("w"),
nnkCall.newTree(
newIdentNode("g"),
nnkCall.newTree(
newIdentNode("default"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("int"),
newIdentNode("int")
)
)
),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
)
)
),
nnkCall.newTree(
newIdentNode("b")
)
)
),
nnkCall.newTree(
newIdentNode("y")
)
) 1.2.18 👎 FAILOutput
IRCompiled filesize99.02 Kb (101,392 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
#include <string.h>
#define nimfr_(proc, file) \
TFrame FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);
#define nimfrs_(proc, file, slots, length) \
struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename;NI len;VarSlot s[slots];} FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);
#define nimln_(n) \
FR_.line = n;
#define nimlf_(n, file) \
FR_.line = n; FR_.filename = file;
typedef struct tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q;
typedef struct tySequence__E8pi9b5QNahsURYzXMjh3qw tySequence__E8pi9b5QNahsURYzXMjh3qw;
typedef struct tySequence__E8pi9b5QNahsURYzXMjh3qw_Content tySequence__E8pi9b5QNahsURYzXMjh3qw_Content;
typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g tySequence__qwqHTkRvwhrRyENtudHQ7g;
typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content tySequence__qwqHTkRvwhrRyENtudHQ7g_Content;
typedef struct tyTuple__47w2DboNEPf69aPgubZdd7Q tyTuple__47w2DboNEPf69aPgubZdd7Q;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
struct tySequence__E8pi9b5QNahsURYzXMjh3qw {
NI len; tySequence__E8pi9b5QNahsURYzXMjh3qw_Content* p;
};
struct tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q {
tySequence__E8pi9b5QNahsURYzXMjh3qw data;
NI counter;
};
struct tySequence__qwqHTkRvwhrRyENtudHQ7g {
NI len; tySequence__qwqHTkRvwhrRyENtudHQ7g_Content* p;
};
struct tyTuple__47w2DboNEPf69aPgubZdd7Q {
NI Field0;
NI Field1;
NI Field2;
};
struct NimStrPayload {
NI cap;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
NI len;
NimStrPayload* p;
};
struct tySequence__E8pi9b5QNahsURYzXMjh3qw_Content { NI cap; tyTuple__47w2DboNEPf69aPgubZdd7Q data[SEQ_DECL_SIZE]; };
struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content { NI cap; NI data[SEQ_DECL_SIZE]; };
N_LIB_PRIVATE N_NIMCALL(void, y__temp_u572)(void);
N_LIB_PRIVATE N_NIMCALL(void, b__temp_u573)(void);
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);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(NI, len__temp_u59)(tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q t_p0);
static N_INLINE(NIM_BOOL, isFilled__pureZcollectionsZtables_u31)(NI hcode_p0);
static N_INLINE(void, nimFrame)(TFrame* s_p0);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4608)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i_p0, NI n_p1);
N_LIB_PRIVATE N_NIMCALL(void, add__temp_u365)(tySequence__qwqHTkRvwhrRyENtudHQ7g* x_p0, NI y_p1);
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl__stdZassertions_u254)(NimStringV2 msg_p0);
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___temp_u426)(tySequence__qwqHTkRvwhrRyENtudHQ7g* dest_p0, tySequence__qwqHTkRvwhrRyENtudHQ7g src_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u417)(tySequence__qwqHTkRvwhrRyENtudHQ7g dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, alignedDealloc)(void* p_p0, NI align_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u554)(tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
static const struct {
NI cap; NIM_CHAR data[156+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_2 = { 156 | NIM_STRLIT_FLAG, "/home/runner/.choosenim/toolchains/nim-#devel/lib/pure/collections/tables.nim(753, 13) `len(t) == L` the length of the table changed while iterating over it" };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_3 = {156, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_2};
static const struct {
NI cap; NIM_CHAR data[147+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_5 = { 147 | NIM_STRLIT_FLAG, "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/iterators.nim(187, 11) `len(a) == L` the length of the seq changed while iterating over it" };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_6 = {147, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_5};
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4392;
extern NIM_THREADVAR TFrame* framePtr__system_u2688;
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(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (&nimInErrorMode__system_u4392);
return result;
}
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_: ;
}
static N_INLINE(void, nimFrame)(TFrame* s_p0) {
{
if (!(framePtr__system_u2688 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s_p0).calldepth = ((NI16)0);
}
goto LA1_;
LA3_: ;
{
(*s_p0).calldepth = (NI16)((*framePtr__system_u2688).calldepth + ((NI16)1));
}
LA1_: ;
(*s_p0).prev = framePtr__system_u2688;
framePtr__system_u2688 = s_p0;
{
if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_;
callDepthLimitReached__system_u4608();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__system_u2688 = (*framePtr__system_u2688).prev;
}
static N_INLINE(NIM_BOOL, isFilled__pureZcollectionsZtables_u31)(NI hcode_p0) {
NIM_BOOL result;
nimfr_("isFilled", "/home/runner/.choosenim/toolchains/nim-#devel/lib/pure/collections/hashcommon.nim");
result = !((hcode_p0 == ((NI)0)));
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u417)(tySequence__qwqHTkRvwhrRyENtudHQ7g dest_p0) {
if (dest_p0.p && !(dest_p0.p->cap & NIM_STRLIT_FLAG)) {
alignedDealloc(dest_p0.p, NIM_ALIGNOF(NI));
}
}
N_LIB_PRIVATE N_NIMCALL(void, eqsink___temp_u426)(tySequence__qwqHTkRvwhrRyENtudHQ7g* dest_p0, tySequence__qwqHTkRvwhrRyENtudHQ7g src_p1) {
if ((*dest_p0).p != src_p1.p) { eqdestroy___temp_u417((*dest_p0));
}
(*dest_p0).len = src_p1.len; (*dest_p0).p = src_p1.p;
}
N_LIB_PRIVATE N_NIMCALL(void, b__temp_u573)(void) {
NIM_BOOL* nimErr_;
nimfr_("b", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q colontmp_;
NI w;
nimZeroMem((void*)(&colontmp_), sizeof(tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q));
w = (NI)0;
nimZeroMem((void*)(&colontmp_), sizeof(tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q));
{
tySequence__qwqHTkRvwhrRyENtudHQ7g colontmp__2;
tySequence__qwqHTkRvwhrRyENtudHQ7g resultX60gensym2_;
NI h;
NI e;
NI i;
NI L_2;
NI T18_;
colontmp__2.len = 0; colontmp__2.p = NIM_NIL;
resultX60gensym2_.len = 0; resultX60gensym2_.p = NIM_NIL;
h = (NI)0;
e = (NI)0;
{
NI* xX60gensym2_;
NI L;
xX60gensym2_ = (NI*)0;
L = len__temp_u59(colontmp_);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
{
NI h_2;
NI colontmp__3;
NI T5_;
NI res;
h_2 = (NI)0;
colontmp__3 = (NI)0;
T5_ = (colontmp_.data.len-1);
colontmp__3 = T5_;
res = ((NI)0);
{
while (1) {
NI TM__SRd76hP9cMfCzdUO857UhQQ_4;
if (!(res <= colontmp__3)) goto LA7;
h_2 = ((NI) (res));
{
NIM_BOOL T10_;
NI colontmpD_;
if (h_2 < 0 || h_2 >= colontmp_.data.len){ raiseIndexError2(h_2,colontmp_.data.len-1); goto BeforeRet_;
}
T10_ = (NIM_BOOL)0;
T10_ = isFilled__pureZcollectionsZtables_u31(colontmp_.data.p->data[h_2].Field0);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
if (!T10_) goto LA11_;
colontmpD_ = (NI)0;
if (h_2 < 0 || h_2 >= colontmp_.data.len){ raiseIndexError2(h_2,colontmp_.data.len-1); goto BeforeRet_;
}
xX60gensym2_ = (&colontmp_.data.p->data[h_2].Field1);
colontmpD_ = (*xX60gensym2_);
add__temp_u365((&resultX60gensym2_), colontmpD_);
{
NI T15_;
T15_ = (NI)0;
T15_ = len__temp_u59(colontmp_);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
if (!!((T15_ == L))) goto LA16_;
failedAssertImpl__stdZassertions_u254(TM__SRd76hP9cMfCzdUO857UhQQ_3);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA16_: ;
}
LA11_: ;
if (nimAddInt(res, ((NI)1), &TM__SRd76hP9cMfCzdUO857UhQQ_4)) { raiseOverflow(); goto BeforeRet_;
};
res = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_4);
} LA7: ;
}
}
}
eqsink___temp_u426((&colontmp__2), resultX60gensym2_);
i = ((NI)0);
T18_ = colontmp__2.len;
L_2 = T18_;
{
while (1) {
if (!(i < L_2)) goto LA20;
h = i;
if (i < 0 || i >= colontmp__2.len){ raiseIndexError2(i,colontmp__2.len-1); goto BeforeRet_;
}
e = colontmp__2.p->data[i];
i += ((NI)1);
{
NI T23_;
T23_ = colontmp__2.len;
if (!!((T23_ == L_2))) goto LA24_;
failedAssertImpl__stdZassertions_u254(TM__SRd76hP9cMfCzdUO857UhQQ_6);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA24_: ;
} LA20: ;
}
eqdestroy___temp_u417(colontmp__2);
}
w = ((NI)0);
eqdestroy___temp_u554((&colontmp_));
}
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, y__temp_u572)(void) {
NIM_BOOL* nimErr_;
nimfr_("y", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
b__temp_u573();
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE void PreMainInner(void) {
}
N_LIB_PRIVATE int cmdCount;
N_LIB_PRIVATE char** cmdLine;
N_LIB_PRIVATE char** gEnv;
N_LIB_PRIVATE void PreMain(void) {
#if 0
void (*volatile inner)(void);
inner = PreMainInner;
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000();
(*inner)();
#else
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000();
PreMainInner();
#endif
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
#if 0
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
(*inner)();
#else
PreMain();
NimMainInner();
#endif
}
int main(int argc, char** args, char** env) {
cmdLine = args;
cmdCount = argc;
gEnv = env;
NimMain();
return nim_program_result;
}
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) {
{
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
y__temp_u572();
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
} Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("tables")
)
),
nnkTemplateDef.newTree(
newIdentNode("k"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("untyped"),
nnkIdentDefs.newTree(
newIdentNode("m"),
newIdentNode("untyped"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("result"),
nnkBracketExpr.newTree(
newIdentNode("seq"),
nnkCall.newTree(
newIdentNode("typeof"),
newIdentNode("m")
)
),
newEmptyNode()
)
),
nnkForStmt.newTree(
newIdentNode("x"),
newIdentNode("m"),
nnkStmtList.newTree(
nnkCall.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
newIdentNode("x")
)
)
),
newIdentNode("result")
)
),
nnkIteratorDef.newTree(
newIdentNode("g"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("m"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("int"),
newIdentNode("int")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkForStmt.newTree(
newIdentNode("h"),
newIdentNode("e"),
nnkDotExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("m"),
newIdentNode("keys")
),
newIdentNode("k")
),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkYieldStmt.newTree(
newLit(0)
)
)
),
nnkProcDef.newTree(
newIdentNode("y"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode()
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("b"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode()
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkForStmt.newTree(
newIdentNode("w"),
nnkCall.newTree(
newIdentNode("g"),
nnkCall.newTree(
newIdentNode("default"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("int"),
newIdentNode("int")
)
)
),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
)
)
),
nnkCall.newTree(
newIdentNode("b")
)
)
),
nnkCall.newTree(
newIdentNode("y")
)
) 1.0.10 👎 FAILOutput
IRCompiled filesize99.02 Kb (101,392 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
#include <string.h>
#define nimfr_(proc, file) \
TFrame FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);
#define nimfrs_(proc, file, slots, length) \
struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename;NI len;VarSlot s[slots];} FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);
#define nimln_(n) \
FR_.line = n;
#define nimlf_(n, file) \
FR_.line = n; FR_.filename = file;
typedef struct tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q;
typedef struct tySequence__E8pi9b5QNahsURYzXMjh3qw tySequence__E8pi9b5QNahsURYzXMjh3qw;
typedef struct tySequence__E8pi9b5QNahsURYzXMjh3qw_Content tySequence__E8pi9b5QNahsURYzXMjh3qw_Content;
typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g tySequence__qwqHTkRvwhrRyENtudHQ7g;
typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content tySequence__qwqHTkRvwhrRyENtudHQ7g_Content;
typedef struct tyTuple__47w2DboNEPf69aPgubZdd7Q tyTuple__47w2DboNEPf69aPgubZdd7Q;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
struct tySequence__E8pi9b5QNahsURYzXMjh3qw {
NI len; tySequence__E8pi9b5QNahsURYzXMjh3qw_Content* p;
};
struct tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q {
tySequence__E8pi9b5QNahsURYzXMjh3qw data;
NI counter;
};
struct tySequence__qwqHTkRvwhrRyENtudHQ7g {
NI len; tySequence__qwqHTkRvwhrRyENtudHQ7g_Content* p;
};
struct tyTuple__47w2DboNEPf69aPgubZdd7Q {
NI Field0;
NI Field1;
NI Field2;
};
struct NimStrPayload {
NI cap;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
NI len;
NimStrPayload* p;
};
struct tySequence__E8pi9b5QNahsURYzXMjh3qw_Content { NI cap; tyTuple__47w2DboNEPf69aPgubZdd7Q data[SEQ_DECL_SIZE]; };
struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content { NI cap; NI data[SEQ_DECL_SIZE]; };
N_LIB_PRIVATE N_NIMCALL(void, y__temp_u572)(void);
N_LIB_PRIVATE N_NIMCALL(void, b__temp_u573)(void);
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);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(NI, len__temp_u59)(tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q t_p0);
static N_INLINE(NIM_BOOL, isFilled__pureZcollectionsZtables_u31)(NI hcode_p0);
static N_INLINE(void, nimFrame)(TFrame* s_p0);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4608)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i_p0, NI n_p1);
N_LIB_PRIVATE N_NIMCALL(void, add__temp_u365)(tySequence__qwqHTkRvwhrRyENtudHQ7g* x_p0, NI y_p1);
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl__stdZassertions_u254)(NimStringV2 msg_p0);
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___temp_u426)(tySequence__qwqHTkRvwhrRyENtudHQ7g* dest_p0, tySequence__qwqHTkRvwhrRyENtudHQ7g src_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u417)(tySequence__qwqHTkRvwhrRyENtudHQ7g dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, alignedDealloc)(void* p_p0, NI align_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u554)(tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
static const struct {
NI cap; NIM_CHAR data[156+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_2 = { 156 | NIM_STRLIT_FLAG, "/home/runner/.choosenim/toolchains/nim-#devel/lib/pure/collections/tables.nim(753, 13) `len(t) == L` the length of the table changed while iterating over it" };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_3 = {156, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_2};
static const struct {
NI cap; NIM_CHAR data[147+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_5 = { 147 | NIM_STRLIT_FLAG, "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/iterators.nim(187, 11) `len(a) == L` the length of the seq changed while iterating over it" };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_6 = {147, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_5};
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4392;
extern NIM_THREADVAR TFrame* framePtr__system_u2688;
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(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (&nimInErrorMode__system_u4392);
return result;
}
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_: ;
}
static N_INLINE(void, nimFrame)(TFrame* s_p0) {
{
if (!(framePtr__system_u2688 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s_p0).calldepth = ((NI16)0);
}
goto LA1_;
LA3_: ;
{
(*s_p0).calldepth = (NI16)((*framePtr__system_u2688).calldepth + ((NI16)1));
}
LA1_: ;
(*s_p0).prev = framePtr__system_u2688;
framePtr__system_u2688 = s_p0;
{
if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_;
callDepthLimitReached__system_u4608();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__system_u2688 = (*framePtr__system_u2688).prev;
}
static N_INLINE(NIM_BOOL, isFilled__pureZcollectionsZtables_u31)(NI hcode_p0) {
NIM_BOOL result;
nimfr_("isFilled", "/home/runner/.choosenim/toolchains/nim-#devel/lib/pure/collections/hashcommon.nim");
result = !((hcode_p0 == ((NI)0)));
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u417)(tySequence__qwqHTkRvwhrRyENtudHQ7g dest_p0) {
if (dest_p0.p && !(dest_p0.p->cap & NIM_STRLIT_FLAG)) {
alignedDealloc(dest_p0.p, NIM_ALIGNOF(NI));
}
}
N_LIB_PRIVATE N_NIMCALL(void, eqsink___temp_u426)(tySequence__qwqHTkRvwhrRyENtudHQ7g* dest_p0, tySequence__qwqHTkRvwhrRyENtudHQ7g src_p1) {
if ((*dest_p0).p != src_p1.p) { eqdestroy___temp_u417((*dest_p0));
}
(*dest_p0).len = src_p1.len; (*dest_p0).p = src_p1.p;
}
N_LIB_PRIVATE N_NIMCALL(void, b__temp_u573)(void) {
NIM_BOOL* nimErr_;
nimfr_("b", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q colontmp_;
NI w;
nimZeroMem((void*)(&colontmp_), sizeof(tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q));
w = (NI)0;
nimZeroMem((void*)(&colontmp_), sizeof(tyObject_Table__N1QEfmUd9bXirjyq9atLJC0Q));
{
tySequence__qwqHTkRvwhrRyENtudHQ7g colontmp__2;
tySequence__qwqHTkRvwhrRyENtudHQ7g resultX60gensym2_;
NI h;
NI e;
NI i;
NI L_2;
NI T18_;
colontmp__2.len = 0; colontmp__2.p = NIM_NIL;
resultX60gensym2_.len = 0; resultX60gensym2_.p = NIM_NIL;
h = (NI)0;
e = (NI)0;
{
NI* xX60gensym2_;
NI L;
xX60gensym2_ = (NI*)0;
L = len__temp_u59(colontmp_);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
{
NI h_2;
NI colontmp__3;
NI T5_;
NI res;
h_2 = (NI)0;
colontmp__3 = (NI)0;
T5_ = (colontmp_.data.len-1);
colontmp__3 = T5_;
res = ((NI)0);
{
while (1) {
NI TM__SRd76hP9cMfCzdUO857UhQQ_4;
if (!(res <= colontmp__3)) goto LA7;
h_2 = ((NI) (res));
{
NIM_BOOL T10_;
NI colontmpD_;
if (h_2 < 0 || h_2 >= colontmp_.data.len){ raiseIndexError2(h_2,colontmp_.data.len-1); goto BeforeRet_;
}
T10_ = (NIM_BOOL)0;
T10_ = isFilled__pureZcollectionsZtables_u31(colontmp_.data.p->data[h_2].Field0);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
if (!T10_) goto LA11_;
colontmpD_ = (NI)0;
if (h_2 < 0 || h_2 >= colontmp_.data.len){ raiseIndexError2(h_2,colontmp_.data.len-1); goto BeforeRet_;
}
xX60gensym2_ = (&colontmp_.data.p->data[h_2].Field1);
colontmpD_ = (*xX60gensym2_);
add__temp_u365((&resultX60gensym2_), colontmpD_);
{
NI T15_;
T15_ = (NI)0;
T15_ = len__temp_u59(colontmp_);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
if (!!((T15_ == L))) goto LA16_;
failedAssertImpl__stdZassertions_u254(TM__SRd76hP9cMfCzdUO857UhQQ_3);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA16_: ;
}
LA11_: ;
if (nimAddInt(res, ((NI)1), &TM__SRd76hP9cMfCzdUO857UhQQ_4)) { raiseOverflow(); goto BeforeRet_;
};
res = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_4);
} LA7: ;
}
}
}
eqsink___temp_u426((&colontmp__2), resultX60gensym2_);
i = ((NI)0);
T18_ = colontmp__2.len;
L_2 = T18_;
{
while (1) {
if (!(i < L_2)) goto LA20;
h = i;
if (i < 0 || i >= colontmp__2.len){ raiseIndexError2(i,colontmp__2.len-1); goto BeforeRet_;
}
e = colontmp__2.p->data[i];
i += ((NI)1);
{
NI T23_;
T23_ = colontmp__2.len;
if (!!((T23_ == L_2))) goto LA24_;
failedAssertImpl__stdZassertions_u254(TM__SRd76hP9cMfCzdUO857UhQQ_6);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA24_: ;
} LA20: ;
}
eqdestroy___temp_u417(colontmp__2);
}
w = ((NI)0);
eqdestroy___temp_u554((&colontmp_));
}
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, y__temp_u572)(void) {
NIM_BOOL* nimErr_;
nimfr_("y", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
b__temp_u573();
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE void PreMainInner(void) {
}
N_LIB_PRIVATE int cmdCount;
N_LIB_PRIVATE char** cmdLine;
N_LIB_PRIVATE char** gEnv;
N_LIB_PRIVATE void PreMain(void) {
#if 0
void (*volatile inner)(void);
inner = PreMainInner;
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000();
(*inner)();
#else
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000();
PreMainInner();
#endif
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
#if 0
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
(*inner)();
#else
PreMain();
NimMainInner();
#endif
}
int main(int argc, char** args, char** env) {
cmdLine = args;
cmdCount = argc;
gEnv = env;
NimMain();
return nim_program_result;
}
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) {
{
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
y__temp_u572();
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
} Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("tables")
)
),
nnkTemplateDef.newTree(
newIdentNode("k"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("untyped"),
nnkIdentDefs.newTree(
newIdentNode("m"),
newIdentNode("untyped"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("result"),
nnkBracketExpr.newTree(
newIdentNode("seq"),
nnkCall.newTree(
newIdentNode("typeof"),
newIdentNode("m")
)
),
newEmptyNode()
)
),
nnkForStmt.newTree(
newIdentNode("x"),
newIdentNode("m"),
nnkStmtList.newTree(
nnkCall.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
newIdentNode("x")
)
)
),
newIdentNode("result")
)
),
nnkIteratorDef.newTree(
newIdentNode("g"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("m"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("int"),
newIdentNode("int")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkForStmt.newTree(
newIdentNode("h"),
newIdentNode("e"),
nnkDotExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("m"),
newIdentNode("keys")
),
newIdentNode("k")
),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkYieldStmt.newTree(
newLit(0)
)
)
),
nnkProcDef.newTree(
newIdentNode("y"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode()
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("b"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode()
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkForStmt.newTree(
newIdentNode("w"),
nnkCall.newTree(
newIdentNode("g"),
nnkCall.newTree(
newIdentNode("default"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("int"),
newIdentNode("int")
)
)
),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
)
)
),
nnkCall.newTree(
newIdentNode("b")
)
)
),
nnkCall.newTree(
newIdentNode("y")
)
) ??? ➡️ 🐛DiagnosticsThe commit that introduced the bug can not be found, but the bug is in the commits: (Can not find the commit because Nim can not be re-built commit-by-commit to bisect). Stats
🤖 Bug found in |
I think we need use git bisect to find the first good commit; see also https://stackoverflow.com/questions/15407075/how-could-i-use-git-bisect-to-find-the-first-good-commit |
I have run a bisect locally, #22559 is the fix, which has been backported to version-2-0. |
Description
Nim Version
Current Output
ORC or refc doesn't affect results.
Expected Output
Possible Solution
Backport fix from
devel
toversion-2-0
Additional Information
No response
The text was updated successfully, but these errors were encountered: