Closed jangko closed 5 months ago
!nim c
import
std/options
type
BID = string or uint64
Future[T] = ref object of RootObj
internalValue: T
InternalRaisesFuture[T] = ref object of Future[T]
proc newInternalRaisesFutureImpl[T](): InternalRaisesFuture[T] =
let fut = InternalRaisesFuture[T]()
template newFuture[T](): auto =
newInternalRaisesFutureImpl[T]()
proc problematic(blockId: BID): Future[Option[seq[int]]] =
let resultFuture = newFuture[Option[seq[int]]]()
return resultFuture
let x = problematic("latest")
0 bytes (0 bytes)
```cpp
```
2024-02-19T12:16:29
2024-02-19T12:16:29
91.48 Kb (93,680 bytes)
```cpp
#define NIM_INTBITS 64
#include "nimbase.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_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ;
typedef struct RootObj RootObj;
typedef struct TNimTypeV2 TNimTypeV2;
typedef struct tyObject_Option__9cGajnYE9arR7Hmr1TPvw5ow tyObject_Option__9cGajnYE9arR7Hmr1TPvw5ow;
typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g tySequence__qwqHTkRvwhrRyENtudHQ7g;
typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content tySequence__qwqHTkRvwhrRyENtudHQ7g_Content;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
typedef struct tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg;
typedef struct tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low;
struct TNimTypeV2 {
void* destructor;
NI size;
NI16 align;
NI16 depth;
NU32* display;
void* traceImpl;
void* typeInfoV1;
NI flags;
};
struct RootObj {
TNimTypeV2* m_type;
};
struct tySequence__qwqHTkRvwhrRyENtudHQ7g {
NI len; tySequence__qwqHTkRvwhrRyENtudHQ7g_Content* p;
};
struct tyObject_Option__9cGajnYE9arR7Hmr1TPvw5ow {
tySequence__qwqHTkRvwhrRyENtudHQ7g val;
NIM_BOOL has;
};
struct tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ {
RootObj Sup;
tyObject_Option__9cGajnYE9arR7Hmr1TPvw5ow internalValue;
};
struct NimStrPayload {
NI cap;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
NI len;
NimStrPayload* p;
};
struct tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg {
tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ Sup;
};
struct tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low {
NI rc;
NI rootIdx;
};
struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content { NI cap; NI data[SEQ_DECL_SIZE]; };
N_LIB_PRIVATE N_NIMCALL(tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ*, problematic__temp_u28)(NimStringV2 blockId_p0);
N_LIB_PRIVATE N_NIMCALL(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg*, newInternalRaisesFutureImpl__temp_u35)(void);
N_LIB_PRIVATE N_NIMCALL(void*, nimNewObj)(NI size_p0, NI alignment_p1);
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__temp_u288)(void* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u64)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u82)(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_u44)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* dest_p0);
static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicDyn)(void* p_p0);
static N_INLINE(NI, minuspercent___system_u810)(NI x_p0, NI y_p1);
static N_INLINE(void, nimFrame)(TFrame* s_p0);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4621)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
N_LIB_PRIVATE N_NOINLINE(void, rememberCycle__system_u3417)(NIM_BOOL isDestroyAction_p0, tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low* s_p1, TNimTypeV2* desc_p2);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, nimDestroyAndDispose)(void* p_p0);
static N_INLINE(void, nimMarkCyclic)(void* p_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___temp_u41)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg** dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u238)(tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
N_LIB_PRIVATE TNimTypeV2 NTIv2__JRDNYXKG9avPzoSh5WuleFg_;
static const struct {
NI cap; NIM_CHAR data[6+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_4 = { 6 | NIM_STRLIT_FLAG, "latest" };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_5 = {6, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_4};
N_LIB_PRIVATE tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* x__temp_u286;
static NIM_CONST NU32 TM__SRd76hP9cMfCzdUO857UhQQ_2[3] = {3701606400, 3362939648, 281895168};
N_LIB_PRIVATE TNimTypeV2 NTIv2__JRDNYXKG9avPzoSh5WuleFg_ = {.destructor = (void*)rttiDestroy__temp_u288, .size = sizeof(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg), .align = (NI16) NIM_ALIGNOF(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg), .depth = 2, .display = TM__SRd76hP9cMfCzdUO857UhQQ_2, .traceImpl = (void*)NIM_NIL, .flags = 0};
extern NIM_THREADVAR TFrame* framePtr__system_u4020;
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4403;
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u82)(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, eqdestroy___temp_u64)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* dest_p0) {
eqdestroy___temp_u82((*dest_p0).Sup.internalValue.val);
}
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__temp_u288)(void* dest_p0) {
eqdestroy___temp_u64(((tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg*) (dest_p0)));
}
static N_INLINE(void, nimFrame)(TFrame* s_p0) {
{
if (!(framePtr__system_u4020 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s_p0).calldepth = ((NI16)0);
}
goto LA1_;
LA3_: ;
{
(*s_p0).calldepth = (NI16)((*framePtr__system_u4020).calldepth + ((NI16)1));
}
LA1_: ;
(*s_p0).prev = framePtr__system_u4020;
framePtr__system_u4020 = s_p0;
{
if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_;
callDepthLimitReached__system_u4621();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__system_u4020 = (*framePtr__system_u4020).prev;
}
static N_INLINE(NI, minuspercent___system_u810)(NI x_p0, NI y_p1) {
NI result;
nimfr_("-%", "/home/runner/.choosenim/toolchains/nim-2.0.2/lib/system/arithmetics.nim");
result = ((NI) ((NU)((NU64)(((NU) (x_p0))) - (NU64)(((NU) (y_p1))))));
popFrame();
return result;
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (&nimInErrorMode__system_u4403);
return result;
}
static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicDyn)(void* p_p0) {
NIM_BOOL result;
NIM_BOOL* nimErr_;
nimfr_("nimDecRefIsLastCyclicDyn", "/home/runner/.choosenim/toolchains/nim-2.0.2/lib/system/orc.nim");
{nimErr_ = nimErrorFlag();
result = (NIM_BOOL)0;
{
tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low* cell;
NI T5_;
if (!!((p_p0 == NIM_NIL))) goto LA3_;
T5_ = (NI)0;
T5_ = minuspercent___system_u810(((NI) (ptrdiff_t) (p_p0)), ((NI)16));
cell = ((tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low*) (T5_));
{
if (!((NI)((*cell).rc & ((NI)-16)) == ((NI)0))) goto LA8_;
result = NIM_TRUE;
}
goto LA6_;
LA8_: ;
{
NI TM__SRd76hP9cMfCzdUO857UhQQ_3;
if (nimSubInt((*cell).rc, ((NI)16), &TM__SRd76hP9cMfCzdUO857UhQQ_3)) { raiseOverflow(); goto BeforeRet_;
};
(*cell).rc = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_3);
}
LA6_: ;
rememberCycle__system_u3417(result, cell, (*((TNimTypeV2**) (p_p0))));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA3_: ;
}BeforeRet_: ;
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u44)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* dest_p0) {
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLastCyclicDyn(dest_p0);
if (!T3_) goto LA4_;
nimDestroyAndDispose(dest_p0);
}
LA4_: ;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg*, newInternalRaisesFutureImpl__temp_u35)(void) {
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* result;
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* fut;
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* T1_;
nimfr_("newInternalRaisesFutureImpl", "/home/runner/work/Nim/Nim/temp.nim");
result = NIM_NIL;
fut = NIM_NIL;
T1_ = NIM_NIL;
T1_ = (tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg*) nimNewObj(sizeof(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg), NIM_ALIGNOF(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg));
(*T1_).Sup.Sup.m_type = (&NTIv2__JRDNYXKG9avPzoSh5WuleFg_);
fut = T1_;
eqdestroy___temp_u44(fut);
popFrame();
return result;
}
static N_INLINE(void, nimMarkCyclic)(void* p_p0) {
nimfr_("nimMarkCyclic", "/home/runner/.choosenim/toolchains/nim-2.0.2/lib/system/orc.nim");
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___temp_u41)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg** dest_p0) {
(*dest_p0) = 0;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ*, problematic__temp_u28)(NimStringV2 blockId_p0) {
tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* result;
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* resultFuture;
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* blitTmp;
NIM_BOOL* nimErr_;
nimfr_("problematic", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
result = NIM_NIL;
resultFuture = NIM_NIL;
resultFuture = newInternalRaisesFutureImpl__temp_u35();
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
blitTmp = resultFuture;
nimMarkCyclic(resultFuture);
eqwasMoved___temp_u41(&resultFuture);
result = &blitTmp->Sup;
eqdestroy___temp_u44(resultFuture);
goto BeforeRet_;
{
LA1_:;
}
{
eqdestroy___temp_u44(resultFuture);
}
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u238)(tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* dest_p0) {
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLastCyclicDyn(dest_p0);
if (!T3_) goto LA4_;
nimDestroyAndDispose(dest_p0);
}
LA4_: ;
}
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;
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000();
(*inner)();
#else
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_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) {
{
tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* T1_;
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
T1_ = NIM_NIL;
T1_ = problematic__temp_u28(TM__SRd76hP9cMfCzdUO857UhQQ_5);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
x__temp_u286 = T1_;
eqdestroy___temp_u238(x__temp_u286);
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
}
```
2024-02-19T12:16:30
2024-02-19T12:16:31
91.48 Kb (93,680 bytes)
```cpp
#define NIM_INTBITS 64
#include "nimbase.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_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ;
typedef struct RootObj RootObj;
typedef struct TNimTypeV2 TNimTypeV2;
typedef struct tyObject_Option__9cGajnYE9arR7Hmr1TPvw5ow tyObject_Option__9cGajnYE9arR7Hmr1TPvw5ow;
typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g tySequence__qwqHTkRvwhrRyENtudHQ7g;
typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content tySequence__qwqHTkRvwhrRyENtudHQ7g_Content;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
typedef struct tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg;
typedef struct tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low;
struct TNimTypeV2 {
void* destructor;
NI size;
NI16 align;
NI16 depth;
NU32* display;
void* traceImpl;
void* typeInfoV1;
NI flags;
};
struct RootObj {
TNimTypeV2* m_type;
};
struct tySequence__qwqHTkRvwhrRyENtudHQ7g {
NI len; tySequence__qwqHTkRvwhrRyENtudHQ7g_Content* p;
};
struct tyObject_Option__9cGajnYE9arR7Hmr1TPvw5ow {
tySequence__qwqHTkRvwhrRyENtudHQ7g val;
NIM_BOOL has;
};
struct tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ {
RootObj Sup;
tyObject_Option__9cGajnYE9arR7Hmr1TPvw5ow internalValue;
};
struct NimStrPayload {
NI cap;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
NI len;
NimStrPayload* p;
};
struct tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg {
tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ Sup;
};
struct tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low {
NI rc;
NI rootIdx;
};
struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content { NI cap; NI data[SEQ_DECL_SIZE]; };
N_LIB_PRIVATE N_NIMCALL(tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ*, problematic__temp_u28)(NimStringV2 blockId_p0);
N_LIB_PRIVATE N_NIMCALL(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg*, newInternalRaisesFutureImpl__temp_u35)(void);
N_LIB_PRIVATE N_NIMCALL(void*, nimNewObj)(NI size_p0, NI alignment_p1);
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__temp_u288)(void* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u64)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u82)(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_u44)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* dest_p0);
static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicDyn)(void* p_p0);
static N_INLINE(NI, minuspercent___system_u810)(NI x_p0, NI y_p1);
static N_INLINE(void, nimFrame)(TFrame* s_p0);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4621)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
N_LIB_PRIVATE N_NOINLINE(void, rememberCycle__system_u3417)(NIM_BOOL isDestroyAction_p0, tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low* s_p1, TNimTypeV2* desc_p2);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, nimDestroyAndDispose)(void* p_p0);
static N_INLINE(void, nimMarkCyclic)(void* p_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___temp_u41)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg** dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u238)(tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
N_LIB_PRIVATE TNimTypeV2 NTIv2__JRDNYXKG9avPzoSh5WuleFg_;
static const struct {
NI cap; NIM_CHAR data[6+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_4 = { 6 | NIM_STRLIT_FLAG, "latest" };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_5 = {6, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_4};
N_LIB_PRIVATE tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* x__temp_u286;
static NIM_CONST NU32 TM__SRd76hP9cMfCzdUO857UhQQ_2[3] = {3701606400, 3362939648, 281895168};
N_LIB_PRIVATE TNimTypeV2 NTIv2__JRDNYXKG9avPzoSh5WuleFg_ = {.destructor = (void*)rttiDestroy__temp_u288, .size = sizeof(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg), .align = (NI16) NIM_ALIGNOF(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg), .depth = 2, .display = TM__SRd76hP9cMfCzdUO857UhQQ_2, .traceImpl = (void*)NIM_NIL, .flags = 0};
extern NIM_THREADVAR TFrame* framePtr__system_u4020;
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4403;
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u82)(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, eqdestroy___temp_u64)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* dest_p0) {
eqdestroy___temp_u82((*dest_p0).Sup.internalValue.val);
}
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__temp_u288)(void* dest_p0) {
eqdestroy___temp_u64(((tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg*) (dest_p0)));
}
static N_INLINE(void, nimFrame)(TFrame* s_p0) {
{
if (!(framePtr__system_u4020 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s_p0).calldepth = ((NI16)0);
}
goto LA1_;
LA3_: ;
{
(*s_p0).calldepth = (NI16)((*framePtr__system_u4020).calldepth + ((NI16)1));
}
LA1_: ;
(*s_p0).prev = framePtr__system_u4020;
framePtr__system_u4020 = s_p0;
{
if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_;
callDepthLimitReached__system_u4621();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__system_u4020 = (*framePtr__system_u4020).prev;
}
static N_INLINE(NI, minuspercent___system_u810)(NI x_p0, NI y_p1) {
NI result;
nimfr_("-%", "/home/runner/.choosenim/toolchains/nim-2.0.2/lib/system/arithmetics.nim");
result = ((NI) ((NU)((NU64)(((NU) (x_p0))) - (NU64)(((NU) (y_p1))))));
popFrame();
return result;
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (&nimInErrorMode__system_u4403);
return result;
}
static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicDyn)(void* p_p0) {
NIM_BOOL result;
NIM_BOOL* nimErr_;
nimfr_("nimDecRefIsLastCyclicDyn", "/home/runner/.choosenim/toolchains/nim-2.0.2/lib/system/orc.nim");
{nimErr_ = nimErrorFlag();
result = (NIM_BOOL)0;
{
tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low* cell;
NI T5_;
if (!!((p_p0 == NIM_NIL))) goto LA3_;
T5_ = (NI)0;
T5_ = minuspercent___system_u810(((NI) (ptrdiff_t) (p_p0)), ((NI)16));
cell = ((tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low*) (T5_));
{
if (!((NI)((*cell).rc & ((NI)-16)) == ((NI)0))) goto LA8_;
result = NIM_TRUE;
}
goto LA6_;
LA8_: ;
{
NI TM__SRd76hP9cMfCzdUO857UhQQ_3;
if (nimSubInt((*cell).rc, ((NI)16), &TM__SRd76hP9cMfCzdUO857UhQQ_3)) { raiseOverflow(); goto BeforeRet_;
};
(*cell).rc = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_3);
}
LA6_: ;
rememberCycle__system_u3417(result, cell, (*((TNimTypeV2**) (p_p0))));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA3_: ;
}BeforeRet_: ;
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u44)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* dest_p0) {
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLastCyclicDyn(dest_p0);
if (!T3_) goto LA4_;
nimDestroyAndDispose(dest_p0);
}
LA4_: ;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg*, newInternalRaisesFutureImpl__temp_u35)(void) {
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* result;
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* fut;
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* T1_;
nimfr_("newInternalRaisesFutureImpl", "/home/runner/work/Nim/Nim/temp.nim");
result = NIM_NIL;
fut = NIM_NIL;
T1_ = NIM_NIL;
T1_ = (tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg*) nimNewObj(sizeof(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg), NIM_ALIGNOF(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg));
(*T1_).Sup.Sup.m_type = (&NTIv2__JRDNYXKG9avPzoSh5WuleFg_);
fut = T1_;
eqdestroy___temp_u44(fut);
popFrame();
return result;
}
static N_INLINE(void, nimMarkCyclic)(void* p_p0) {
nimfr_("nimMarkCyclic", "/home/runner/.choosenim/toolchains/nim-2.0.2/lib/system/orc.nim");
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___temp_u41)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg** dest_p0) {
(*dest_p0) = 0;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ*, problematic__temp_u28)(NimStringV2 blockId_p0) {
tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* result;
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* resultFuture;
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* blitTmp;
NIM_BOOL* nimErr_;
nimfr_("problematic", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
result = NIM_NIL;
resultFuture = NIM_NIL;
resultFuture = newInternalRaisesFutureImpl__temp_u35();
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
blitTmp = resultFuture;
nimMarkCyclic(resultFuture);
eqwasMoved___temp_u41(&resultFuture);
result = &blitTmp->Sup;
eqdestroy___temp_u44(resultFuture);
goto BeforeRet_;
{
LA1_:;
}
{
eqdestroy___temp_u44(resultFuture);
}
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u238)(tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* dest_p0) {
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLastCyclicDyn(dest_p0);
if (!T3_) goto LA4_;
nimDestroyAndDispose(dest_p0);
}
LA4_: ;
}
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;
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000();
(*inner)();
#else
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_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) {
{
tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* T1_;
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
T1_ = NIM_NIL;
T1_ = problematic__temp_u28(TM__SRd76hP9cMfCzdUO857UhQQ_5);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
x__temp_u286 = T1_;
eqdestroy___temp_u238(x__temp_u286);
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
}
```
2024-02-19T12:16:33
2024-02-19T12:16:33
91.48 Kb (93,680 bytes)
```cpp
#define NIM_INTBITS 64
#include "nimbase.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_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ;
typedef struct RootObj RootObj;
typedef struct TNimTypeV2 TNimTypeV2;
typedef struct tyObject_Option__9cGajnYE9arR7Hmr1TPvw5ow tyObject_Option__9cGajnYE9arR7Hmr1TPvw5ow;
typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g tySequence__qwqHTkRvwhrRyENtudHQ7g;
typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content tySequence__qwqHTkRvwhrRyENtudHQ7g_Content;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
typedef struct tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg;
typedef struct tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low;
struct TNimTypeV2 {
void* destructor;
NI size;
NI16 align;
NI16 depth;
NU32* display;
void* traceImpl;
void* typeInfoV1;
NI flags;
};
struct RootObj {
TNimTypeV2* m_type;
};
struct tySequence__qwqHTkRvwhrRyENtudHQ7g {
NI len; tySequence__qwqHTkRvwhrRyENtudHQ7g_Content* p;
};
struct tyObject_Option__9cGajnYE9arR7Hmr1TPvw5ow {
tySequence__qwqHTkRvwhrRyENtudHQ7g val;
NIM_BOOL has;
};
struct tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ {
RootObj Sup;
tyObject_Option__9cGajnYE9arR7Hmr1TPvw5ow internalValue;
};
struct NimStrPayload {
NI cap;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
NI len;
NimStrPayload* p;
};
struct tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg {
tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ Sup;
};
struct tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low {
NI rc;
NI rootIdx;
};
struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content { NI cap; NI data[SEQ_DECL_SIZE]; };
N_LIB_PRIVATE N_NIMCALL(tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ*, problematic__temp_u28)(NimStringV2 blockId_p0);
N_LIB_PRIVATE N_NIMCALL(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg*, newInternalRaisesFutureImpl__temp_u35)(void);
N_LIB_PRIVATE N_NIMCALL(void*, nimNewObj)(NI size_p0, NI alignment_p1);
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__temp_u288)(void* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u64)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u82)(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_u44)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* dest_p0);
static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicDyn)(void* p_p0);
static N_INLINE(NI, minuspercent___system_u810)(NI x_p0, NI y_p1);
static N_INLINE(void, nimFrame)(TFrame* s_p0);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4621)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
N_LIB_PRIVATE N_NOINLINE(void, rememberCycle__system_u3417)(NIM_BOOL isDestroyAction_p0, tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low* s_p1, TNimTypeV2* desc_p2);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, nimDestroyAndDispose)(void* p_p0);
static N_INLINE(void, nimMarkCyclic)(void* p_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___temp_u41)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg** dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u238)(tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
N_LIB_PRIVATE TNimTypeV2 NTIv2__JRDNYXKG9avPzoSh5WuleFg_;
static const struct {
NI cap; NIM_CHAR data[6+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_4 = { 6 | NIM_STRLIT_FLAG, "latest" };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_5 = {6, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_4};
N_LIB_PRIVATE tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* x__temp_u286;
static NIM_CONST NU32 TM__SRd76hP9cMfCzdUO857UhQQ_2[3] = {3701606400, 3362939648, 281895168};
N_LIB_PRIVATE TNimTypeV2 NTIv2__JRDNYXKG9avPzoSh5WuleFg_ = {.destructor = (void*)rttiDestroy__temp_u288, .size = sizeof(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg), .align = (NI16) NIM_ALIGNOF(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg), .depth = 2, .display = TM__SRd76hP9cMfCzdUO857UhQQ_2, .traceImpl = (void*)NIM_NIL, .flags = 0};
extern NIM_THREADVAR TFrame* framePtr__system_u4020;
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4403;
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u82)(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, eqdestroy___temp_u64)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* dest_p0) {
eqdestroy___temp_u82((*dest_p0).Sup.internalValue.val);
}
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__temp_u288)(void* dest_p0) {
eqdestroy___temp_u64(((tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg*) (dest_p0)));
}
static N_INLINE(void, nimFrame)(TFrame* s_p0) {
{
if (!(framePtr__system_u4020 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s_p0).calldepth = ((NI16)0);
}
goto LA1_;
LA3_: ;
{
(*s_p0).calldepth = (NI16)((*framePtr__system_u4020).calldepth + ((NI16)1));
}
LA1_: ;
(*s_p0).prev = framePtr__system_u4020;
framePtr__system_u4020 = s_p0;
{
if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_;
callDepthLimitReached__system_u4621();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__system_u4020 = (*framePtr__system_u4020).prev;
}
static N_INLINE(NI, minuspercent___system_u810)(NI x_p0, NI y_p1) {
NI result;
nimfr_("-%", "/home/runner/.choosenim/toolchains/nim-2.0.2/lib/system/arithmetics.nim");
result = ((NI) ((NU)((NU64)(((NU) (x_p0))) - (NU64)(((NU) (y_p1))))));
popFrame();
return result;
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (&nimInErrorMode__system_u4403);
return result;
}
static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicDyn)(void* p_p0) {
NIM_BOOL result;
NIM_BOOL* nimErr_;
nimfr_("nimDecRefIsLastCyclicDyn", "/home/runner/.choosenim/toolchains/nim-2.0.2/lib/system/orc.nim");
{nimErr_ = nimErrorFlag();
result = (NIM_BOOL)0;
{
tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low* cell;
NI T5_;
if (!!((p_p0 == NIM_NIL))) goto LA3_;
T5_ = (NI)0;
T5_ = minuspercent___system_u810(((NI) (ptrdiff_t) (p_p0)), ((NI)16));
cell = ((tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low*) (T5_));
{
if (!((NI)((*cell).rc & ((NI)-16)) == ((NI)0))) goto LA8_;
result = NIM_TRUE;
}
goto LA6_;
LA8_: ;
{
NI TM__SRd76hP9cMfCzdUO857UhQQ_3;
if (nimSubInt((*cell).rc, ((NI)16), &TM__SRd76hP9cMfCzdUO857UhQQ_3)) { raiseOverflow(); goto BeforeRet_;
};
(*cell).rc = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_3);
}
LA6_: ;
rememberCycle__system_u3417(result, cell, (*((TNimTypeV2**) (p_p0))));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA3_: ;
}BeforeRet_: ;
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u44)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* dest_p0) {
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLastCyclicDyn(dest_p0);
if (!T3_) goto LA4_;
nimDestroyAndDispose(dest_p0);
}
LA4_: ;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg*, newInternalRaisesFutureImpl__temp_u35)(void) {
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* result;
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* fut;
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* T1_;
nimfr_("newInternalRaisesFutureImpl", "/home/runner/work/Nim/Nim/temp.nim");
result = NIM_NIL;
fut = NIM_NIL;
T1_ = NIM_NIL;
T1_ = (tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg*) nimNewObj(sizeof(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg), NIM_ALIGNOF(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg));
(*T1_).Sup.Sup.m_type = (&NTIv2__JRDNYXKG9avPzoSh5WuleFg_);
fut = T1_;
eqdestroy___temp_u44(fut);
popFrame();
return result;
}
static N_INLINE(void, nimMarkCyclic)(void* p_p0) {
nimfr_("nimMarkCyclic", "/home/runner/.choosenim/toolchains/nim-2.0.2/lib/system/orc.nim");
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___temp_u41)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg** dest_p0) {
(*dest_p0) = 0;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ*, problematic__temp_u28)(NimStringV2 blockId_p0) {
tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* result;
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* resultFuture;
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* blitTmp;
NIM_BOOL* nimErr_;
nimfr_("problematic", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
result = NIM_NIL;
resultFuture = NIM_NIL;
resultFuture = newInternalRaisesFutureImpl__temp_u35();
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
blitTmp = resultFuture;
nimMarkCyclic(resultFuture);
eqwasMoved___temp_u41(&resultFuture);
result = &blitTmp->Sup;
eqdestroy___temp_u44(resultFuture);
goto BeforeRet_;
{
LA1_:;
}
{
eqdestroy___temp_u44(resultFuture);
}
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u238)(tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* dest_p0) {
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLastCyclicDyn(dest_p0);
if (!T3_) goto LA4_;
nimDestroyAndDispose(dest_p0);
}
LA4_: ;
}
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;
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000();
(*inner)();
#else
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_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) {
{
tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* T1_;
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
T1_ = NIM_NIL;
T1_ = problematic__temp_u28(TM__SRd76hP9cMfCzdUO857UhQQ_5);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
x__temp_u286 = T1_;
eqdestroy___temp_u238(x__temp_u286);
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
}
```
2024-02-19T12:16:36
2024-02-19T12:16:36
91.48 Kb (93,680 bytes)
```cpp
#define NIM_INTBITS 64
#include "nimbase.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_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ;
typedef struct RootObj RootObj;
typedef struct TNimTypeV2 TNimTypeV2;
typedef struct tyObject_Option__9cGajnYE9arR7Hmr1TPvw5ow tyObject_Option__9cGajnYE9arR7Hmr1TPvw5ow;
typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g tySequence__qwqHTkRvwhrRyENtudHQ7g;
typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content tySequence__qwqHTkRvwhrRyENtudHQ7g_Content;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
typedef struct tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg;
typedef struct tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low;
struct TNimTypeV2 {
void* destructor;
NI size;
NI16 align;
NI16 depth;
NU32* display;
void* traceImpl;
void* typeInfoV1;
NI flags;
};
struct RootObj {
TNimTypeV2* m_type;
};
struct tySequence__qwqHTkRvwhrRyENtudHQ7g {
NI len; tySequence__qwqHTkRvwhrRyENtudHQ7g_Content* p;
};
struct tyObject_Option__9cGajnYE9arR7Hmr1TPvw5ow {
tySequence__qwqHTkRvwhrRyENtudHQ7g val;
NIM_BOOL has;
};
struct tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ {
RootObj Sup;
tyObject_Option__9cGajnYE9arR7Hmr1TPvw5ow internalValue;
};
struct NimStrPayload {
NI cap;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
NI len;
NimStrPayload* p;
};
struct tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg {
tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ Sup;
};
struct tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low {
NI rc;
NI rootIdx;
};
struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content { NI cap; NI data[SEQ_DECL_SIZE]; };
N_LIB_PRIVATE N_NIMCALL(tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ*, problematic__temp_u28)(NimStringV2 blockId_p0);
N_LIB_PRIVATE N_NIMCALL(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg*, newInternalRaisesFutureImpl__temp_u35)(void);
N_LIB_PRIVATE N_NIMCALL(void*, nimNewObj)(NI size_p0, NI alignment_p1);
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__temp_u288)(void* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u64)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u82)(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_u44)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* dest_p0);
static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicDyn)(void* p_p0);
static N_INLINE(NI, minuspercent___system_u810)(NI x_p0, NI y_p1);
static N_INLINE(void, nimFrame)(TFrame* s_p0);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4621)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
N_LIB_PRIVATE N_NOINLINE(void, rememberCycle__system_u3417)(NIM_BOOL isDestroyAction_p0, tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low* s_p1, TNimTypeV2* desc_p2);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, nimDestroyAndDispose)(void* p_p0);
static N_INLINE(void, nimMarkCyclic)(void* p_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___temp_u41)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg** dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u238)(tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
N_LIB_PRIVATE TNimTypeV2 NTIv2__JRDNYXKG9avPzoSh5WuleFg_;
static const struct {
NI cap; NIM_CHAR data[6+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_4 = { 6 | NIM_STRLIT_FLAG, "latest" };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_5 = {6, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_4};
N_LIB_PRIVATE tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* x__temp_u286;
static NIM_CONST NU32 TM__SRd76hP9cMfCzdUO857UhQQ_2[3] = {3701606400, 3362939648, 281895168};
N_LIB_PRIVATE TNimTypeV2 NTIv2__JRDNYXKG9avPzoSh5WuleFg_ = {.destructor = (void*)rttiDestroy__temp_u288, .size = sizeof(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg), .align = (NI16) NIM_ALIGNOF(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg), .depth = 2, .display = TM__SRd76hP9cMfCzdUO857UhQQ_2, .traceImpl = (void*)NIM_NIL, .flags = 0};
extern NIM_THREADVAR TFrame* framePtr__system_u4020;
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4403;
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u82)(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, eqdestroy___temp_u64)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* dest_p0) {
eqdestroy___temp_u82((*dest_p0).Sup.internalValue.val);
}
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__temp_u288)(void* dest_p0) {
eqdestroy___temp_u64(((tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg*) (dest_p0)));
}
static N_INLINE(void, nimFrame)(TFrame* s_p0) {
{
if (!(framePtr__system_u4020 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s_p0).calldepth = ((NI16)0);
}
goto LA1_;
LA3_: ;
{
(*s_p0).calldepth = (NI16)((*framePtr__system_u4020).calldepth + ((NI16)1));
}
LA1_: ;
(*s_p0).prev = framePtr__system_u4020;
framePtr__system_u4020 = s_p0;
{
if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_;
callDepthLimitReached__system_u4621();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__system_u4020 = (*framePtr__system_u4020).prev;
}
static N_INLINE(NI, minuspercent___system_u810)(NI x_p0, NI y_p1) {
NI result;
nimfr_("-%", "/home/runner/.choosenim/toolchains/nim-2.0.2/lib/system/arithmetics.nim");
result = ((NI) ((NU)((NU64)(((NU) (x_p0))) - (NU64)(((NU) (y_p1))))));
popFrame();
return result;
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (&nimInErrorMode__system_u4403);
return result;
}
static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicDyn)(void* p_p0) {
NIM_BOOL result;
NIM_BOOL* nimErr_;
nimfr_("nimDecRefIsLastCyclicDyn", "/home/runner/.choosenim/toolchains/nim-2.0.2/lib/system/orc.nim");
{nimErr_ = nimErrorFlag();
result = (NIM_BOOL)0;
{
tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low* cell;
NI T5_;
if (!!((p_p0 == NIM_NIL))) goto LA3_;
T5_ = (NI)0;
T5_ = minuspercent___system_u810(((NI) (ptrdiff_t) (p_p0)), ((NI)16));
cell = ((tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low*) (T5_));
{
if (!((NI)((*cell).rc & ((NI)-16)) == ((NI)0))) goto LA8_;
result = NIM_TRUE;
}
goto LA6_;
LA8_: ;
{
NI TM__SRd76hP9cMfCzdUO857UhQQ_3;
if (nimSubInt((*cell).rc, ((NI)16), &TM__SRd76hP9cMfCzdUO857UhQQ_3)) { raiseOverflow(); goto BeforeRet_;
};
(*cell).rc = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_3);
}
LA6_: ;
rememberCycle__system_u3417(result, cell, (*((TNimTypeV2**) (p_p0))));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA3_: ;
}BeforeRet_: ;
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u44)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* dest_p0) {
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLastCyclicDyn(dest_p0);
if (!T3_) goto LA4_;
nimDestroyAndDispose(dest_p0);
}
LA4_: ;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg*, newInternalRaisesFutureImpl__temp_u35)(void) {
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* result;
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* fut;
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* T1_;
nimfr_("newInternalRaisesFutureImpl", "/home/runner/work/Nim/Nim/temp.nim");
result = NIM_NIL;
fut = NIM_NIL;
T1_ = NIM_NIL;
T1_ = (tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg*) nimNewObj(sizeof(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg), NIM_ALIGNOF(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg));
(*T1_).Sup.Sup.m_type = (&NTIv2__JRDNYXKG9avPzoSh5WuleFg_);
fut = T1_;
eqdestroy___temp_u44(fut);
popFrame();
return result;
}
static N_INLINE(void, nimMarkCyclic)(void* p_p0) {
nimfr_("nimMarkCyclic", "/home/runner/.choosenim/toolchains/nim-2.0.2/lib/system/orc.nim");
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___temp_u41)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg** dest_p0) {
(*dest_p0) = 0;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ*, problematic__temp_u28)(NimStringV2 blockId_p0) {
tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* result;
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* resultFuture;
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* blitTmp;
NIM_BOOL* nimErr_;
nimfr_("problematic", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
result = NIM_NIL;
resultFuture = NIM_NIL;
resultFuture = newInternalRaisesFutureImpl__temp_u35();
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
blitTmp = resultFuture;
nimMarkCyclic(resultFuture);
eqwasMoved___temp_u41(&resultFuture);
result = &blitTmp->Sup;
eqdestroy___temp_u44(resultFuture);
goto BeforeRet_;
{
LA1_:;
}
{
eqdestroy___temp_u44(resultFuture);
}
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u238)(tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* dest_p0) {
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLastCyclicDyn(dest_p0);
if (!T3_) goto LA4_;
nimDestroyAndDispose(dest_p0);
}
LA4_: ;
}
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;
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000();
(*inner)();
#else
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_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) {
{
tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* T1_;
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
T1_ = NIM_NIL;
T1_ = problematic__temp_u28(TM__SRd76hP9cMfCzdUO857UhQQ_5);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
x__temp_u286 = T1_;
eqdestroy___temp_u238(x__temp_u286);
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
}
```
2024-02-19T12:16:39
2024-02-19T12:16:39
91.48 Kb (93,680 bytes)
```cpp
#define NIM_INTBITS 64
#include "nimbase.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_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ;
typedef struct RootObj RootObj;
typedef struct TNimTypeV2 TNimTypeV2;
typedef struct tyObject_Option__9cGajnYE9arR7Hmr1TPvw5ow tyObject_Option__9cGajnYE9arR7Hmr1TPvw5ow;
typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g tySequence__qwqHTkRvwhrRyENtudHQ7g;
typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content tySequence__qwqHTkRvwhrRyENtudHQ7g_Content;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
typedef struct tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg;
typedef struct tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low;
struct TNimTypeV2 {
void* destructor;
NI size;
NI16 align;
NI16 depth;
NU32* display;
void* traceImpl;
void* typeInfoV1;
NI flags;
};
struct RootObj {
TNimTypeV2* m_type;
};
struct tySequence__qwqHTkRvwhrRyENtudHQ7g {
NI len; tySequence__qwqHTkRvwhrRyENtudHQ7g_Content* p;
};
struct tyObject_Option__9cGajnYE9arR7Hmr1TPvw5ow {
tySequence__qwqHTkRvwhrRyENtudHQ7g val;
NIM_BOOL has;
};
struct tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ {
RootObj Sup;
tyObject_Option__9cGajnYE9arR7Hmr1TPvw5ow internalValue;
};
struct NimStrPayload {
NI cap;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
NI len;
NimStrPayload* p;
};
struct tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg {
tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ Sup;
};
struct tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low {
NI rc;
NI rootIdx;
};
struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content { NI cap; NI data[SEQ_DECL_SIZE]; };
N_LIB_PRIVATE N_NIMCALL(tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ*, problematic__temp_u28)(NimStringV2 blockId_p0);
N_LIB_PRIVATE N_NIMCALL(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg*, newInternalRaisesFutureImpl__temp_u35)(void);
N_LIB_PRIVATE N_NIMCALL(void*, nimNewObj)(NI size_p0, NI alignment_p1);
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__temp_u288)(void* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u64)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u82)(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_u44)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* dest_p0);
static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicDyn)(void* p_p0);
static N_INLINE(NI, minuspercent___system_u810)(NI x_p0, NI y_p1);
static N_INLINE(void, nimFrame)(TFrame* s_p0);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4621)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
N_LIB_PRIVATE N_NOINLINE(void, rememberCycle__system_u3417)(NIM_BOOL isDestroyAction_p0, tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low* s_p1, TNimTypeV2* desc_p2);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, nimDestroyAndDispose)(void* p_p0);
static N_INLINE(void, nimMarkCyclic)(void* p_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___temp_u41)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg** dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u238)(tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
N_LIB_PRIVATE TNimTypeV2 NTIv2__JRDNYXKG9avPzoSh5WuleFg_;
static const struct {
NI cap; NIM_CHAR data[6+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_4 = { 6 | NIM_STRLIT_FLAG, "latest" };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_5 = {6, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_4};
N_LIB_PRIVATE tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* x__temp_u286;
static NIM_CONST NU32 TM__SRd76hP9cMfCzdUO857UhQQ_2[3] = {3701606400, 3362939648, 281895168};
N_LIB_PRIVATE TNimTypeV2 NTIv2__JRDNYXKG9avPzoSh5WuleFg_ = {.destructor = (void*)rttiDestroy__temp_u288, .size = sizeof(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg), .align = (NI16) NIM_ALIGNOF(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg), .depth = 2, .display = TM__SRd76hP9cMfCzdUO857UhQQ_2, .traceImpl = (void*)NIM_NIL, .flags = 0};
extern NIM_THREADVAR TFrame* framePtr__system_u4020;
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4403;
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u82)(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, eqdestroy___temp_u64)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* dest_p0) {
eqdestroy___temp_u82((*dest_p0).Sup.internalValue.val);
}
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__temp_u288)(void* dest_p0) {
eqdestroy___temp_u64(((tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg*) (dest_p0)));
}
static N_INLINE(void, nimFrame)(TFrame* s_p0) {
{
if (!(framePtr__system_u4020 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s_p0).calldepth = ((NI16)0);
}
goto LA1_;
LA3_: ;
{
(*s_p0).calldepth = (NI16)((*framePtr__system_u4020).calldepth + ((NI16)1));
}
LA1_: ;
(*s_p0).prev = framePtr__system_u4020;
framePtr__system_u4020 = s_p0;
{
if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_;
callDepthLimitReached__system_u4621();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__system_u4020 = (*framePtr__system_u4020).prev;
}
static N_INLINE(NI, minuspercent___system_u810)(NI x_p0, NI y_p1) {
NI result;
nimfr_("-%", "/home/runner/.choosenim/toolchains/nim-2.0.2/lib/system/arithmetics.nim");
result = ((NI) ((NU)((NU64)(((NU) (x_p0))) - (NU64)(((NU) (y_p1))))));
popFrame();
return result;
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (&nimInErrorMode__system_u4403);
return result;
}
static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicDyn)(void* p_p0) {
NIM_BOOL result;
NIM_BOOL* nimErr_;
nimfr_("nimDecRefIsLastCyclicDyn", "/home/runner/.choosenim/toolchains/nim-2.0.2/lib/system/orc.nim");
{nimErr_ = nimErrorFlag();
result = (NIM_BOOL)0;
{
tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low* cell;
NI T5_;
if (!!((p_p0 == NIM_NIL))) goto LA3_;
T5_ = (NI)0;
T5_ = minuspercent___system_u810(((NI) (ptrdiff_t) (p_p0)), ((NI)16));
cell = ((tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low*) (T5_));
{
if (!((NI)((*cell).rc & ((NI)-16)) == ((NI)0))) goto LA8_;
result = NIM_TRUE;
}
goto LA6_;
LA8_: ;
{
NI TM__SRd76hP9cMfCzdUO857UhQQ_3;
if (nimSubInt((*cell).rc, ((NI)16), &TM__SRd76hP9cMfCzdUO857UhQQ_3)) { raiseOverflow(); goto BeforeRet_;
};
(*cell).rc = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_3);
}
LA6_: ;
rememberCycle__system_u3417(result, cell, (*((TNimTypeV2**) (p_p0))));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA3_: ;
}BeforeRet_: ;
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u44)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* dest_p0) {
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLastCyclicDyn(dest_p0);
if (!T3_) goto LA4_;
nimDestroyAndDispose(dest_p0);
}
LA4_: ;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg*, newInternalRaisesFutureImpl__temp_u35)(void) {
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* result;
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* fut;
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* T1_;
nimfr_("newInternalRaisesFutureImpl", "/home/runner/work/Nim/Nim/temp.nim");
result = NIM_NIL;
fut = NIM_NIL;
T1_ = NIM_NIL;
T1_ = (tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg*) nimNewObj(sizeof(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg), NIM_ALIGNOF(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg));
(*T1_).Sup.Sup.m_type = (&NTIv2__JRDNYXKG9avPzoSh5WuleFg_);
fut = T1_;
eqdestroy___temp_u44(fut);
popFrame();
return result;
}
static N_INLINE(void, nimMarkCyclic)(void* p_p0) {
nimfr_("nimMarkCyclic", "/home/runner/.choosenim/toolchains/nim-2.0.2/lib/system/orc.nim");
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___temp_u41)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg** dest_p0) {
(*dest_p0) = 0;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ*, problematic__temp_u28)(NimStringV2 blockId_p0) {
tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* result;
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* resultFuture;
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* blitTmp;
NIM_BOOL* nimErr_;
nimfr_("problematic", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
result = NIM_NIL;
resultFuture = NIM_NIL;
resultFuture = newInternalRaisesFutureImpl__temp_u35();
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
blitTmp = resultFuture;
nimMarkCyclic(resultFuture);
eqwasMoved___temp_u41(&resultFuture);
result = &blitTmp->Sup;
eqdestroy___temp_u44(resultFuture);
goto BeforeRet_;
{
LA1_:;
}
{
eqdestroy___temp_u44(resultFuture);
}
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u238)(tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* dest_p0) {
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLastCyclicDyn(dest_p0);
if (!T3_) goto LA4_;
nimDestroyAndDispose(dest_p0);
}
LA4_: ;
}
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;
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000();
(*inner)();
#else
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_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) {
{
tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* T1_;
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
T1_ = NIM_NIL;
T1_ = problematic__temp_u28(TM__SRd76hP9cMfCzdUO857UhQQ_5);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
x__temp_u286 = T1_;
eqdestroy___temp_u238(x__temp_u286);
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
}
```
2024-02-19T12:16:41
2024-02-19T12:16:41
91.48 Kb (93,680 bytes)
```cpp
#define NIM_INTBITS 64
#include "nimbase.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_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ;
typedef struct RootObj RootObj;
typedef struct TNimTypeV2 TNimTypeV2;
typedef struct tyObject_Option__9cGajnYE9arR7Hmr1TPvw5ow tyObject_Option__9cGajnYE9arR7Hmr1TPvw5ow;
typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g tySequence__qwqHTkRvwhrRyENtudHQ7g;
typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content tySequence__qwqHTkRvwhrRyENtudHQ7g_Content;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
typedef struct tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg;
typedef struct tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low;
struct TNimTypeV2 {
void* destructor;
NI size;
NI16 align;
NI16 depth;
NU32* display;
void* traceImpl;
void* typeInfoV1;
NI flags;
};
struct RootObj {
TNimTypeV2* m_type;
};
struct tySequence__qwqHTkRvwhrRyENtudHQ7g {
NI len; tySequence__qwqHTkRvwhrRyENtudHQ7g_Content* p;
};
struct tyObject_Option__9cGajnYE9arR7Hmr1TPvw5ow {
tySequence__qwqHTkRvwhrRyENtudHQ7g val;
NIM_BOOL has;
};
struct tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ {
RootObj Sup;
tyObject_Option__9cGajnYE9arR7Hmr1TPvw5ow internalValue;
};
struct NimStrPayload {
NI cap;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
NI len;
NimStrPayload* p;
};
struct tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg {
tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ Sup;
};
struct tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low {
NI rc;
NI rootIdx;
};
struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content { NI cap; NI data[SEQ_DECL_SIZE]; };
N_LIB_PRIVATE N_NIMCALL(tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ*, problematic__temp_u28)(NimStringV2 blockId_p0);
N_LIB_PRIVATE N_NIMCALL(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg*, newInternalRaisesFutureImpl__temp_u35)(void);
N_LIB_PRIVATE N_NIMCALL(void*, nimNewObj)(NI size_p0, NI alignment_p1);
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__temp_u288)(void* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u64)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u82)(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_u44)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* dest_p0);
static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicDyn)(void* p_p0);
static N_INLINE(NI, minuspercent___system_u810)(NI x_p0, NI y_p1);
static N_INLINE(void, nimFrame)(TFrame* s_p0);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4621)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
N_LIB_PRIVATE N_NOINLINE(void, rememberCycle__system_u3417)(NIM_BOOL isDestroyAction_p0, tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low* s_p1, TNimTypeV2* desc_p2);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, nimDestroyAndDispose)(void* p_p0);
static N_INLINE(void, nimMarkCyclic)(void* p_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___temp_u41)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg** dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u238)(tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
N_LIB_PRIVATE TNimTypeV2 NTIv2__JRDNYXKG9avPzoSh5WuleFg_;
static const struct {
NI cap; NIM_CHAR data[6+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_4 = { 6 | NIM_STRLIT_FLAG, "latest" };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_5 = {6, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_4};
N_LIB_PRIVATE tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* x__temp_u286;
static NIM_CONST NU32 TM__SRd76hP9cMfCzdUO857UhQQ_2[3] = {3701606400, 3362939648, 281895168};
N_LIB_PRIVATE TNimTypeV2 NTIv2__JRDNYXKG9avPzoSh5WuleFg_ = {.destructor = (void*)rttiDestroy__temp_u288, .size = sizeof(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg), .align = (NI16) NIM_ALIGNOF(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg), .depth = 2, .display = TM__SRd76hP9cMfCzdUO857UhQQ_2, .traceImpl = (void*)NIM_NIL, .flags = 0};
extern NIM_THREADVAR TFrame* framePtr__system_u4020;
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4403;
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u82)(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, eqdestroy___temp_u64)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* dest_p0) {
eqdestroy___temp_u82((*dest_p0).Sup.internalValue.val);
}
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__temp_u288)(void* dest_p0) {
eqdestroy___temp_u64(((tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg*) (dest_p0)));
}
static N_INLINE(void, nimFrame)(TFrame* s_p0) {
{
if (!(framePtr__system_u4020 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s_p0).calldepth = ((NI16)0);
}
goto LA1_;
LA3_: ;
{
(*s_p0).calldepth = (NI16)((*framePtr__system_u4020).calldepth + ((NI16)1));
}
LA1_: ;
(*s_p0).prev = framePtr__system_u4020;
framePtr__system_u4020 = s_p0;
{
if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_;
callDepthLimitReached__system_u4621();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__system_u4020 = (*framePtr__system_u4020).prev;
}
static N_INLINE(NI, minuspercent___system_u810)(NI x_p0, NI y_p1) {
NI result;
nimfr_("-%", "/home/runner/.choosenim/toolchains/nim-2.0.2/lib/system/arithmetics.nim");
result = ((NI) ((NU)((NU64)(((NU) (x_p0))) - (NU64)(((NU) (y_p1))))));
popFrame();
return result;
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (&nimInErrorMode__system_u4403);
return result;
}
static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicDyn)(void* p_p0) {
NIM_BOOL result;
NIM_BOOL* nimErr_;
nimfr_("nimDecRefIsLastCyclicDyn", "/home/runner/.choosenim/toolchains/nim-2.0.2/lib/system/orc.nim");
{nimErr_ = nimErrorFlag();
result = (NIM_BOOL)0;
{
tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low* cell;
NI T5_;
if (!!((p_p0 == NIM_NIL))) goto LA3_;
T5_ = (NI)0;
T5_ = minuspercent___system_u810(((NI) (ptrdiff_t) (p_p0)), ((NI)16));
cell = ((tyObject_RefHeader__i9cpogTuqvijClQ9bxER2Low*) (T5_));
{
if (!((NI)((*cell).rc & ((NI)-16)) == ((NI)0))) goto LA8_;
result = NIM_TRUE;
}
goto LA6_;
LA8_: ;
{
NI TM__SRd76hP9cMfCzdUO857UhQQ_3;
if (nimSubInt((*cell).rc, ((NI)16), &TM__SRd76hP9cMfCzdUO857UhQQ_3)) { raiseOverflow(); goto BeforeRet_;
};
(*cell).rc = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_3);
}
LA6_: ;
rememberCycle__system_u3417(result, cell, (*((TNimTypeV2**) (p_p0))));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA3_: ;
}BeforeRet_: ;
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u44)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* dest_p0) {
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLastCyclicDyn(dest_p0);
if (!T3_) goto LA4_;
nimDestroyAndDispose(dest_p0);
}
LA4_: ;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg*, newInternalRaisesFutureImpl__temp_u35)(void) {
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* result;
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* fut;
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* T1_;
nimfr_("newInternalRaisesFutureImpl", "/home/runner/work/Nim/Nim/temp.nim");
result = NIM_NIL;
fut = NIM_NIL;
T1_ = NIM_NIL;
T1_ = (tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg*) nimNewObj(sizeof(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg), NIM_ALIGNOF(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg));
(*T1_).Sup.Sup.m_type = (&NTIv2__JRDNYXKG9avPzoSh5WuleFg_);
fut = T1_;
eqdestroy___temp_u44(fut);
popFrame();
return result;
}
static N_INLINE(void, nimMarkCyclic)(void* p_p0) {
nimfr_("nimMarkCyclic", "/home/runner/.choosenim/toolchains/nim-2.0.2/lib/system/orc.nim");
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___temp_u41)(tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg** dest_p0) {
(*dest_p0) = 0;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ*, problematic__temp_u28)(NimStringV2 blockId_p0) {
tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* result;
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* resultFuture;
tyObject_InternalRaisesFuturecolonObjectType___JRDNYXKG9avPzoSh5WuleFg* blitTmp;
NIM_BOOL* nimErr_;
nimfr_("problematic", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
result = NIM_NIL;
resultFuture = NIM_NIL;
resultFuture = newInternalRaisesFutureImpl__temp_u35();
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
blitTmp = resultFuture;
nimMarkCyclic(resultFuture);
eqwasMoved___temp_u41(&resultFuture);
result = &blitTmp->Sup;
eqdestroy___temp_u44(resultFuture);
goto BeforeRet_;
{
LA1_:;
}
{
eqdestroy___temp_u44(resultFuture);
}
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u238)(tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* dest_p0) {
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLastCyclicDyn(dest_p0);
if (!T3_) goto LA4_;
nimDestroyAndDispose(dest_p0);
}
LA4_: ;
}
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;
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000();
(*inner)();
#else
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_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) {
{
tyObject_FuturecolonObjectType___PMhyY0zpNCA9c9amRui9aYsmQ* T1_;
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
T1_ = NIM_NIL;
T1_ = problematic__temp_u28(TM__SRd76hP9cMfCzdUO857UhQQ_5);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
x__temp_u286 = T1_;
eqdestroy___temp_u238(x__temp_u286);
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
}
```
2024-02-19T12:16:43
2024-02-19T12:16:43
2023-12-18 19:40:30 +0300
on commit #941659581 with message:
```
allow replacing captured syms in macro calls in generics (#23091)
fixes #22605, separated from #22744
This marks symbol captures in macro calls in generic contexts as
`nfOpenSym`, which means if there is a new symbol in the local
instantiatied body during instantiation time, this symbol replaces the
captured symbol. We have to be careful not to consider symbols outside
of the instantiation body during instantiation, because this will leak
symbols from the instantiation context scope rather than the original
declaration scope. This is done by checking if the local context owner
(maybe should be the symbol of the proc currently getting instantiated
instead? not sure how to get this) is the same as or a parent owner of
the owner of the replacement candidate symbol.
This solution is distinct from the symchoice mechanisms which we
originally assumed had to be related, if this assumption was wrong it
would explain why this solution took so long to arrive at.
```
The bug is in the files:
```
compiler/ast.nim
compiler/ic/ic.nim
compiler/semexprs.nim
compiler/semgnrc.nim
tests/generics/tmacroinjectedsym.nim
```
The bug can be in the commits:
(Diagnostics sometimes off-by-one).11.4.0
14.0.0
19.0
2024-02-19T12:15:57Z
1
nim c --run -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
:robot: Bug found in 10 minutes
bisecting 478
commits at 45
commits per second
Did not see this, sorry, I have an idea for fixing it (T should be left alone since it is a template generic param) but I can't exactly reason why this code is affected (which T is replacing it?)
The problem is in this proc
proc problematic(blockId: BID): Future[Option[seq[int]]] =
let resultFuture = newFuture[Option[seq[int]]]()
return resultFuture
if blockId: BID
is not generic, e.g. blockId: string
, it will be okay. But because BID is a string or uint64
, the above happen.
Description
Nim Version
Nim Compiler Version 2.1.1 [Windows: amd64] Compiled at 2024-01-23 Copyright (c) 2006-2024 by Andreas Rumpf
git hash: be0b8472130112ad570a6720a0e3a34e67936619 active boot switches: -d:release
Current Output
Expected Output
Possible Solution
No response
Additional Information
This code is part of nim-chronos, and it works fine with nim 1.6.18 and nim 2.0.3