Open yglukhov opened 1 year ago
!nim c
type View* = ref object
superview*: View
subviews*: seq[View]
proc removeSubview(v: View, s: View) =
assert(v != s)
let i = v.subviews.find(s)
if i != -1:
v.subviews.delete(i)
proc removeFromSuperview(v: View) =
if v.superview != nil:
v.superview.removeSubview(v)
v.superview = nil
proc removeAllSubviews(v: View)=
while v.subviews.len > 0:
v.subviews[0].removeFromSuperview()
proc addSubview(v: View, s: View) =
if s.superview != v:
s.removeFromSuperview()
v.subviews.add(s)
s.superview = v
proc reloadData(v: View) =
v.removeAllSubviews()
let s = View()
doAssert(s != v)
v.addSubview(s)
let v = View()
v.reloadData()
v.reloadData()
@juancarlospaco (contributor)devel :-1: FAIL
Output
Error: Command failed: nim c --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --threads:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
/home/runner/work/Nim/Nim/temp.nim temp
/home/runner/work/Nim/Nim/temp.nim reloadData
/home/runner/.choosenim/toolchains/nim-#devel/lib/std/assertions.nim failedAssertImpl
/home/runner/.choosenim/toolchains/nim-#devel/lib/std/assertions.nim raiseAssert
/home/runner/.choosenim/toolchains/nim-#devel/lib/system/fatal.nim sysFatal
Error: unhandled exception: /home/runner/work/Nim/Nim/temp.nim(29, 11) `s != v` [AssertionDefect]
Error: execution of an external program failed: '/home/runner/work/Nim/Nim/temp'
2023-07-11T13:32:17Z
2023-07-11T13:32:47
2023-07-11T13:32:47
1 minute
nim c --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --threads:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
2023-07-11T13:32:17Z
2023-07-11T13:32:48
2023-07-11T13:32:49
1 minute
nim c --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --threads:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
2023-07-11T13:32:17Z
2023-07-11T13:32:52
2023-07-11T13:32:53
1 minute
nim c --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --threads:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
2023-07-11T13:32:17Z
2023-07-11T13:32:55
2023-07-11T13:32:56
1 minute
nim c --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --threads:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
2023-07-11T13:32:17Z
2023-07-11T13:33:11
2023-07-11T13:33:11
1 minute
nim c --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --threads:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
2023-07-11T13:32:17Z
2023-07-11T13:33:24
2023-07-11T13:33:25
1 minute
nim c --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --threads:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
2023-07-11T13:32:17Z
2023-07-11T13:33:36
2023-07-11T13:33:37
1 minute
nim c --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --threads:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
ringabout introduced a bug at 2022-09-23 19:05:05 +0800
on commit #7739e2342 with message:
defaults to ORC (#19972)
* defaults to Orc
* bootstrap using refc
* use gc
* init orc defines
* unregister orc
* fix gc
* fix commands
* add prepareMutation for orc
* enable deepcopy for orc
* prepareMutation
* more fixes
* some cases
* bug #20081
* partial fixes
* partial fixes
* fixes command line
* more fixes
* build Nim with refc
* use gc
* more fixes
* rstore
* orc doesn't support threadpool
* more shallowCopy
* more fixes
* fixes unsafeNew
* workarounds
* small
* more fixes
* fixes some megatest
* tcodegenbugs1 refc
* fxies megatest
* build nimble with refc
* workaround tensordsl tests
* replace shallowCopy with move
* fixes action
* workaround
* add todo
* fixes important packages
* unpublic unregisterArcOrc
* fixes cpp
* enable windows
Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
The bug is in the files:
.github/workflows/ci_docs.yml
compiler/commands.nim
compiler/nim.nim
compiler/options.nim
koch.nim
lib/system/iterators.nim
nimsuggest/sexp.nim
testament/categories.nim
testament/important_packages.nim
tests/assign/moverload_asgn2.nim
tests/async/tasync_traceback.nim
tests/ccgbugs/t13062.nim
tests/ccgbugs/tassign_nil_strings.nim
tests/ccgbugs/tcodegenbug1.nim
tests/ccgbugs/tdeepcopy_addr_rval.nim
tests/ccgbugs/thtiobj.nim
tests/ccgbugs/tmissinginit.nim
tests/ccgbugs/tmissingvolatile.nim
tests/collections/tseq.nim
tests/concepts/t3330.nim
tests/concepts/tusertypeclasses.nim
tests/destructor/tatomicptrs.nim
tests/errmsgs/t10376.nim
tests/exception/tcpp_imported_exc.nim
tests/generics/tgeneric3.nim
tests/generics/tparam_binding.nim
tests/gensym/tgensymgeneric.nim
tests/ic/config.nims
tests/iter/tshallowcopy_closures.nim
tests/macros/tstaticparamsmacro.nim
tests/magics/t10307.nim
tests/magics/tmagics.nim
tests/manyloc/keineschweine/keineschweine.nim.cfg
tests/manyloc/keineschweine/lib/estreams.nim
tests/metatype/tmetatype_various.nim
tests/metatype/tstaticparammacro.nim
tests/metatype/tstaticvector.nim
tests/misc/taddr.nim
tests/misc/tnew.nim
tests/misc/trunner_special.nim
tests/misc/tunsignedconv.nim
tests/modules/tmodule_name_clashes.nim
tests/niminaction/Chapter3/various3.nim
tests/objects/t4318.nim
tests/objects/tobj_asgn_dont_slice.nim
tests/objects/tobjconstr.nim
tests/parallel/tconvexhull.nim
tests/parallel/tdeepcopy.nim
tests/parallel/tdeepcopy2.nim
tests/parallel/tdisjoint_slice1.nim
tests/parallel/tflowvar.nim
tests/parallel/tinvalid_array_bounds.nim
tests/parallel/tmissing_deepcopy.nim
tests/parallel/tnon_disjoint_slice1.nim
tests/parallel/tparfind.nim
tests/parallel/tpi.nim
tests/parallel/tsendtwice.nim
tests/parallel/tsysspawn.nim
tests/parallel/tuseafterdef.nim
tests/parallel/twaitany.nim
tests/parser/t12274.nim
tests/pragmas/t12640.nim
tests/pragmas/tnoreturn.nim
tests/stdlib/mgenast.nim
tests/stdlib/tgenast.nim
tests/stdlib/thttpclient_ssl.nim
tests/stdlib/tjson.nim
tests/stdlib/tmitems.nim
tests/stdlib/tstdlib_various.nim
tests/stdlib/tstring.nim
tests/stdlib/twchartoutf8.nim
tests/system/tdeepcopy.nim
tests/template/twrongmapit.nim
tests/threads/tjsthreads.nim
tests/threads/tonthreadcreation.nim
tests/typerel/t4799_1.nim
tests/typerel/t4799_2.nim
tests/typerel/t4799_3.nim
tests/typerel/ttypedesc_as_genericparam1.nim
tests/typerel/ttypedesc_as_genericparam1_orc.nim
tests/typerel/ttypedesc_as_genericparam2.nim
The bug can be in the commits:
(Diagnostics sometimes off-by-one).
13 minutes
bisecting 1580
commits at 125
commits per second. !nim c --gc:arc
type View* = ref object
superview*: View
subviews*: seq[View]
proc removeSubview(v: View, s: View) =
assert(v != s)
let i = v.subviews.find(s)
if i != -1:
v.subviews.delete(i)
proc removeFromSuperview(v: View) =
if v.superview != nil:
v.superview.removeSubview(v)
v.superview = nil
proc removeAllSubviews(v: View)=
while v.subviews.len > 0:
v.subviews[0].removeFromSuperview()
proc addSubview(v: View, s: View) =
if s.superview != v:
s.removeFromSuperview()
v.subviews.add(s)
s.superview = v
proc reloadData(v: View) =
v.removeAllSubviews()
let s = View()
doAssert(s != v)
v.addSubview(s)
let v = View()
v.reloadData()
v.reloadData()
@ringabout (member)devel :-1: FAIL
Output
Error: Command failed: nim c --gc:arc --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
command line(1, 2) Warning: `gc:option` is deprecated; use `mm:option` instead [Deprecated]
/home/runner/work/Nim/Nim/temp.nim temp
/home/runner/work/Nim/Nim/temp.nim reloadData
/home/runner/.choosenim/toolchains/nim-#devel/lib/std/assertions.nim failedAssertImpl
/home/runner/.choosenim/toolchains/nim-#devel/lib/std/assertions.nim raiseAssert
/home/runner/.choosenim/toolchains/nim-#devel/lib/system/fatal.nim sysFatal
Error: unhandled exception: /home/runner/work/Nim/Nim/temp.nim(24, 11) `s != v` [AssertionDefect]
Error: execution of an external program failed: '/home/runner/work/Nim/Nim/temp'
2023-07-13T00:32:31Z
2023-07-13T00:33:05
2023-07-13T00:33:06
1 minute
nim c --gc:arc --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
70.54 Kb
```cpp
#define NIM_INTBITS 64
#include "nimbase.h"
#undef LANGUAGE_C
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef linux
#undef mips
#undef near
#undef far
#undef powerpc
#undef unix
#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_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ;
typedef struct tySequence__tTbOXSuE9csuuMKF6h5ARuw tySequence__tTbOXSuE9csuuMKF6h5ARuw;
typedef struct tySequence__tTbOXSuE9csuuMKF6h5ARuw_Content tySequence__tTbOXSuE9csuuMKF6h5ARuw_Content;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
typedef struct tyObject_RefHeader__YmUax3FsG7Gnj3DF0PcAlw tyObject_RefHeader__YmUax3FsG7Gnj3DF0PcAlw;
struct tySequence__tTbOXSuE9csuuMKF6h5ARuw {
NI len; tySequence__tTbOXSuE9csuuMKF6h5ARuw_Content* p;
};
struct tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ {
tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* superview;
tySequence__tTbOXSuE9csuuMKF6h5ARuw subviews;
};
struct NimStrPayload {
NI cap;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
NI len;
NimStrPayload* p;
};
struct tyObject_RefHeader__YmUax3FsG7Gnj3DF0PcAlw {
NI rc;
};
struct tySequence__tTbOXSuE9csuuMKF6h5ARuw_Content { NI cap; tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* data[SEQ_DECL_SIZE]; };
N_LIB_PRIVATE N_NIMCALL(void*, nimNewObj)(NI size_p0, NI alignment_p1);
N_LIB_PRIVATE N_NIMCALL(void, reloadData__temp_u363)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* v_p0);
N_LIB_PRIVATE N_NIMCALL(void, removeAllSubviews__temp_u331)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* v_p0);
N_LIB_PRIVATE N_NIMCALL(void, removeFromSuperview__temp_u325)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* v_p0);
N_LIB_PRIVATE N_NIMCALL(void, removeSubview__temp_u5)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* v_p0, tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* s_p1);
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl__stdZassertions_u266)(NimStringV2 msg_p0);
static N_INLINE(NI, find__temp_u17)(tySequence__tTbOXSuE9csuuMKF6h5ARuw a_p0, tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* item_p1);
N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i_p0, NI n_p1);
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
static N_INLINE(void, nimFrame)(TFrame* s_p0);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u3774)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NIMCALL(void, delete__temp_u271)(tySequence__tTbOXSuE9csuuMKF6h5ARuw* x_p0, NI i_p1);
static N_INLINE(NIM_BOOL, nimDecRefIsLast)(void* p_p0);
static N_INLINE(NI, minuspercent___system_u811)(NI x_p0, NI y_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u92)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, nimRawDispose)(void* p_p0, NI alignment_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u74)(tySequence__tTbOXSuE9csuuMKF6h5ARuw dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, alignedDealloc)(void* p_p0, NI align_p1);
N_LIB_PRIVATE N_NOINLINE(void, raiseRangeErrorI)(NI64 i_p0, NI64 a_p1, NI64 b_p2);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___temp_u169)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ** dest_p0, tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* src_p1);
N_LIB_PRIVATE N_NIMCALL(void, addSubview__temp_u336)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* v_p0, tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* s_p1);
N_LIB_PRIVATE N_NIMCALL(void, add__temp_u343)(tySequence__tTbOXSuE9csuuMKF6h5ARuw* x_p0, tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* y_p1);
N_LIB_PRIVATE N_NIMCALL(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ*, eqdup___temp_u166)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* src_p0);
static N_INLINE(void, nimIncRef)(void* p_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___temp_u163)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ** dest_p0, tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* src_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u160)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* 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[50+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_2 = { 50 | NIM_STRLIT_FLAG, "/home/runner/work/Nim/Nim/temp.nim(5, 9) `v != s` " };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_3 = {50, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_2};
static const struct {
NI cap; NIM_CHAR data[147+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_6 = { 147 | NIM_STRLIT_FLAG, "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/iterators.nim(246, 11) `len(a) == L` the length of the seq changed while iterating over it" };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_7 = {147, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_6};
static const struct {
NI cap; NIM_CHAR data[52+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_9 = { 52 | NIM_STRLIT_FLAG, "/home/runner/work/Nim/Nim/temp.nim(24, 11) `s != v` " };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_10 = {52, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_9};
N_LIB_PRIVATE tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* v__temp_u375;
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u3582;
extern NIM_THREADVAR TFrame* framePtr__system_u3220;
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (NIM_BOOL*)0;
result = (&nimInErrorMode__system_u3582);
return result;
}
static N_INLINE(void, nimFrame)(TFrame* s_p0) {
{
if (!(framePtr__system_u3220 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s_p0).calldepth = ((NI16)0);
}
goto LA1_;
LA3_: ;
{
(*s_p0).calldepth = (NI16)((*framePtr__system_u3220).calldepth + ((NI16)1));
}
LA1_: ;
(*s_p0).prev = framePtr__system_u3220;
framePtr__system_u3220 = s_p0;
{
if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_;
callDepthLimitReached__system_u3774();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__system_u3220 = (*framePtr__system_u3220).prev;
}
static N_INLINE(NI, find__temp_u17)(tySequence__tTbOXSuE9csuuMKF6h5ARuw a_p0, tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* item_p1) {
NI result;
NIM_BOOL* nimErr_;
nimfr_("find", "/home/runner/.choosenim/toolchains/nim-#devel/lib/system.nim");
{nimErr_ = nimErrorFlag();
result = (NI)0;
result = ((NI)0);
{
tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ** i;
NI i_2;
NI L;
NI T2_;
i = (tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ**)0;
i_2 = ((NI)0);
T2_ = a_p0.len;
L = T2_;
{
while (1) {
NI TM__SRd76hP9cMfCzdUO857UhQQ_4;
NI TM__SRd76hP9cMfCzdUO857UhQQ_5;
if (!(i_2 < L)) goto LA4;
if (i_2 < 0 || i_2 >= a_p0.len){ raiseIndexError2(i_2,a_p0.len-1); goto BeforeRet_;
}
i = &a_p0.p->data[i_2];
{
if (!((*i) == item_p1)) goto LA7_;
goto BeforeRet_;
}
LA7_: ;
if (nimAddInt(result, ((NI)1), &TM__SRd76hP9cMfCzdUO857UhQQ_4)) { raiseOverflow(); goto BeforeRet_;
};
result = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_4);
if (nimAddInt(i_2, ((NI)1), &TM__SRd76hP9cMfCzdUO857UhQQ_5)) { raiseOverflow(); goto BeforeRet_;
};
i_2 = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_5);
{
NI T11_;
T11_ = a_p0.len;
if (!!((T11_ == L))) goto LA12_;
failedAssertImpl__stdZassertions_u266(TM__SRd76hP9cMfCzdUO857UhQQ_7);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA12_: ;
} LA4: ;
}
}
result = ((NI)-1);
}BeforeRet_: ;
popFrame();
return result;
}
static N_INLINE(NI, minuspercent___system_u811)(NI x_p0, NI y_p1) {
NI result;
nimfr_("-%", "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/arithmetics.nim");
result = (NI)0;
result = ((NI) ((NU)((NU64)(((NU) (x_p0))) - (NU64)(((NU) (y_p1))))));
popFrame();
return result;
}
static N_INLINE(NIM_BOOL, nimDecRefIsLast)(void* p_p0) {
NIM_BOOL result;
nimfr_("nimDecRefIsLast", "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/arc.nim");
{ result = (NIM_BOOL)0;
{
tyObject_RefHeader__YmUax3FsG7Gnj3DF0PcAlw* cell;
NI T5_;
if (!!((p_p0 == NIM_NIL))) goto LA3_;
T5_ = (NI)0;
T5_ = minuspercent___system_u811(((NI) (ptrdiff_t) (p_p0)), ((NI)8));
cell = ((tyObject_RefHeader__YmUax3FsG7Gnj3DF0PcAlw*) (T5_));
{
if (!((NI)((NI64)((*cell).rc) >> (NU64)(((NI)3))) == ((NI)0))) goto LA8_;
result = NIM_TRUE;
}
goto LA6_;
LA8_: ;
{
NI TM__SRd76hP9cMfCzdUO857UhQQ_8;
if (nimSubInt((*cell).rc, ((NI)8), &TM__SRd76hP9cMfCzdUO857UhQQ_8)) { raiseOverflow(); goto BeforeRet_;
};
(*cell).rc = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_8);
}
LA6_: ;
}
LA3_: ;
}BeforeRet_: ;
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u74)(tySequence__tTbOXSuE9csuuMKF6h5ARuw dest_p0) {
NI colontmp_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
colontmp_ = ((NI)0);
{
while (1) {
NI T3_;
T3_ = dest_p0.len;
if (!(colontmp_ < T3_)) goto LA2;
{
NIM_BOOL T6_;
T6_ = (NIM_BOOL)0;
T6_ = nimDecRefIsLast(dest_p0.p->data[colontmp_]);
if (!T6_) goto LA7_;
eqdestroy___temp_u92(dest_p0.p->data[colontmp_]);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose(dest_p0.p->data[colontmp_], ((NI)8));
}
LA7_: ;
colontmp_ += ((NI)1);
} LA2: ;
}
if (dest_p0.p && !(dest_p0.p->cap & NIM_STRLIT_FLAG)) {
alignedDealloc(dest_p0.p, NIM_ALIGNOF(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ*));
}
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u92)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* dest_p0) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLast((*dest_p0).superview);
if (!T3_) goto LA4_;
eqdestroy___temp_u92((*dest_p0).superview);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest_p0).superview, ((NI)8));
}
LA4_: ;
eqdestroy___temp_u74((*dest_p0).subviews);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqsink___temp_u169)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ** dest_p0, tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* src_p1) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLast((*dest_p0));
if (!T3_) goto LA4_;
eqdestroy___temp_u92((*dest_p0));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest_p0), ((NI)8));
}
LA4_: ;
(*dest_p0) = src_p1;
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___temp_u157)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ** dest_p0) {
(*dest_p0) = 0;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u160)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* dest_p0) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLast(dest_p0);
if (!T3_) goto LA4_;
eqdestroy___temp_u92(dest_p0);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose(dest_p0, ((NI)8));
}
LA4_: ;
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, removeSubview__temp_u5)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* v_p0, tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* s_p1) {
NI i;
NIM_BOOL* nimErr_;
nimfr_("removeSubview", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
if (!!(!((v_p0 == s_p1)))) goto LA3_;
failedAssertImpl__stdZassertions_u266(TM__SRd76hP9cMfCzdUO857UhQQ_3);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA3_: ;
i = find__temp_u17((*v_p0).subviews, s_p1);
{
if (!!((i == ((NI)-1)))) goto LA7_;
if ((i) < ((NI)0) || (i) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI(i, ((NI)0), ((NI)IL64(9223372036854775807))); goto BeforeRet_;
}
delete__temp_u271((&(*v_p0).subviews), ((NI) (i)));
}
LA7_: ;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, removeFromSuperview__temp_u325)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* v_p0) {
NIM_BOOL* nimErr_;
nimfr_("removeFromSuperview", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
if (!!(((*v_p0).superview == ((tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ*) NIM_NIL)))) goto LA3_;
removeSubview__temp_u5((*v_p0).superview, v_p0);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
eqsink___temp_u169(&(*v_p0).superview, ((tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ*) NIM_NIL));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA3_: ;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, removeAllSubviews__temp_u331)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* v_p0) {
NIM_BOOL* nimErr_;
nimfr_("removeAllSubviews", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
while (1) {
NI T3_;
T3_ = (*v_p0).subviews.len;
if (!(((NI)0) < T3_)) goto LA2;
if (((NI)0) < 0 || ((NI)0) >= (*v_p0).subviews.len){ raiseIndexError2(((NI)0),(*v_p0).subviews.len-1); goto BeforeRet_;
}
removeFromSuperview__temp_u325((*v_p0).subviews.p->data[((NI)0)]);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
} LA2: ;
}
}BeforeRet_: ;
popFrame();
}
static N_INLINE(void, nimIncRef)(void* p_p0) {
NI T1_;
NI TM__SRd76hP9cMfCzdUO857UhQQ_11;
nimfr_("nimIncRef", "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/arc.nim");
{ T1_ = (NI)0;
T1_ = minuspercent___system_u811(((NI) (ptrdiff_t) (p_p0)), ((NI)8));
if (nimAddInt((*((tyObject_RefHeader__YmUax3FsG7Gnj3DF0PcAlw*) (T1_))).rc, ((NI)8), &TM__SRd76hP9cMfCzdUO857UhQQ_11)) { raiseOverflow(); goto BeforeRet_;
};
(*((tyObject_RefHeader__YmUax3FsG7Gnj3DF0PcAlw*) (T1_))).rc = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_11);
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ*, eqdup___temp_u166)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* src_p0) {
tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* result;
result = NIM_NIL;
result = src_p0;
{
if (!src_p0) goto LA3_;
nimIncRef(src_p0);
}
LA3_: ;
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___temp_u163)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ** dest_p0, tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* src_p1) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
if (!src_p1) goto LA3_;
nimIncRef(src_p1);
}
LA3_: ;
{
NIM_BOOL T7_;
T7_ = (NIM_BOOL)0;
T7_ = nimDecRefIsLast((*dest_p0));
if (!T7_) goto LA8_;
eqdestroy___temp_u92((*dest_p0));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest_p0), ((NI)8));
}
LA8_: ;
(*dest_p0) = src_p1;
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, addSubview__temp_u336)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* v_p0, tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* s_p1) {
NIM_BOOL* nimErr_;
nimfr_("addSubview", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* colontmpD_;
if (!!(((*s_p1).superview == v_p0))) goto LA3_;
colontmpD_ = NIM_NIL;
removeFromSuperview__temp_u325(s_p1);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
colontmpD_ = eqdup___temp_u166(s_p1);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
add__temp_u343((&(*v_p0).subviews), colontmpD_);
eqcopy___temp_u163(&(*s_p1).superview, v_p0);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA3_: ;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, reloadData__temp_u363)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* v_p0) {
tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* s;
tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* T1_;
NIM_BOOL* nimErr_;
nimfr_("reloadData", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
s = NIM_NIL;
removeAllSubviews__temp_u331(v_p0);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
T1_ = NIM_NIL;
T1_ = (tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ*) nimNewObj(sizeof(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ), NIM_ALIGNOF(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ));
s = T1_;
{
if (!!(!((s == v_p0)))) goto LA4_;
failedAssertImpl__stdZassertions_u266(TM__SRd76hP9cMfCzdUO857UhQQ_10);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA4_: ;
addSubview__temp_u336(v_p0, s);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
eqdestroy___temp_u160(s);
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) {
{
tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* T1_;
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
T1_ = NIM_NIL;
T1_ = (tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ*) nimNewObj(sizeof(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ), NIM_ALIGNOF(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ));
v__temp_u375 = T1_;
reloadData__temp_u363(v__temp_u375);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
reloadData__temp_u363(v__temp_u375);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
eqdestroy___temp_u160(v__temp_u375);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
}
```
2023-07-13T00:32:31Z
2023-07-13T00:33:07
2023-07-13T00:33:08
1 minute
nim c --gc:arc --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
66.21 Kb
```cpp
#define NIM_INTBITS 64
#include "nimbase.h"
#undef LANGUAGE_C
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef linux
#undef mips
#undef near
#undef far
#undef powerpc
#undef unix
# 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, file) \
FR_.line = n; FR_.filename = file;
typedef struct tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ;
typedef struct tySequence__tTbOXSuE9csuuMKF6h5ARuw tySequence__tTbOXSuE9csuuMKF6h5ARuw;
typedef struct tySequence__tTbOXSuE9csuuMKF6h5ARuw_Content tySequence__tTbOXSuE9csuuMKF6h5ARuw_Content;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
typedef struct tyObject_RefHeader__t4QpgZ9cyt9bvYP65KVIlFcw tyObject_RefHeader__t4QpgZ9cyt9bvYP65KVIlFcw;
struct tySequence__tTbOXSuE9csuuMKF6h5ARuw {
NI len; tySequence__tTbOXSuE9csuuMKF6h5ARuw_Content* p;
};
struct tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ {
tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* superview;
tySequence__tTbOXSuE9csuuMKF6h5ARuw subviews;
};
struct NimStrPayload {
NI cap;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
NI len;
NimStrPayload* p;
};
struct tyObject_RefHeader__t4QpgZ9cyt9bvYP65KVIlFcw {
NI rc;
};
#ifndef tySequence__tTbOXSuE9csuuMKF6h5ARuw_Content_PP
#define tySequence__tTbOXSuE9csuuMKF6h5ARuw_Content_PP
struct tySequence__tTbOXSuE9csuuMKF6h5ARuw_Content { NI cap; tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* data[SEQ_DECL_SIZE];};
#endif
#ifndef tySequence__tTbOXSuE9csuuMKF6h5ARuw_Content_PP
#define tySequence__tTbOXSuE9csuuMKF6h5ARuw_Content_PP
struct tySequence__tTbOXSuE9csuuMKF6h5ARuw_Content { NI cap; tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* data[SEQ_DECL_SIZE];};
#endif
N_LIB_PRIVATE N_NIMCALL(void*, nimNewObj)(NI size, NI alignment);
N_LIB_PRIVATE N_NIMCALL(void, reloadData__temp_276)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* v);
N_LIB_PRIVATE N_NIMCALL(void, removeAllSubviews__temp_244)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* v);
N_LIB_PRIVATE N_NIMCALL(void, removeFromSuperview__temp_238)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* v);
N_LIB_PRIVATE N_NIMCALL(void, removeSubview__temp_5)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* v, tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* s);
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl__systemZassertions_53)(NimStringV2 msg);
static N_INLINE(NI, find__temp_17)(tySequence__tTbOXSuE9csuuMKF6h5ARuw a, tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* item);
N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i, NI n);
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
static N_INLINE(void, nimFrame)(TFrame* s);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_3661)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NIMCALL(void, delete__temp_191)(tySequence__tTbOXSuE9csuuMKF6h5ARuw* x, NI i);
static N_INLINE(NIM_BOOL, nimDecRefIsLast)(void* p);
static N_INLINE(NI, minuspercent___system_716)(NI x, NI y);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_73)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* dest);
N_LIB_PRIVATE N_NIMCALL(void, nimRawDispose)(void* p, NI alignment);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_62)(tySequence__tTbOXSuE9csuuMKF6h5ARuw* dest);
N_LIB_PRIVATE N_NIMCALL(void, alignedDealloc)(void* p, NI align);
N_LIB_PRIVATE N_NOINLINE(void, raiseRangeErrorI)(NI64 i, NI64 a, NI64 b);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___temp_131)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ** dest, tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* src);
N_LIB_PRIVATE N_NIMCALL(void, addSubview__temp_249)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* v, tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* s);
N_LIB_PRIVATE N_NIMCALL(void, add__temp_256)(tySequence__tTbOXSuE9csuuMKF6h5ARuw* x, tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* value);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___temp_128)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ** dest, tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* src);
static N_INLINE(void, nimIncRef)(void* p);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_125)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ** dest);
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot14atslibatssystemdotnim_DatInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot14atslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
static const struct {
NI cap; NIM_CHAR data[50+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_2 = { 50 | NIM_STRLIT_FLAG, "/home/runner/work/Nim/Nim/temp.nim(5, 9) `v != s` " };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_3 = {50, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_2};
static const struct {
NI cap; NIM_CHAR data[147+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_6 = { 147 | NIM_STRLIT_FLAG, "/home/runner/.choosenim/toolchains/nim-1.6.14/lib/system/iterators.nim(240, 11) `len(a) == L` the length of the seq changed while iterating over it" };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_7 = {147, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_6};
static const struct {
NI cap; NIM_CHAR data[52+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_9 = { 52 | NIM_STRLIT_FLAG, "/home/runner/work/Nim/Nim/temp.nim(24, 11) `s != v` " };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_10 = {52, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_9};
N_LIB_PRIVATE tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* v__temp_288;
extern NIM_BOOL nimInErrorMode__system_3512;
extern TFrame* framePtr__system_3187;
extern TFrame* framePtr__system_3187;
extern TFrame* framePtr__system_3187;
extern TFrame* framePtr__system_3187;
extern TFrame* framePtr__system_3187;
extern TFrame* framePtr__system_3187;
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (NIM_BOOL*)0;
result = (&nimInErrorMode__system_3512);
return result;
}
static N_INLINE(void, nimFrame)(TFrame* s) {
{
if (!(framePtr__system_3187 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s).calldepth = ((NI16) 0);
}
goto LA1_;
LA3_: ;
{
(*s).calldepth = (NI16)((*framePtr__system_3187).calldepth + ((NI16) 1));
}
LA1_: ;
(*s).prev = framePtr__system_3187;
framePtr__system_3187 = s;
{
if (!((*s).calldepth == ((NI16) 2000))) goto LA8_;
callDepthLimitReached__system_3661();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__system_3187 = (*framePtr__system_3187).prev;
}
static N_INLINE(NI, find__temp_17)(tySequence__tTbOXSuE9csuuMKF6h5ARuw a, tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* item) {
NI result;
NIM_BOOL* nimErr_;
nimfr_("find", "/home/runner/.choosenim/toolchains/nim-1.6.14/lib/system.nim");
{nimErr_ = nimErrorFlag();
result = (NI)0;
result = ((NI) 0);
{
tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ** i;
NI i_2;
NI L;
NI T2_;
i = (tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ**)0;
i_2 = ((NI) 0);
T2_ = a.len;
L = T2_;
{
while (1) {
NI TM__SRd76hP9cMfCzdUO857UhQQ_4;
NI TM__SRd76hP9cMfCzdUO857UhQQ_5;
if (!(i_2 < L)) goto LA4;
if (i_2 < 0 || i_2 >= a.len){ raiseIndexError2(i_2,a.len-1); goto BeforeRet_;
}
i = &a.p->data[i_2];
{
if (!((*i) == item)) goto LA7_;
goto BeforeRet_;
}
LA7_: ;
if (nimAddInt(result, ((NI) 1), &TM__SRd76hP9cMfCzdUO857UhQQ_4)) { raiseOverflow(); goto BeforeRet_;
};
result = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_4);
if (nimAddInt(i_2, ((NI) 1), &TM__SRd76hP9cMfCzdUO857UhQQ_5)) { raiseOverflow(); goto BeforeRet_;
};
i_2 = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_5);
{
NI T11_;
T11_ = a.len;
if (!!((T11_ == L))) goto LA12_;
failedAssertImpl__systemZassertions_53(TM__SRd76hP9cMfCzdUO857UhQQ_7);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA12_: ;
} LA4: ;
}
}
result = ((NI) -1);
}BeforeRet_: ;
popFrame();
return result;
}
static N_INLINE(NI, minuspercent___system_716)(NI x, NI y) {
NI result;
nimfr_("-%", "/home/runner/.choosenim/toolchains/nim-1.6.14/lib/system/arithmetics.nim");
result = (NI)0;
result = ((NI) ((NU)((NU64)(((NU) (x))) - (NU64)(((NU) (y))))));
popFrame();
return result;
}
static N_INLINE(NIM_BOOL, nimDecRefIsLast)(void* p) {
NIM_BOOL result;
nimfr_("nimDecRefIsLast", "/home/runner/.choosenim/toolchains/nim-1.6.14/lib/system/arc.nim");
{ result = (NIM_BOOL)0;
{
tyObject_RefHeader__t4QpgZ9cyt9bvYP65KVIlFcw* cell;
NI T5_;
if (!!((p == NIM_NIL))) goto LA3_;
T5_ = (NI)0;
T5_ = minuspercent___system_716(((NI) (ptrdiff_t) (p)), ((NI) 8));
cell = ((tyObject_RefHeader__t4QpgZ9cyt9bvYP65KVIlFcw*) (T5_));
{
if (!((NI)((*cell).rc & ((NI) -8)) == ((NI) 0))) goto LA8_;
result = NIM_TRUE;
}
goto LA6_;
LA8_: ;
{
NI TM__SRd76hP9cMfCzdUO857UhQQ_8;
if (nimSubInt((*cell).rc, ((NI) 8), &TM__SRd76hP9cMfCzdUO857UhQQ_8)) { raiseOverflow(); goto BeforeRet_;
};
(*cell).rc = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_8);
}
LA6_: ;
}
LA3_: ;
}BeforeRet_: ;
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_62)(tySequence__tTbOXSuE9csuuMKF6h5ARuw* dest) {
NI colontmp_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
colontmp_ = ((NI) 0);
{
while (1) {
NI T3_;
T3_ = (*dest).len;
if (!(colontmp_ < T3_)) goto LA2;
{
NIM_BOOL T6_;
T6_ = (NIM_BOOL)0;
T6_ = nimDecRefIsLast((*dest).p->data[colontmp_]);
if (!T6_) goto LA7_;
eqdestroy___temp_73((*dest).p->data[colontmp_]);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest).p->data[colontmp_], ((NI) 8));
}
LA7_: ;
colontmp_ += ((NI) 1);
} LA2: ;
}
if ((*dest).p && !((*dest).p->cap & NIM_STRLIT_FLAG)) {
alignedDealloc((*dest).p, NIM_ALIGNOF(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ*));
}
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_73)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* dest) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLast((*dest).superview);
if (!T3_) goto LA4_;
eqdestroy___temp_73((*dest).superview);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest).superview, ((NI) 8));
}
LA4_: ;
eqdestroy___temp_62((&(*dest).subviews));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqsink___temp_131)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ** dest, tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* src) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLast((*dest));
if (!T3_) goto LA4_;
eqdestroy___temp_73((*dest));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest), ((NI) 8));
}
LA4_: ;
(*dest) = src;
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, removeSubview__temp_5)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* v, tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* s) {
NI i;
NIM_BOOL* nimErr_;
nimfr_("removeSubview", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
if (!!(!((v == s)))) goto LA3_;
failedAssertImpl__systemZassertions_53(TM__SRd76hP9cMfCzdUO857UhQQ_3);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA3_: ;
i = find__temp_17((*v).subviews, s);
{
if (!!((i == ((NI) -1)))) goto LA7_;
if ((i) < ((NI) 0) || (i) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI(i, ((NI) 0), ((NI) IL64(9223372036854775807))); goto BeforeRet_;
}
delete__temp_191((&(*v).subviews), ((NI) (i)));
}
LA7_: ;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, removeFromSuperview__temp_238)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* v) {
NIM_BOOL* nimErr_;
nimfr_("removeFromSuperview", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
if (!!(((*v).superview == ((tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ*) NIM_NIL)))) goto LA3_;
removeSubview__temp_5((*v).superview, v);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
eqsink___temp_131(&(*v).superview, ((tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ*) NIM_NIL));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA3_: ;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, removeAllSubviews__temp_244)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* v) {
NIM_BOOL* nimErr_;
nimfr_("removeAllSubviews", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
while (1) {
NI T3_;
T3_ = (*v).subviews.len;
if (!(((NI) 0) < T3_)) goto LA2;
if (((NI) 0) < 0 || ((NI) 0) >= (*v).subviews.len){ raiseIndexError2(((NI) 0),(*v).subviews.len-1); goto BeforeRet_;
}
removeFromSuperview__temp_238((*v).subviews.p->data[((NI) 0)]);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
} LA2: ;
}
}BeforeRet_: ;
popFrame();
}
static N_INLINE(void, nimIncRef)(void* p) {
NI T1_;
NI TM__SRd76hP9cMfCzdUO857UhQQ_11;
nimfr_("nimIncRef", "/home/runner/.choosenim/toolchains/nim-1.6.14/lib/system/arc.nim");
{ T1_ = (NI)0;
T1_ = minuspercent___system_716(((NI) (ptrdiff_t) (p)), ((NI) 8));
if (nimAddInt((*((tyObject_RefHeader__t4QpgZ9cyt9bvYP65KVIlFcw*) (T1_))).rc, ((NI) 8), &TM__SRd76hP9cMfCzdUO857UhQQ_11)) { raiseOverflow(); goto BeforeRet_;
};
(*((tyObject_RefHeader__t4QpgZ9cyt9bvYP65KVIlFcw*) (T1_))).rc = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_11);
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___temp_128)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ** dest, tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* src) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
if (!src) goto LA3_;
nimIncRef(src);
}
LA3_: ;
{
NIM_BOOL T7_;
T7_ = (NIM_BOOL)0;
T7_ = nimDecRefIsLast((*dest));
if (!T7_) goto LA8_;
eqdestroy___temp_73((*dest));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest), ((NI) 8));
}
LA8_: ;
(*dest) = src;
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, addSubview__temp_249)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* v, tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* s) {
NIM_BOOL* nimErr_;
nimfr_("addSubview", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* colontmpD_;
if (!!(((*s).superview == v))) goto LA3_;
colontmpD_ = NIM_NIL;
removeFromSuperview__temp_238(s);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
colontmpD_ = 0;
eqcopy___temp_128(&colontmpD_, s);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
add__temp_256((&(*v).subviews), colontmpD_);
eqcopy___temp_128(&(*s).superview, v);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA3_: ;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_125)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ** dest) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLast((*dest));
if (!T3_) goto LA4_;
eqdestroy___temp_73((*dest));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest), ((NI) 8));
}
LA4_: ;
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, reloadData__temp_276)(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* v) {
tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* s;
tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* T1_;
NIM_BOOL* nimErr_;
nimfr_("reloadData", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
s = NIM_NIL;
removeAllSubviews__temp_244(v);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
T1_ = NIM_NIL;
T1_ = (tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ*) nimNewObj(sizeof(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ), NIM_ALIGNOF(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ));
s = T1_;
{
if (!!(!((s == v)))) goto LA4_;
failedAssertImpl__systemZassertions_53(TM__SRd76hP9cMfCzdUO857UhQQ_10);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA4_: ;
addSubview__temp_249(v, s);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
eqdestroy___temp_125(&s);
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) {
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot14atslibatssystemdotnim_DatInit000();
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot14atslibatssystemdotnim_Init000();
PreMainInner();
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
PreMain();
NimMainInner();
}
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_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ* T1_;
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
T1_ = NIM_NIL;
T1_ = (tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ*) nimNewObj(sizeof(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ), NIM_ALIGNOF(tyObject_ViewcolonObjectType___diDjAAqOq9cp9cpnoBR77efQ));
v__temp_288 = T1_;
reloadData__temp_276(v__temp_288);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
reloadData__temp_276(v__temp_288);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
eqdestroy___temp_125(&v__temp_288);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
}
```
2023-07-13T00:32:31Z
2023-07-13T00:33:11
2023-07-13T00:33:11
1 minute
nim c --gc:arc --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
70.21 Kb
```cpp
#define NIM_INTBITS 64
#include "nimbase.h"
#undef LANGUAGE_C
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef linux
#undef mips
#undef near
#undef far
#undef powerpc
#undef unix
# 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, file) \
FR_.line = n; FR_.filename = file;
typedef struct tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A;
typedef struct tySequence__6MpIxaa4SeJjuhxMHJJB7Q tySequence__6MpIxaa4SeJjuhxMHJJB7Q;
typedef struct tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
typedef struct tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A;
typedef struct tyObject_NimSeqV2__wIgJZvabBjD7x4Vn9bM86cg tyObject_NimSeqV2__wIgJZvabBjD7x4Vn9bM86cg;
typedef struct tyObject_NimSeqPayload__C6f9a4SwPYRdF8s9b3hDxpJA tyObject_NimSeqPayload__C6f9a4SwPYRdF8s9b3hDxpJA;
struct tySequence__6MpIxaa4SeJjuhxMHJJB7Q {
NI len; tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content* p;
};
struct tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A {
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* superview;
tySequence__6MpIxaa4SeJjuhxMHJJB7Q subviews;
};
struct NimStrPayload {
NI cap;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
NI len;
NimStrPayload* p;
};
struct tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A {
NI rc;
};
struct tyObject_NimSeqV2__wIgJZvabBjD7x4Vn9bM86cg {
NI len;
tyObject_NimSeqPayload__C6f9a4SwPYRdF8s9b3hDxpJA* p;
};
struct tyObject_NimSeqPayload__C6f9a4SwPYRdF8s9b3hDxpJA {
NI cap;
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* data[SEQ_DECL_SIZE];
};
#ifndef tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content_PP
#define tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content_PP
struct tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content { NI cap; tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* data[SEQ_DECL_SIZE];};
#endif
#ifndef tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content_PP
#define tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content_PP
struct tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content { NI cap; tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* data[SEQ_DECL_SIZE];};
#endif
N_LIB_PRIVATE N_NIMCALL(void*, nimNewObj)(NI size, NI alignment);
N_LIB_PRIVATE N_NIMCALL(void, reloadData_temp_276)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v);
N_LIB_PRIVATE N_NIMCALL(void, removeAllSubviews_temp_244)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v);
N_LIB_PRIVATE N_NIMCALL(void, removeFromSuperview_temp_238)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v);
N_LIB_PRIVATE N_NIMCALL(void, removeSubview_temp_5)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* s);
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl_systemZassertions_49)(NimStringV2 msg);
static N_INLINE(NI, find_temp_17)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q a, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* item);
N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i, NI n);
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
static N_INLINE(void, nimFrame)(TFrame* s);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached_system_3605)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NIMCALL(void, delete_temp_191)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q* x, NI i);
N_LIB_PRIVATE N_NIMCALL(void, eqsink__temp_131)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* src);
static N_INLINE(NIM_BOOL, nimDecRefIsLast)(void* p);
static N_INLINE(NI, minuspercent__system_716)(NI x, NI y);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy__temp_73)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* dest);
N_LIB_PRIVATE N_NIMCALL(void, nimRawDispose)(void* p, NI alignment);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy__temp_62)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q* dest);
N_LIB_PRIVATE N_NIMCALL(void, alignedDealloc)(void* p, NI align);
N_LIB_PRIVATE N_NIMCALL(void, setLen_temp_90)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q* s, NI newlen);
N_LIB_PRIVATE N_NIMCALL(void, shrink_temp_97)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q* x, NI newLen);
N_LIB_PRIVATE N_NIMCALL(void, reset_temp_117)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** obj);
N_LIB_PRIVATE N_NIMCALL(void*, prepareSeqAdd)(NI len, void* p, NI addlen, NI elemSize, NI elemAlign);
N_LIB_PRIVATE N_NOINLINE(void, raiseRangeErrorI)(NI64 i, NI64 a, NI64 b);
N_LIB_PRIVATE N_NIMCALL(void, addSubview_temp_249)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* s);
N_LIB_PRIVATE N_NIMCALL(void, add_temp_256)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q* x, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* value);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy__temp_128)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* src);
static N_INLINE(void, nimIncRef)(void* p);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy__temp_125)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest);
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
static N_INLINE(void, initStackBottomWith)(void* locals);
N_LIB_PRIVATE N_NIMCALL(void, systemDatInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, systemInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
static const struct {
NI cap; NIM_CHAR data[50+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_2 = { 50 | NIM_STRLIT_FLAG, "/home/runner/work/Nim/Nim/temp.nim(5, 9) `v != s` " };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_3 = {50, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_2};
static const struct {
NI cap; NIM_CHAR data[146+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_6 = { 146 | NIM_STRLIT_FLAG, "/home/runner/.choosenim/toolchains/nim-1.6.0/lib/system/iterators.nim(240, 11) `len(a) == L` the length of the seq changed while iterating over it" };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_7 = {146, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_6};
static const struct {
NI cap; NIM_CHAR data[52+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_12 = { 52 | NIM_STRLIT_FLAG, "/home/runner/work/Nim/Nim/temp.nim(24, 11) `s != v` " };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_13 = {52, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_12};
N_LIB_PRIVATE tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v_temp_288;
extern NIM_BOOL nimInErrorMode_system_3460;
extern TFrame* framePtr_system_3135;
extern TFrame* framePtr_system_3135;
extern TFrame* framePtr_system_3135;
extern TFrame* framePtr_system_3135;
extern TFrame* framePtr_system_3135;
extern TFrame* framePtr_system_3135;
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (NIM_BOOL*)0;
result = (&nimInErrorMode_system_3460);
return result;
}
static N_INLINE(void, nimFrame)(TFrame* s) {
{
if (!(framePtr_system_3135 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s).calldepth = ((NI16) 0);
}
goto LA1_;
LA3_: ;
{
(*s).calldepth = (NI16)((*framePtr_system_3135).calldepth + ((NI16) 1));
}
LA1_: ;
(*s).prev = framePtr_system_3135;
framePtr_system_3135 = s;
{
if (!((*s).calldepth == ((NI16) 2000))) goto LA8_;
callDepthLimitReached_system_3605();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr_system_3135 = (*framePtr_system_3135).prev;
}
static N_INLINE(NI, find_temp_17)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q a, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* item) {
NI result;
NIM_BOOL* nimErr_;
nimfr_("find", "/home/runner/.choosenim/toolchains/nim-1.6.0/lib/system.nim");
{nimErr_ = nimErrorFlag();
result = (NI)0;
result = ((NI) 0);
{
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** i;
NI i_2;
NI L;
NI T2_;
i = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A**)0;
i_2 = ((NI) 0);
T2_ = a.len;
L = T2_;
{
while (1) {
NI TM__SRd76hP9cMfCzdUO857UhQQ_4;
NI TM__SRd76hP9cMfCzdUO857UhQQ_5;
if (!(i_2 < L)) goto LA4;
if ((NU)(i_2) >= (NU)a.len){ raiseIndexError2(i_2,a.len-1); goto BeforeRet_;
}
i = &a.p->data[i_2];
{
if (!((*i) == item)) goto LA7_;
goto BeforeRet_;
}
LA7_: ;
if (nimAddInt(result, ((NI) 1), &TM__SRd76hP9cMfCzdUO857UhQQ_4)) { raiseOverflow(); goto BeforeRet_;
};
result = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_4);
if (nimAddInt(i_2, ((NI) 1), &TM__SRd76hP9cMfCzdUO857UhQQ_5)) { raiseOverflow(); goto BeforeRet_;
};
i_2 = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_5);
{
NI T11_;
T11_ = a.len;
if (!!((T11_ == L))) goto LA12_;
failedAssertImpl_systemZassertions_49(TM__SRd76hP9cMfCzdUO857UhQQ_7);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA12_: ;
} LA4: ;
}
}
result = ((NI) -1);
}BeforeRet_: ;
popFrame();
return result;
}
static N_INLINE(NI, minuspercent__system_716)(NI x, NI y) {
NI result;
nimfr_("-%", "/home/runner/.choosenim/toolchains/nim-1.6.0/lib/system/arithmetics.nim");
result = (NI)0;
result = ((NI) ((NU)((NU64)(((NU) (x))) - (NU64)(((NU) (y))))));
popFrame();
return result;
}
static N_INLINE(NIM_BOOL, nimDecRefIsLast)(void* p) {
NIM_BOOL result;
nimfr_("nimDecRefIsLast", "/home/runner/.choosenim/toolchains/nim-1.6.0/lib/system/arc.nim");
{ result = (NIM_BOOL)0;
{
tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A* cell;
NI T5_;
if (!!((p == NIM_NIL))) goto LA3_;
T5_ = (NI)0;
T5_ = minuspercent__system_716(((NI) (ptrdiff_t) (p)), ((NI) 8));
cell = ((tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A*) (T5_));
{
if (!((NI)((*cell).rc & ((NI) -8)) == ((NI) 0))) goto LA8_;
result = NIM_TRUE;
}
goto LA6_;
LA8_: ;
{
NI TM__SRd76hP9cMfCzdUO857UhQQ_8;
if (nimSubInt((*cell).rc, ((NI) 8), &TM__SRd76hP9cMfCzdUO857UhQQ_8)) { raiseOverflow(); goto BeforeRet_;
};
(*cell).rc = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_8);
}
LA6_: ;
}
LA3_: ;
}BeforeRet_: ;
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy__temp_62)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q* dest) {
NI colontmp_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
colontmp_ = ((NI) 0);
{
while (1) {
NI T3_;
T3_ = (*dest).len;
if (!(colontmp_ < T3_)) goto LA2;
{
NIM_BOOL T6_;
T6_ = (NIM_BOOL)0;
T6_ = nimDecRefIsLast((*dest).p->data[colontmp_]);
if (!T6_) goto LA7_;
eqdestroy__temp_73((*dest).p->data[colontmp_]);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest).p->data[colontmp_], ((NI) 8));
}
LA7_: ;
colontmp_ += ((NI) 1);
} LA2: ;
}
if ((*dest).p && !((*dest).p->cap & NIM_STRLIT_FLAG)) {
alignedDealloc((*dest).p, NIM_ALIGNOF(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*));
}
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy__temp_73)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* dest) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLast((*dest).superview);
if (!T3_) goto LA4_;
eqdestroy__temp_73((*dest).superview);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest).superview, ((NI) 8));
}
LA4_: ;
eqdestroy__temp_62((&(*dest).subviews));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqsink__temp_131)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* src) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLast((*dest));
if (!T3_) goto LA4_;
eqdestroy__temp_73((*dest));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest), ((NI) 8));
}
LA4_: ;
(*dest) = src;
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, reset_temp_117)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** obj) {
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* T1_;
NIM_BOOL* nimErr_;
nimfr_("reset", "/home/runner/.choosenim/toolchains/nim-1.6.0/lib/system.nim");
{nimErr_ = nimErrorFlag();
T1_ = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*)0;
eqsink__temp_131(&(*obj), T1_);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, shrink_temp_97)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q* x, NI newLen) {
{ {
NI i;
NI colontmp_;
NI colontmp__2;
NI T2_;
NI TM__SRd76hP9cMfCzdUO857UhQQ_9;
NI res;
i = (NI)0;
colontmp_ = (NI)0;
colontmp__2 = (NI)0;
T2_ = (*x).len;
if (nimSubInt(T2_, ((NI) 1), &TM__SRd76hP9cMfCzdUO857UhQQ_9)) { raiseOverflow(); goto BeforeRet_;
};
colontmp_ = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_9);
colontmp__2 = ((NI) (newLen));
res = colontmp_;
{
while (1) {
NI TM__SRd76hP9cMfCzdUO857UhQQ_10;
if (!(colontmp__2 <= res)) goto LA4;
i = res;
if ((NU)(i) >= (NU)(*x).len){ raiseIndexError2(i,(*x).len-1); goto BeforeRet_;
}
reset_temp_117(&(*x).p->data[i]);
if (nimSubInt(res, ((NI) 1), &TM__SRd76hP9cMfCzdUO857UhQQ_10)) { raiseOverflow(); goto BeforeRet_;
};
res = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_10);
} LA4: ;
}
}
(*((tyObject_NimSeqV2__wIgJZvabBjD7x4Vn9bM86cg*) (x))).len = ((NI) (newLen));
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, setLen_temp_90)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q* s, NI newlen) {
{ {
NI T3_;
T3_ = (*s).len;
if (!(((NI) (newlen)) < T3_)) goto LA4_;
shrink_temp_97(s, newlen);
}
goto LA1_;
LA4_: ;
{
NI oldLen;
NI T7_;
tyObject_NimSeqV2__wIgJZvabBjD7x4Vn9bM86cg* xu;
T7_ = (*s).len;
oldLen = T7_;
{
if (!(((NI) (newlen)) <= oldLen)) goto LA10_;
goto BeforeRet_;
}
LA10_: ;
xu = ((tyObject_NimSeqV2__wIgJZvabBjD7x4Vn9bM86cg*) (s));
{
NIM_BOOL T14_;
NI TM__SRd76hP9cMfCzdUO857UhQQ_11;
void* T18_;
T14_ = (NIM_BOOL)0;
T14_ = ((*xu).p == ((tyObject_NimSeqPayload__C6f9a4SwPYRdF8s9b3hDxpJA*) NIM_NIL));
if (T14_) goto LA15_;
T14_ = ((*(*xu).p).cap < ((NI) (newlen)));
LA15_: ;
if (!T14_) goto LA16_;
if (nimSubInt(((NI) (newlen)), oldLen, &TM__SRd76hP9cMfCzdUO857UhQQ_11)) { raiseOverflow(); goto BeforeRet_;
};
T18_ = (void*)0;
T18_ = prepareSeqAdd(oldLen, ((void*) ((*xu).p)), (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_11), ((NI) 8), ((NI) 8));
(*xu).p = ((tyObject_NimSeqPayload__C6f9a4SwPYRdF8s9b3hDxpJA*) (T18_));
}
LA16_: ;
(*xu).len = ((NI) (newlen));
}
LA1_: ;
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, delete_temp_191)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q* x, NI i) {
NI xlX60gensym7_;
NI T1_;
NIM_BOOL* nimErr_;
nimfr_("delete", "/home/runner/.choosenim/toolchains/nim-1.6.0/lib/system.nim");
{nimErr_ = nimErrorFlag();
T1_ = (*x).len;
xlX60gensym7_ = T1_;
{
NI jX60gensym7_;
NI colontmp_;
NI colontmp__2;
NI res;
jX60gensym7_ = (NI)0;
colontmp_ = (NI)0;
colontmp__2 = (NI)0;
colontmp_ = ((NI) (i));
colontmp__2 = (NI)(xlX60gensym7_ - ((NI) 2));
res = colontmp_;
{
while (1) {
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* T5_;
if (!(res <= colontmp__2)) goto LA4;
jX60gensym7_ = res;
T5_ = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*)0;
T5_ = (*x).p->data[(NI)(jX60gensym7_ + ((NI) 1))];
(*x).p->data[(NI)(jX60gensym7_ + ((NI) 1))] = 0;
eqsink__temp_131(&(*x).p->data[jX60gensym7_], T5_);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
res += ((NI) 1);
} LA4: ;
}
}
setLen_temp_90((&(*x)), ((NI) ((NI)(xlX60gensym7_ - ((NI) 1)))));
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, removeSubview_temp_5)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* s) {
NI i;
NIM_BOOL* nimErr_;
nimfr_("removeSubview", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
if (!!(!((v == s)))) goto LA3_;
failedAssertImpl_systemZassertions_49(TM__SRd76hP9cMfCzdUO857UhQQ_3);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA3_: ;
i = find_temp_17((*v).subviews, s);
{
if (!!((i == ((NI) -1)))) goto LA7_;
if ((i) < ((NI) 0) || (i) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI(i, ((NI) 0), ((NI) IL64(9223372036854775807))); goto BeforeRet_;
}
delete_temp_191((&(*v).subviews), ((NI) (i)));
}
LA7_: ;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, removeFromSuperview_temp_238)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v) {
NIM_BOOL* nimErr_;
nimfr_("removeFromSuperview", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
if (!!(((*v).superview == ((tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*) NIM_NIL)))) goto LA3_;
removeSubview_temp_5((*v).superview, v);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
eqsink__temp_131(&(*v).superview, ((tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*) NIM_NIL));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA3_: ;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, removeAllSubviews_temp_244)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v) {
NIM_BOOL* nimErr_;
nimfr_("removeAllSubviews", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
while (1) {
NI T3_;
T3_ = (*v).subviews.len;
if (!(((NI) 0) < T3_)) goto LA2;
if ((NU)(((NI) 0)) >= (NU)(*v).subviews.len){ raiseIndexError2(((NI) 0),(*v).subviews.len-1); goto BeforeRet_;
}
removeFromSuperview_temp_238((*v).subviews.p->data[((NI) 0)]);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
} LA2: ;
}
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, add_temp_256)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q* x, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* value) {
NI oldLen;
NI T1_;
tyObject_NimSeqV2__wIgJZvabBjD7x4Vn9bM86cg* xu;
NI TM__SRd76hP9cMfCzdUO857UhQQ_15;
{ T1_ = (*x).len;
oldLen = T1_;
xu = ((tyObject_NimSeqV2__wIgJZvabBjD7x4Vn9bM86cg*) (x));
{
NIM_BOOL T4_;
NI TM__SRd76hP9cMfCzdUO857UhQQ_14;
void* T8_;
T4_ = (NIM_BOOL)0;
T4_ = ((*xu).p == ((tyObject_NimSeqPayload__C6f9a4SwPYRdF8s9b3hDxpJA*) NIM_NIL));
if (T4_) goto LA5_;
if (nimAddInt(oldLen, ((NI) 1), &TM__SRd76hP9cMfCzdUO857UhQQ_14)) { raiseOverflow(); goto BeforeRet_;
};
T4_ = ((*(*xu).p).cap < (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_14));
LA5_: ;
if (!T4_) goto LA6_;
T8_ = (void*)0;
T8_ = prepareSeqAdd(oldLen, ((void*) ((*xu).p)), ((NI) 1), ((NI) 8), ((NI) 8));
(*xu).p = ((tyObject_NimSeqPayload__C6f9a4SwPYRdF8s9b3hDxpJA*) (T8_));
}
LA6_: ;
if (nimAddInt(oldLen, ((NI) 1), &TM__SRd76hP9cMfCzdUO857UhQQ_15)) { raiseOverflow(); goto BeforeRet_;
};
(*xu).len = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_15);
(*(*xu).p).data[oldLen] = value;
}BeforeRet_: ;
}
static N_INLINE(void, nimIncRef)(void* p) {
NI T1_;
NI TM__SRd76hP9cMfCzdUO857UhQQ_16;
nimfr_("nimIncRef", "/home/runner/.choosenim/toolchains/nim-1.6.0/lib/system/arc.nim");
{ T1_ = (NI)0;
T1_ = minuspercent__system_716(((NI) (ptrdiff_t) (p)), ((NI) 8));
if (nimAddInt((*((tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A*) (T1_))).rc, ((NI) 8), &TM__SRd76hP9cMfCzdUO857UhQQ_16)) { raiseOverflow(); goto BeforeRet_;
};
(*((tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A*) (T1_))).rc = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_16);
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, eqcopy__temp_128)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* src) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
if (!src) goto LA3_;
nimIncRef(src);
}
LA3_: ;
{
NIM_BOOL T7_;
T7_ = (NIM_BOOL)0;
T7_ = nimDecRefIsLast((*dest));
if (!T7_) goto LA8_;
eqdestroy__temp_73((*dest));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest), ((NI) 8));
}
LA8_: ;
(*dest) = src;
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, addSubview_temp_249)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* s) {
NIM_BOOL* nimErr_;
nimfr_("addSubview", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* colontmpD_;
if (!!(((*s).superview == v))) goto LA3_;
colontmpD_ = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*)0;
removeFromSuperview_temp_238(s);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
colontmpD_ = 0;
eqcopy__temp_128(&colontmpD_, s);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
add_temp_256((&(*v).subviews), colontmpD_);
eqcopy__temp_128(&(*s).superview, v);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA3_: ;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy__temp_125)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLast((*dest));
if (!T3_) goto LA4_;
eqdestroy__temp_73((*dest));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest), ((NI) 8));
}
LA4_: ;
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, reloadData_temp_276)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v) {
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* s;
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* T1_;
NIM_BOOL* nimErr_;
nimfr_("reloadData", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
s = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*)0;
removeAllSubviews_temp_244(v);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
T1_ = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*)0;
T1_ = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*) nimNewObj(sizeof(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A), NIM_ALIGNOF(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A));
s = T1_;
{
if (!!(!((s == v)))) goto LA4_;
failedAssertImpl_systemZassertions_49(TM__SRd76hP9cMfCzdUO857UhQQ_13);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA4_: ;
addSubview_temp_249(v, s);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
eqdestroy__temp_125(&s);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
popFrame();
}
static N_INLINE(void, initStackBottomWith)(void* locals) {
}
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) {
void (*volatile inner)(void);
inner = PreMainInner;
systemDatInit000();
systemInit000();
(*inner)();
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
initStackBottomWith((void *)&inner);
(*inner)();
}
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_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* T1_;
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
T1_ = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*)0;
T1_ = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*) nimNewObj(sizeof(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A), NIM_ALIGNOF(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A));
v_temp_288 = T1_;
reloadData_temp_276(v_temp_288);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
reloadData_temp_276(v_temp_288);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
eqdestroy__temp_125(&v_temp_288);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
}
```
2023-07-13T00:32:31Z
2023-07-13T00:33:14
2023-07-13T00:33:15
1 minute
nim c --gc:arc --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
66.21 Kb
```cpp
#define NIM_INTBITS 64
#include "nimbase.h"
#undef LANGUAGE_C
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef linux
#undef mips
#undef near
#undef far
#undef powerpc
#undef unix
# 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, file) \
FR_.line = n; FR_.filename = file;
typedef struct tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A;
typedef struct tySequence__6MpIxaa4SeJjuhxMHJJB7Q tySequence__6MpIxaa4SeJjuhxMHJJB7Q;
typedef struct tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
typedef struct tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A;
struct tySequence__6MpIxaa4SeJjuhxMHJJB7Q {
NI len; tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content* p;
};
struct tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A {
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* superview;
tySequence__6MpIxaa4SeJjuhxMHJJB7Q subviews;
};
struct NimStrPayload {
NI cap;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
NI len;
NimStrPayload* p;
};
struct tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A {
NI rc;
};
#ifndef tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content_PP
#define tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content_PP
struct tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content { NI cap; tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* data[SEQ_DECL_SIZE];};
#endif
#ifndef tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content_PP
#define tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content_PP
struct tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content { NI cap; tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* data[SEQ_DECL_SIZE];};
#endif
N_LIB_PRIVATE N_NIMCALL(void*, nimNewObj)(NI size);
N_LIB_PRIVATE N_NIMCALL(void, reloadData__PwRchBM6Y8yIh6LLkWtu7A)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v);
N_LIB_PRIVATE N_NIMCALL(void, removeAllSubviews__PwRchBM6Y8yIh6LLkWtu7A_2)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v);
N_LIB_PRIVATE N_NIMCALL(void, removeFromSuperview__PwRchBM6Y8yIh6LLkWtu7A_3)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v);
N_LIB_PRIVATE N_NIMCALL(void, removeSubview__eQzVCXvClhBpD4sHsMvS9bw)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* s);
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A)(NimStringV2 msg);
static N_INLINE(NI, find__Fvo0Y3R9awq9cz17DPL5QSjgsystem)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q a, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* item);
N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i, NI n);
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
static N_INLINE(void, nimFrame)(TFrame* s);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__mMRdr4sgmnykA9aWeM9aDZlw)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NIMCALL(void, delete__8UMvAmMOUAN07jAWMSnMcw)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q* x, NI i);
static N_INLINE(NIM_BOOL, nimDecRefIsLast)(void* p);
static N_INLINE(NI, minuspercent___dgYAo7RfdUVVpvkfKDym8w_2system)(NI x, NI y);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___6MQSevRMSKCP9cjNI59cPa2Q)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* dest);
N_LIB_PRIVATE N_NIMCALL(void, nimRawDispose)(void* p);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___9bg1lN7cA9ailXyLyMjxX36Q)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q* dest);
N_LIB_PRIVATE N_NOCONV(void, deallocShared)(void* p);
N_LIB_PRIVATE N_NOINLINE(void, raiseRangeErrorI)(NI64 i, NI64 a, NI64 b);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___8VKhgbUMSTjqqJr9aIEgwHg)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* src);
N_LIB_PRIVATE N_NIMCALL(void, addSubview__eQzVCXvClhBpD4sHsMvS9bw_2)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* s);
N_LIB_PRIVATE N_NIMCALL(void, add__kLpwKk8xV2auJ3OFHxIbkA)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q* x, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* value);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___8VKhgbUMSTjqqJr9aIEgwHg_2)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* src);
static N_INLINE(void, nimIncRef)(void* p);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___9bQg4odyPJSr6edAg8s1ldA)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest);
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
static N_INLINE(void, initStackBottomWith)(void* locals);
N_LIB_PRIVATE N_NIMCALL(void, systemDatInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, systemInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
static const struct {
NI cap; NIM_CHAR data[50+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_2 = { 50 | NIM_STRLIT_FLAG, "/home/runner/work/Nim/Nim/temp.nim(5, 9) `v != s` " };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_3 = {50, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_2};
static const struct {
NI cap; NIM_CHAR data[146+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_6 = { 146 | NIM_STRLIT_FLAG, "/home/runner/.choosenim/toolchains/nim-1.4.0/lib/system/iterato"
"rs.nim(204, 11) `len(a) == L` the length of the seq changed whil"
"e iterating over it" };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_7 = {146, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_6};
static const struct {
NI cap; NIM_CHAR data[52+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_9 = { 52 | NIM_STRLIT_FLAG, "/home/runner/work/Nim/Nim/temp.nim(24, 11) `s != v` " };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_10 = {52, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_9};
N_LIB_PRIVATE tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v__ZBo9advJ7u8QecSF0Bd4bHA;
extern NIM_BOOL nimInErrorMode__759bT87luu8XGcbkw13FUjA;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (NIM_BOOL*)0;
result = (&nimInErrorMode__759bT87luu8XGcbkw13FUjA);
return result;
}
static N_INLINE(void, nimFrame)(TFrame* s) {
{
if (!(framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw == NIM_NIL)) goto LA3_;
(*s).calldepth = ((NI16) 0);
}
goto LA1_;
LA3_: ;
{
(*s).calldepth = (NI16)((*framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw).calldepth + ((NI16) 1));
}
LA1_: ;
(*s).prev = framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw = s;
{
if (!((*s).calldepth == ((NI16) 2000))) goto LA8_;
callDepthLimitReached__mMRdr4sgmnykA9aWeM9aDZlw();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw = (*framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw).prev;
}
static N_INLINE(NI, find__Fvo0Y3R9awq9cz17DPL5QSjgsystem)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q a, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* item) {
NI result;
NIM_BOOL* nimErr_;
nimfr_("find", "/home/runner/.choosenim/toolchains/nim-1.4.0/lib/system.nim");
{nimErr_ = nimErrorFlag();
result = (NI)0;
result = ((NI) 0);
{
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** i;
NI i_2;
NI L;
NI T2_;
i = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A**)0;
i_2 = ((NI) 0);
T2_ = a.len;
L = T2_;
{
while (1) {
NI TM__SRd76hP9cMfCzdUO857UhQQ_4;
NI TM__SRd76hP9cMfCzdUO857UhQQ_5;
if (!(i_2 < L)) goto LA4;
if ((NU)(i_2) >= (NU)a.len){ raiseIndexError2(i_2,a.len-1); goto BeforeRet_;
}
i = &a.p->data[i_2];
{
if (!((*i) == item)) goto LA7_;
goto BeforeRet_;
}
LA7_: ;
if (nimAddInt(result, ((NI) 1), &TM__SRd76hP9cMfCzdUO857UhQQ_4)) { raiseOverflow(); goto BeforeRet_;
};
result = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_4);
if (nimAddInt(i_2, ((NI) 1), &TM__SRd76hP9cMfCzdUO857UhQQ_5)) { raiseOverflow(); goto BeforeRet_;
};
i_2 = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_5);
{
NI T11_;
T11_ = a.len;
if (!!((T11_ == L))) goto LA12_;
failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(TM__SRd76hP9cMfCzdUO857UhQQ_7);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA12_: ;
} LA4: ;
}
}
result = ((NI) -1);
}BeforeRet_: ;
popFrame();
return result;
}
static N_INLINE(NI, minuspercent___dgYAo7RfdUVVpvkfKDym8w_2system)(NI x, NI y) {
NI result;
nimfr_("-%", "/home/runner/.choosenim/toolchains/nim-1.4.0/lib/system/arithme"
"tics.nim");
result = (NI)0;
result = ((NI) ((NU)((NU64)(((NU) (x))) - (NU64)(((NU) (y))))));
popFrame();
return result;
}
static N_INLINE(NIM_BOOL, nimDecRefIsLast)(void* p) {
NIM_BOOL result;
nimfr_("nimDecRefIsLast", "/home/runner/.choosenim/toolchains/nim-1.4.0/lib/system/arc.nim");
{ result = (NIM_BOOL)0;
{
tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A* cell;
NI T5_;
if (!!((p == NIM_NIL))) goto LA3_;
T5_ = (NI)0;
T5_ = minuspercent___dgYAo7RfdUVVpvkfKDym8w_2system(((NI) (ptrdiff_t) (p)), ((NI) 8));
cell = ((tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A*) (T5_));
{
if (!((NI)((*cell).rc & ((NI) -8)) == ((NI) 0))) goto LA8_;
result = NIM_TRUE;
}
goto LA6_;
LA8_: ;
{
NI TM__SRd76hP9cMfCzdUO857UhQQ_8;
if (nimSubInt((*cell).rc, ((NI) 8), &TM__SRd76hP9cMfCzdUO857UhQQ_8)) { raiseOverflow(); goto BeforeRet_;
};
(*cell).rc = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_8);
}
LA6_: ;
}
LA3_: ;
}BeforeRet_: ;
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___9bg1lN7cA9ailXyLyMjxX36Q)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q* dest) {
NI colontmp_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
colontmp_ = ((NI) 0);
{
while (1) {
NI T3_;
T3_ = (*dest).len;
if (!(colontmp_ < T3_)) goto LA2;
{
NIM_BOOL T6_;
T6_ = (NIM_BOOL)0;
T6_ = nimDecRefIsLast((*dest).p->data[colontmp_]);
if (!T6_) goto LA7_;
eqdestroy___6MQSevRMSKCP9cjNI59cPa2Q((*dest).p->data[colontmp_]);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest).p->data[colontmp_]);
}
LA7_: ;
colontmp_ += ((NI) 1);
} LA2: ;
}
if ((*dest).p && !((*dest).p->cap & NIM_STRLIT_FLAG)) {
deallocShared((*dest).p);
}
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___6MQSevRMSKCP9cjNI59cPa2Q)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* dest) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLast((*dest).superview);
if (!T3_) goto LA4_;
eqdestroy___6MQSevRMSKCP9cjNI59cPa2Q((*dest).superview);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest).superview);
}
LA4_: ;
eqdestroy___9bg1lN7cA9ailXyLyMjxX36Q((&(*dest).subviews));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqsink___8VKhgbUMSTjqqJr9aIEgwHg)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* src) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLast((*dest));
if (!T3_) goto LA4_;
eqdestroy___6MQSevRMSKCP9cjNI59cPa2Q((*dest));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest));
}
LA4_: ;
(*dest) = src;
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, removeSubview__eQzVCXvClhBpD4sHsMvS9bw)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* s) {
NI i;
NIM_BOOL* nimErr_;
nimfr_("removeSubview", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
if (!!(!((v == s)))) goto LA3_;
failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(TM__SRd76hP9cMfCzdUO857UhQQ_3);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA3_: ;
i = find__Fvo0Y3R9awq9cz17DPL5QSjgsystem((*v).subviews, s);
{
if (!!((i == ((NI) -1)))) goto LA7_;
if ((i) < ((NI) 0) || (i) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI(i, ((NI) 0), ((NI) IL64(9223372036854775807))); goto BeforeRet_;
}
delete__8UMvAmMOUAN07jAWMSnMcw((&(*v).subviews), ((NI) (i)));
}
LA7_: ;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, removeFromSuperview__PwRchBM6Y8yIh6LLkWtu7A_3)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v) {
NIM_BOOL* nimErr_;
nimfr_("removeFromSuperview", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
if (!!(((*v).superview == NIM_NIL))) goto LA3_;
removeSubview__eQzVCXvClhBpD4sHsMvS9bw((*v).superview, v);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
eqsink___8VKhgbUMSTjqqJr9aIEgwHg(&(*v).superview, NIM_NIL);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA3_: ;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, removeAllSubviews__PwRchBM6Y8yIh6LLkWtu7A_2)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v) {
NIM_BOOL* nimErr_;
nimfr_("removeAllSubviews", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
while (1) {
NI T3_;
T3_ = (*v).subviews.len;
if (!(((NI) 0) < T3_)) goto LA2;
if ((NU)(((NI) 0)) >= (NU)(*v).subviews.len){ raiseIndexError2(((NI) 0),(*v).subviews.len-1); goto BeforeRet_;
}
removeFromSuperview__PwRchBM6Y8yIh6LLkWtu7A_3((*v).subviews.p->data[((NI) 0)]);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
} LA2: ;
}
}BeforeRet_: ;
popFrame();
}
static N_INLINE(void, nimIncRef)(void* p) {
NI T1_;
NI TM__SRd76hP9cMfCzdUO857UhQQ_11;
nimfr_("nimIncRef", "/home/runner/.choosenim/toolchains/nim-1.4.0/lib/system/arc.nim");
{ T1_ = (NI)0;
T1_ = minuspercent___dgYAo7RfdUVVpvkfKDym8w_2system(((NI) (ptrdiff_t) (p)), ((NI) 8));
if (nimAddInt((*((tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A*) (T1_))).rc, ((NI) 8), &TM__SRd76hP9cMfCzdUO857UhQQ_11)) { raiseOverflow(); goto BeforeRet_;
};
(*((tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A*) (T1_))).rc = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_11);
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___8VKhgbUMSTjqqJr9aIEgwHg_2)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* src) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
if (!src) goto LA3_;
nimIncRef(src);
}
LA3_: ;
{
NIM_BOOL T7_;
T7_ = (NIM_BOOL)0;
T7_ = nimDecRefIsLast((*dest));
if (!T7_) goto LA8_;
eqdestroy___6MQSevRMSKCP9cjNI59cPa2Q((*dest));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest));
}
LA8_: ;
(*dest) = src;
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, addSubview__eQzVCXvClhBpD4sHsMvS9bw_2)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* s) {
NIM_BOOL* nimErr_;
nimfr_("addSubview", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* colontmpD_;
if (!!(((*s).superview == v))) goto LA3_;
colontmpD_ = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*)0;
removeFromSuperview__PwRchBM6Y8yIh6LLkWtu7A_3(s);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
colontmpD_ = 0;
eqcopy___8VKhgbUMSTjqqJr9aIEgwHg_2(&colontmpD_, s);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
add__kLpwKk8xV2auJ3OFHxIbkA((&(*v).subviews), colontmpD_);
eqcopy___8VKhgbUMSTjqqJr9aIEgwHg_2(&(*s).superview, v);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA3_: ;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___9bQg4odyPJSr6edAg8s1ldA)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLast((*dest));
if (!T3_) goto LA4_;
eqdestroy___6MQSevRMSKCP9cjNI59cPa2Q((*dest));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest));
}
LA4_: ;
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, reloadData__PwRchBM6Y8yIh6LLkWtu7A)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v) {
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* s;
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* T1_;
NIM_BOOL* nimErr_;
nimfr_("reloadData", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
s = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*)0;
removeAllSubviews__PwRchBM6Y8yIh6LLkWtu7A_2(v);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
T1_ = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*)0;
T1_ = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*) nimNewObj(sizeof(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A));
s = T1_;
{
if (!!(!((s == v)))) goto LA4_;
failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(TM__SRd76hP9cMfCzdUO857UhQQ_10);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA4_: ;
addSubview__eQzVCXvClhBpD4sHsMvS9bw_2(v, s);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
eqdestroy___9bQg4odyPJSr6edAg8s1ldA(&s);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
popFrame();
}
static N_INLINE(void, initStackBottomWith)(void* locals) {
}
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) {
void (*volatile inner)(void);
inner = PreMainInner;
systemDatInit000();
systemInit000();
(*inner)();
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
initStackBottomWith((void *)&inner);
(*inner)();
}
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_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* T1_;
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
T1_ = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*)0;
T1_ = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*) nimNewObj(sizeof(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A));
v__ZBo9advJ7u8QecSF0Bd4bHA = T1_;
reloadData__PwRchBM6Y8yIh6LLkWtu7A(v__ZBo9advJ7u8QecSF0Bd4bHA);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
reloadData__PwRchBM6Y8yIh6LLkWtu7A(v__ZBo9advJ7u8QecSF0Bd4bHA);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
eqdestroy___9bQg4odyPJSr6edAg8s1ldA(&v__ZBo9advJ7u8QecSF0Bd4bHA);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
}
```
2023-07-13T00:32:31Z
2023-07-13T00:33:31
2023-07-13T00:33:31
now
nim c --gc:arc --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
82.76 Kb
```cpp
#define NIM_INTBITS 64
#include "nimbase.h"
#undef LANGUAGE_C
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef linux
#undef mips
#undef near
#undef far
#undef powerpc
#undef unix
# 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, file) \
FR_.line = n; FR_.filename = file;
typedef struct tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A;
typedef struct tySequence__6MpIxaa4SeJjuhxMHJJB7Q tySequence__6MpIxaa4SeJjuhxMHJJB7Q;
typedef struct tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
typedef struct tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A;
struct tySequence__6MpIxaa4SeJjuhxMHJJB7Q {
NI len; tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content* p;
};
struct tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A {
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* superview;
tySequence__6MpIxaa4SeJjuhxMHJJB7Q subviews;
};
struct NimStrPayload {
NI cap;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
NI len;
NimStrPayload* p;
};
struct tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A {
NI rc;
};
#ifndef tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content_PP
#define tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content_PP
struct tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content { NI cap; tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* data[SEQ_DECL_SIZE];};
#endif
N_LIB_PRIVATE N_NIMCALL(void*, nimNewObj)(NI size);
N_LIB_PRIVATE N_NIMCALL(void, reloadData__PwRchBM6Y8yIh6LLkWtu7A)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v);
N_LIB_PRIVATE N_NIMCALL(void, removeAllSubviews__PwRchBM6Y8yIh6LLkWtu7A_2)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v);
N_LIB_PRIVATE N_NIMCALL(void, removeFromSuperview__PwRchBM6Y8yIh6LLkWtu7A_3)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v);
N_LIB_PRIVATE N_NIMCALL(void, removeSubview__eQzVCXvClhBpD4sHsMvS9bw)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* s);
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A)(NimStringV2 msg);
static N_INLINE(NI, find__Fvo0Y3R9awq9cz17DPL5QSjgsystem)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q a, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* item);
N_LIB_PRIVATE N_NIMCALL(void, eq___8VKhgbUMSTjqqJr9aIEgwHg)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* src);
static N_INLINE(void, nimIncRef)(void* p);
static N_INLINE(NI, minuspercent___dgYAo7RfdUVVpvkfKDym8wsystem)(NI x, NI y);
static N_INLINE(void, nimFrame)(TFrame* s);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__mMRdr4sgmnykA9aWeM9aDZlw)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
static N_INLINE(NIM_BOOL, nimDecRefIsLast)(void* p);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___6MQSevRMSKCP9cjNI59cPa2Q)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* dest);
N_LIB_PRIVATE N_NIMCALL(void, nimRawDispose)(void* p);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___9bg1lN7cA9ailXyLyMjxX36Q)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q* dest);
N_LIB_PRIVATE N_NOCONV(void, deallocShared)(void* p);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i, NI n);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___9bQg4odyPJSr6edAg8s1ldA)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest);
N_LIB_PRIVATE N_NIMCALL(void, delete__8UMvAmMOUAN07jAWMSnMcw)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q* x, NI i);
N_LIB_PRIVATE N_NOINLINE(void, raiseRangeErrorI)(NI64 i, NI64 a, NI64 b);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___8VKhgbUMSTjqqJr9aIEgwHg_2)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* src);
N_LIB_PRIVATE N_NIMCALL(void, addSubview__eQzVCXvClhBpD4sHsMvS9bw_2)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* s);
N_LIB_PRIVATE N_NIMCALL(void, add__kLpwKk8xV2auJ3OFHxIbkA)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q* x, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* value);
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
static N_INLINE(void, initStackBottomWith)(void* locals);
N_LIB_PRIVATE N_NIMCALL(void, systemDatInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, systemInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
static const struct {
NI cap; NIM_CHAR data[50+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_2 = { 50 | NIM_STRLIT_FLAG, "/home/runner/work/Nim/Nim/temp.nim(5, 9) `v != s` " };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_3 = {50, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_2};
static const struct {
NI cap; NIM_CHAR data[146+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_8 = { 146 | NIM_STRLIT_FLAG, "/home/runner/.choosenim/toolchains/nim-1.2.0/lib/system/iterato"
"rs.nim(189, 11) `len(a) == L` the length of the seq changed whil"
"e iterating over it" };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_9 = {146, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_8};
static const struct {
NI cap; NIM_CHAR data[52+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_10 = { 52 | NIM_STRLIT_FLAG, "/home/runner/work/Nim/Nim/temp.nim(24, 11) `s != v` " };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_11 = {52, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_10};
N_LIB_PRIVATE tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v__ZBo9advJ7u8QecSF0Bd4bHA;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern NIM_BOOL nimInErrorMode__759bT87luu8XGcbkw13FUjA;
static N_INLINE(void, nimFrame)(TFrame* s) {
{
if (!(framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw == NIM_NIL)) goto LA3_;
(*s).calldepth = ((NI16) 0);
}
goto LA1_;
LA3_: ;
{
(*s).calldepth = (NI16)((*framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw).calldepth + ((NI16) 1));
}
LA1_: ;
(*s).prev = framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw = s;
{
if (!((*s).calldepth == ((NI16) (((NI) 2000))))) goto LA8_;
callDepthLimitReached__mMRdr4sgmnykA9aWeM9aDZlw();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw = (*framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw).prev;
}
static N_INLINE(NI, minuspercent___dgYAo7RfdUVVpvkfKDym8wsystem)(NI x, NI y) {
NI result;
nimfr_("-%", "/home/runner/.choosenim/toolchains/nim-1.2.0/lib/system/arithme"
"tics.nim");
result = (NI)0;
result = ((NI) ((NU)((NU64)(((NU) (x))) - (NU64)(((NU) (y))))));
popFrame();
return result;
}
static N_INLINE(void, nimIncRef)(void* p) {
NI T1_;
NI TM__SRd76hP9cMfCzdUO857UhQQ_4;
nimfr_("nimIncRef", "/home/runner/.choosenim/toolchains/nim-1.2.0/lib/system/refs_v2"
".nim");
{ T1_ = (NI)0;
T1_ = minuspercent___dgYAo7RfdUVVpvkfKDym8wsystem(((NI) (ptrdiff_t) (p)), ((NI) 8));
if (nimAddInt((*((tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A*) (T1_))).rc, ((NI) 8), &TM__SRd76hP9cMfCzdUO857UhQQ_4)) { raiseOverflow(); goto BeforeRet_;
};
(*((tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A*) (T1_))).rc = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_4);
}BeforeRet_: ;
popFrame();
}
static N_INLINE(NIM_BOOL, nimDecRefIsLast)(void* p) {
NIM_BOOL result;
nimfr_("nimDecRefIsLast", "/home/runner/.choosenim/toolchains/nim-1.2.0/lib/system/refs_v2"
".nim");
{ result = (NIM_BOOL)0;
{
tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A* cell;
NI T5_;
if (!!((p == NIM_NIL))) goto LA3_;
T5_ = (NI)0;
T5_ = minuspercent___dgYAo7RfdUVVpvkfKDym8wsystem(((NI) (ptrdiff_t) (p)), ((NI) 8));
cell = ((tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A*) (T5_));
{
if (!((NI)((*cell).rc & ((NI) -8)) == ((NI) 0))) goto LA8_;
result = NIM_TRUE;
}
goto LA6_;
LA8_: ;
{
NI TM__SRd76hP9cMfCzdUO857UhQQ_5;
if (nimSubInt((*cell).rc, ((NI) 8), &TM__SRd76hP9cMfCzdUO857UhQQ_5)) { raiseOverflow(); goto BeforeRet_;
};
(*cell).rc = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_5);
}
LA6_: ;
}
LA3_: ;
}BeforeRet_: ;
popFrame();
return result;
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (NIM_BOOL*)0;
result = (&nimInErrorMode__759bT87luu8XGcbkw13FUjA);
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___9bg1lN7cA9ailXyLyMjxX36Q)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q* dest) {
NI colontmp_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
colontmp_ = ((NI) 0);
{
while (1) {
NI T3_;
T3_ = (*dest).len;
if (!(colontmp_ < T3_)) goto LA2;
{
NIM_BOOL T6_;
T6_ = (NIM_BOOL)0;
T6_ = nimDecRefIsLast((*dest).p->data[colontmp_]);
if (!T6_) goto LA7_;
eqdestroy___6MQSevRMSKCP9cjNI59cPa2Q((*dest).p->data[colontmp_]);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest).p->data[colontmp_]);
(*dest).p->data[colontmp_] = NIM_NIL;
}
LA7_: ;
colontmp_ += ((NI) 1);
} LA2: ;
}
if ((*dest).p && !((*dest).p->cap & NIM_STRLIT_FLAG)) {
deallocShared((*dest).p);
(*dest).p = NIM_NIL; (*dest).len = 0; }
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___6MQSevRMSKCP9cjNI59cPa2Q)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* dest) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLast((*dest).superview);
if (!T3_) goto LA4_;
eqdestroy___6MQSevRMSKCP9cjNI59cPa2Q((*dest).superview);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest).superview);
(*dest).superview = NIM_NIL;
}
LA4_: ;
eqdestroy___9bg1lN7cA9ailXyLyMjxX36Q((&(*dest).subviews));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eq___8VKhgbUMSTjqqJr9aIEgwHg)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* src) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
if (!src) goto LA3_;
nimIncRef(src);
}
LA3_: ;
{
NIM_BOOL T7_;
T7_ = (NIM_BOOL)0;
T7_ = nimDecRefIsLast((*dest));
if (!T7_) goto LA8_;
eqdestroy___6MQSevRMSKCP9cjNI59cPa2Q((*dest));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest));
}
LA8_: ;
(*dest) = src;
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___9bQg4odyPJSr6edAg8s1ldA)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLast((*dest));
if (!T3_) goto LA4_;
eqdestroy___6MQSevRMSKCP9cjNI59cPa2Q((*dest));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest));
(*dest) = NIM_NIL;
}
LA4_: ;
}BeforeRet_: ;
}
static N_INLINE(NI, find__Fvo0Y3R9awq9cz17DPL5QSjgsystem)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q a, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* item) {
NI result;
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* i;
NIM_BOOL oldNimErrFin1_;
NIM_BOOL* nimErr_;
nimfr_("find", "/home/runner/.choosenim/toolchains/nim-1.2.0/lib/system.nim");
{nimErr_ = nimErrorFlag();
result = (NI)0;
i = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*)0;
{
NI i_2;
NI L;
NI T3_;
i_2 = ((NI) 0);
T3_ = a.len;
L = T3_;
{
while (1) {
NI TM__SRd76hP9cMfCzdUO857UhQQ_6;
NI TM__SRd76hP9cMfCzdUO857UhQQ_7;
if (!(i_2 < L)) goto LA5;
if ((NU)(i_2) >= (NU)a.len){ raiseIndexError2(i_2,a.len-1); goto LA1_;
}
eq___8VKhgbUMSTjqqJr9aIEgwHg(&i, a.p->data[i_2]);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
{
if (!(i == item)) goto LA8_;
eqdestroy___9bQg4odyPJSr6edAg8s1ldA(&i);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
goto BeforeRet_;
}
LA8_: ;
if (nimAddInt(result, ((NI) 1), &TM__SRd76hP9cMfCzdUO857UhQQ_6)) { raiseOverflow(); goto LA1_;
};
result = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_6);
if (nimAddInt(i_2, ((NI) 1), &TM__SRd76hP9cMfCzdUO857UhQQ_7)) { raiseOverflow(); goto LA1_;
};
i_2 = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_7);
{
NI T12_;
T12_ = a.len;
if (!!((T12_ == L))) goto LA13_;
failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(TM__SRd76hP9cMfCzdUO857UhQQ_9);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
}
LA13_: ;
} LA5: ;
}
}
result = ((NI) -1);
{
LA1_:;
}
{
oldNimErrFin1_ = *nimErr_; *nimErr_ = NIM_FALSE;
eqdestroy___9bQg4odyPJSr6edAg8s1ldA(&i);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
*nimErr_ = oldNimErrFin1_;
}
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqsink___8VKhgbUMSTjqqJr9aIEgwHg_2)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* src) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLast((*dest));
if (!T3_) goto LA4_;
eqdestroy___6MQSevRMSKCP9cjNI59cPa2Q((*dest));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest));
}
LA4_: ;
(*dest) = src;
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, removeSubview__eQzVCXvClhBpD4sHsMvS9bw)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* s) {
NI i;
NIM_BOOL* nimErr_;
nimfr_("removeSubview", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
if (!!(!((v == s)))) goto LA3_;
failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(TM__SRd76hP9cMfCzdUO857UhQQ_3);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA3_: ;
i = find__Fvo0Y3R9awq9cz17DPL5QSjgsystem((*v).subviews, s);
{
if (!!((i == ((NI) -1)))) goto LA7_;
if ((i) < ((NI) 0) || (i) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI(i, ((NI) 0), ((NI) IL64(9223372036854775807))); goto BeforeRet_;
}
delete__8UMvAmMOUAN07jAWMSnMcw((&(*v).subviews), ((NI) (i)));
}
LA7_: ;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, removeFromSuperview__PwRchBM6Y8yIh6LLkWtu7A_3)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v) {
NIM_BOOL* nimErr_;
nimfr_("removeFromSuperview", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
if (!!(((*v).superview == NIM_NIL))) goto LA3_;
removeSubview__eQzVCXvClhBpD4sHsMvS9bw((*v).superview, v);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
eqsink___8VKhgbUMSTjqqJr9aIEgwHg_2(&(*v).superview, NIM_NIL);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA3_: ;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, removeAllSubviews__PwRchBM6Y8yIh6LLkWtu7A_2)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v) {
NIM_BOOL* nimErr_;
nimfr_("removeAllSubviews", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
while (1) {
NI T3_;
T3_ = (*v).subviews.len;
if (!(((NI) 0) < T3_)) goto LA2;
if ((NU)(((NI) 0)) >= (NU)(*v).subviews.len){ raiseIndexError2(((NI) 0),(*v).subviews.len-1); goto BeforeRet_;
}
removeFromSuperview__PwRchBM6Y8yIh6LLkWtu7A_3((*v).subviews.p->data[((NI) 0)]);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
} LA2: ;
}
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, addSubview__eQzVCXvClhBpD4sHsMvS9bw_2)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* s) {
NIM_BOOL oldNimErrFin1_;
NIM_BOOL* nimErr_;
nimfr_("addSubview", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* blitTmp;
if (!!(((*s).superview == v))) goto LA4_;
removeFromSuperview__PwRchBM6Y8yIh6LLkWtu7A_3(s);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
blitTmp = s;
s = 0;
add__kLpwKk8xV2auJ3OFHxIbkA((&(*v).subviews), blitTmp);
eqsink___8VKhgbUMSTjqqJr9aIEgwHg_2(&(*s).superview, v);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
v = 0;
}
LA4_: ;
{
LA1_:;
}
{
oldNimErrFin1_ = *nimErr_; *nimErr_ = NIM_FALSE;
eqdestroy___9bQg4odyPJSr6edAg8s1ldA(&s);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
eqdestroy___9bQg4odyPJSr6edAg8s1ldA(&v);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
*nimErr_ = oldNimErrFin1_;
}
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, reloadData__PwRchBM6Y8yIh6LLkWtu7A)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v) {
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* s;
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* T2_;
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* blitTmp;
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* blitTmp_2;
NIM_BOOL oldNimErrFin1_;
NIM_BOOL* nimErr_;
nimfr_("reloadData", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
s = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*)0;
removeAllSubviews__PwRchBM6Y8yIh6LLkWtu7A_2(v);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
T2_ = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*)0;
T2_ = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*) nimNewObj(sizeof(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A));
s = T2_;
{
if (!!(!((s == v)))) goto LA5_;
failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(TM__SRd76hP9cMfCzdUO857UhQQ_11);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
}
LA5_: ;
blitTmp = v;
v = 0;
blitTmp_2 = s;
s = 0;
addSubview__eQzVCXvClhBpD4sHsMvS9bw_2(blitTmp, blitTmp_2);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
{
LA1_:;
}
{
oldNimErrFin1_ = *nimErr_; *nimErr_ = NIM_FALSE;
eqdestroy___9bQg4odyPJSr6edAg8s1ldA(&s);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
eqdestroy___9bQg4odyPJSr6edAg8s1ldA(&v);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
*nimErr_ = oldNimErrFin1_;
}
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
popFrame();
}
static N_INLINE(void, initStackBottomWith)(void* locals) {
}
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) {
void (*volatile inner)(void);
inner = PreMainInner;
systemDatInit000();
initStackBottomWith((void *)&inner);
systemInit000();
(*inner)();
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
initStackBottomWith((void *)&inner);
(*inner)();
}
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_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* colontmpD_;
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* colontmpD__2;
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* T1_;
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
colontmpD_ = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*)0;
colontmpD__2 = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*)0;
T1_ = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*)0;
T1_ = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*) nimNewObj(sizeof(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A));
v__ZBo9advJ7u8QecSF0Bd4bHA = T1_;
colontmpD_ = 0;
eq___8VKhgbUMSTjqqJr9aIEgwHg(&colontmpD_, v__ZBo9advJ7u8QecSF0Bd4bHA);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
reloadData__PwRchBM6Y8yIh6LLkWtu7A(colontmpD_);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
colontmpD__2 = 0;
eq___8VKhgbUMSTjqqJr9aIEgwHg(&colontmpD__2, v__ZBo9advJ7u8QecSF0Bd4bHA);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
reloadData__PwRchBM6Y8yIh6LLkWtu7A(colontmpD__2);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
eqdestroy___9bQg4odyPJSr6edAg8s1ldA(&v__ZBo9advJ7u8QecSF0Bd4bHA);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
}
```
2023-07-13T00:32:31Z
2023-07-13T00:33:45
2023-07-13T00:33:45
now
nim c --gc:arc --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
82.76 Kb
```cpp
#define NIM_INTBITS 64
#include "nimbase.h"
#undef LANGUAGE_C
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef linux
#undef mips
#undef near
#undef far
#undef powerpc
#undef unix
# 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, file) \
FR_.line = n; FR_.filename = file;
typedef struct tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A;
typedef struct tySequence__6MpIxaa4SeJjuhxMHJJB7Q tySequence__6MpIxaa4SeJjuhxMHJJB7Q;
typedef struct tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
typedef struct tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A;
struct tySequence__6MpIxaa4SeJjuhxMHJJB7Q {
NI len; tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content* p;
};
struct tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A {
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* superview;
tySequence__6MpIxaa4SeJjuhxMHJJB7Q subviews;
};
struct NimStrPayload {
NI cap;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
NI len;
NimStrPayload* p;
};
struct tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A {
NI rc;
};
#ifndef tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content_PP
#define tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content_PP
struct tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content { NI cap; tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* data[SEQ_DECL_SIZE];};
#endif
N_LIB_PRIVATE N_NIMCALL(void*, nimNewObj)(NI size);
N_LIB_PRIVATE N_NIMCALL(void, reloadData__PwRchBM6Y8yIh6LLkWtu7A)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v);
N_LIB_PRIVATE N_NIMCALL(void, removeAllSubviews__PwRchBM6Y8yIh6LLkWtu7A_2)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v);
N_LIB_PRIVATE N_NIMCALL(void, removeFromSuperview__PwRchBM6Y8yIh6LLkWtu7A_3)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v);
N_LIB_PRIVATE N_NIMCALL(void, removeSubview__eQzVCXvClhBpD4sHsMvS9bw)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* s);
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A)(NimStringV2 msg);
static N_INLINE(NI, find__Fvo0Y3R9awq9cz17DPL5QSjgsystem)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q a, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* item);
N_LIB_PRIVATE N_NIMCALL(void, eq___8VKhgbUMSTjqqJr9aIEgwHg)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* src);
static N_INLINE(void, nimIncRef)(void* p);
static N_INLINE(NI, minuspercent___dgYAo7RfdUVVpvkfKDym8wsystem)(NI x, NI y);
static N_INLINE(void, nimFrame)(TFrame* s);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__mMRdr4sgmnykA9aWeM9aDZlw)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
static N_INLINE(NIM_BOOL, nimDecRefIsLast)(void* p);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___6MQSevRMSKCP9cjNI59cPa2Q)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* dest);
N_LIB_PRIVATE N_NIMCALL(void, nimRawDispose)(void* p);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___9bg1lN7cA9ailXyLyMjxX36Q)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q* dest);
N_LIB_PRIVATE N_NOCONV(void, deallocShared)(void* p);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i, NI n);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___9bQg4odyPJSr6edAg8s1ldA)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest);
N_LIB_PRIVATE N_NIMCALL(void, delete__8UMvAmMOUAN07jAWMSnMcw)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q* x, NI i);
N_LIB_PRIVATE N_NOINLINE(void, raiseRangeErrorI)(NI64 i, NI64 a, NI64 b);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___8VKhgbUMSTjqqJr9aIEgwHg_2)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* src);
N_LIB_PRIVATE N_NIMCALL(void, addSubview__eQzVCXvClhBpD4sHsMvS9bw_2)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* s);
N_LIB_PRIVATE N_NIMCALL(void, add__kLpwKk8xV2auJ3OFHxIbkA)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q* x, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* value);
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
static N_INLINE(void, initStackBottomWith)(void* locals);
N_LIB_PRIVATE N_NIMCALL(void, systemDatInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, systemInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
static const struct {
NI cap; NIM_CHAR data[50+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_2 = { 50 | NIM_STRLIT_FLAG, "/home/runner/work/Nim/Nim/temp.nim(5, 9) `v != s` " };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_3 = {50, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_2};
static const struct {
NI cap; NIM_CHAR data[146+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_8 = { 146 | NIM_STRLIT_FLAG, "/home/runner/.choosenim/toolchains/nim-1.2.0/lib/system/iterato"
"rs.nim(189, 11) `len(a) == L` the length of the seq changed whil"
"e iterating over it" };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_9 = {146, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_8};
static const struct {
NI cap; NIM_CHAR data[52+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_10 = { 52 | NIM_STRLIT_FLAG, "/home/runner/work/Nim/Nim/temp.nim(24, 11) `s != v` " };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_11 = {52, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_10};
N_LIB_PRIVATE tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v__ZBo9advJ7u8QecSF0Bd4bHA;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern NIM_BOOL nimInErrorMode__759bT87luu8XGcbkw13FUjA;
static N_INLINE(void, nimFrame)(TFrame* s) {
{
if (!(framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw == NIM_NIL)) goto LA3_;
(*s).calldepth = ((NI16) 0);
}
goto LA1_;
LA3_: ;
{
(*s).calldepth = (NI16)((*framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw).calldepth + ((NI16) 1));
}
LA1_: ;
(*s).prev = framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw = s;
{
if (!((*s).calldepth == ((NI16) (((NI) 2000))))) goto LA8_;
callDepthLimitReached__mMRdr4sgmnykA9aWeM9aDZlw();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw = (*framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw).prev;
}
static N_INLINE(NI, minuspercent___dgYAo7RfdUVVpvkfKDym8wsystem)(NI x, NI y) {
NI result;
nimfr_("-%", "/home/runner/.choosenim/toolchains/nim-1.2.0/lib/system/arithme"
"tics.nim");
result = (NI)0;
result = ((NI) ((NU)((NU64)(((NU) (x))) - (NU64)(((NU) (y))))));
popFrame();
return result;
}
static N_INLINE(void, nimIncRef)(void* p) {
NI T1_;
NI TM__SRd76hP9cMfCzdUO857UhQQ_4;
nimfr_("nimIncRef", "/home/runner/.choosenim/toolchains/nim-1.2.0/lib/system/refs_v2"
".nim");
{ T1_ = (NI)0;
T1_ = minuspercent___dgYAo7RfdUVVpvkfKDym8wsystem(((NI) (ptrdiff_t) (p)), ((NI) 8));
if (nimAddInt((*((tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A*) (T1_))).rc, ((NI) 8), &TM__SRd76hP9cMfCzdUO857UhQQ_4)) { raiseOverflow(); goto BeforeRet_;
};
(*((tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A*) (T1_))).rc = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_4);
}BeforeRet_: ;
popFrame();
}
static N_INLINE(NIM_BOOL, nimDecRefIsLast)(void* p) {
NIM_BOOL result;
nimfr_("nimDecRefIsLast", "/home/runner/.choosenim/toolchains/nim-1.2.0/lib/system/refs_v2"
".nim");
{ result = (NIM_BOOL)0;
{
tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A* cell;
NI T5_;
if (!!((p == NIM_NIL))) goto LA3_;
T5_ = (NI)0;
T5_ = minuspercent___dgYAo7RfdUVVpvkfKDym8wsystem(((NI) (ptrdiff_t) (p)), ((NI) 8));
cell = ((tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A*) (T5_));
{
if (!((NI)((*cell).rc & ((NI) -8)) == ((NI) 0))) goto LA8_;
result = NIM_TRUE;
}
goto LA6_;
LA8_: ;
{
NI TM__SRd76hP9cMfCzdUO857UhQQ_5;
if (nimSubInt((*cell).rc, ((NI) 8), &TM__SRd76hP9cMfCzdUO857UhQQ_5)) { raiseOverflow(); goto BeforeRet_;
};
(*cell).rc = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_5);
}
LA6_: ;
}
LA3_: ;
}BeforeRet_: ;
popFrame();
return result;
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (NIM_BOOL*)0;
result = (&nimInErrorMode__759bT87luu8XGcbkw13FUjA);
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___9bg1lN7cA9ailXyLyMjxX36Q)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q* dest) {
NI colontmp_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
colontmp_ = ((NI) 0);
{
while (1) {
NI T3_;
T3_ = (*dest).len;
if (!(colontmp_ < T3_)) goto LA2;
{
NIM_BOOL T6_;
T6_ = (NIM_BOOL)0;
T6_ = nimDecRefIsLast((*dest).p->data[colontmp_]);
if (!T6_) goto LA7_;
eqdestroy___6MQSevRMSKCP9cjNI59cPa2Q((*dest).p->data[colontmp_]);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest).p->data[colontmp_]);
(*dest).p->data[colontmp_] = NIM_NIL;
}
LA7_: ;
colontmp_ += ((NI) 1);
} LA2: ;
}
if ((*dest).p && !((*dest).p->cap & NIM_STRLIT_FLAG)) {
deallocShared((*dest).p);
(*dest).p = NIM_NIL; (*dest).len = 0; }
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___6MQSevRMSKCP9cjNI59cPa2Q)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* dest) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLast((*dest).superview);
if (!T3_) goto LA4_;
eqdestroy___6MQSevRMSKCP9cjNI59cPa2Q((*dest).superview);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest).superview);
(*dest).superview = NIM_NIL;
}
LA4_: ;
eqdestroy___9bg1lN7cA9ailXyLyMjxX36Q((&(*dest).subviews));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eq___8VKhgbUMSTjqqJr9aIEgwHg)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* src) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
if (!src) goto LA3_;
nimIncRef(src);
}
LA3_: ;
{
NIM_BOOL T7_;
T7_ = (NIM_BOOL)0;
T7_ = nimDecRefIsLast((*dest));
if (!T7_) goto LA8_;
eqdestroy___6MQSevRMSKCP9cjNI59cPa2Q((*dest));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest));
}
LA8_: ;
(*dest) = src;
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___9bQg4odyPJSr6edAg8s1ldA)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLast((*dest));
if (!T3_) goto LA4_;
eqdestroy___6MQSevRMSKCP9cjNI59cPa2Q((*dest));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest));
(*dest) = NIM_NIL;
}
LA4_: ;
}BeforeRet_: ;
}
static N_INLINE(NI, find__Fvo0Y3R9awq9cz17DPL5QSjgsystem)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q a, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* item) {
NI result;
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* i;
NIM_BOOL oldNimErrFin1_;
NIM_BOOL* nimErr_;
nimfr_("find", "/home/runner/.choosenim/toolchains/nim-1.2.0/lib/system.nim");
{nimErr_ = nimErrorFlag();
result = (NI)0;
i = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*)0;
{
NI i_2;
NI L;
NI T3_;
i_2 = ((NI) 0);
T3_ = a.len;
L = T3_;
{
while (1) {
NI TM__SRd76hP9cMfCzdUO857UhQQ_6;
NI TM__SRd76hP9cMfCzdUO857UhQQ_7;
if (!(i_2 < L)) goto LA5;
if ((NU)(i_2) >= (NU)a.len){ raiseIndexError2(i_2,a.len-1); goto LA1_;
}
eq___8VKhgbUMSTjqqJr9aIEgwHg(&i, a.p->data[i_2]);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
{
if (!(i == item)) goto LA8_;
eqdestroy___9bQg4odyPJSr6edAg8s1ldA(&i);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
goto BeforeRet_;
}
LA8_: ;
if (nimAddInt(result, ((NI) 1), &TM__SRd76hP9cMfCzdUO857UhQQ_6)) { raiseOverflow(); goto LA1_;
};
result = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_6);
if (nimAddInt(i_2, ((NI) 1), &TM__SRd76hP9cMfCzdUO857UhQQ_7)) { raiseOverflow(); goto LA1_;
};
i_2 = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_7);
{
NI T12_;
T12_ = a.len;
if (!!((T12_ == L))) goto LA13_;
failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(TM__SRd76hP9cMfCzdUO857UhQQ_9);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
}
LA13_: ;
} LA5: ;
}
}
result = ((NI) -1);
{
LA1_:;
}
{
oldNimErrFin1_ = *nimErr_; *nimErr_ = NIM_FALSE;
eqdestroy___9bQg4odyPJSr6edAg8s1ldA(&i);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
*nimErr_ = oldNimErrFin1_;
}
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqsink___8VKhgbUMSTjqqJr9aIEgwHg_2)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* src) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLast((*dest));
if (!T3_) goto LA4_;
eqdestroy___6MQSevRMSKCP9cjNI59cPa2Q((*dest));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest));
}
LA4_: ;
(*dest) = src;
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, removeSubview__eQzVCXvClhBpD4sHsMvS9bw)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* s) {
NI i;
NIM_BOOL* nimErr_;
nimfr_("removeSubview", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
if (!!(!((v == s)))) goto LA3_;
failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(TM__SRd76hP9cMfCzdUO857UhQQ_3);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA3_: ;
i = find__Fvo0Y3R9awq9cz17DPL5QSjgsystem((*v).subviews, s);
{
if (!!((i == ((NI) -1)))) goto LA7_;
if ((i) < ((NI) 0) || (i) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI(i, ((NI) 0), ((NI) IL64(9223372036854775807))); goto BeforeRet_;
}
delete__8UMvAmMOUAN07jAWMSnMcw((&(*v).subviews), ((NI) (i)));
}
LA7_: ;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, removeFromSuperview__PwRchBM6Y8yIh6LLkWtu7A_3)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v) {
NIM_BOOL* nimErr_;
nimfr_("removeFromSuperview", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
if (!!(((*v).superview == NIM_NIL))) goto LA3_;
removeSubview__eQzVCXvClhBpD4sHsMvS9bw((*v).superview, v);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
eqsink___8VKhgbUMSTjqqJr9aIEgwHg_2(&(*v).superview, NIM_NIL);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA3_: ;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, removeAllSubviews__PwRchBM6Y8yIh6LLkWtu7A_2)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v) {
NIM_BOOL* nimErr_;
nimfr_("removeAllSubviews", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
while (1) {
NI T3_;
T3_ = (*v).subviews.len;
if (!(((NI) 0) < T3_)) goto LA2;
if ((NU)(((NI) 0)) >= (NU)(*v).subviews.len){ raiseIndexError2(((NI) 0),(*v).subviews.len-1); goto BeforeRet_;
}
removeFromSuperview__PwRchBM6Y8yIh6LLkWtu7A_3((*v).subviews.p->data[((NI) 0)]);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
} LA2: ;
}
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, addSubview__eQzVCXvClhBpD4sHsMvS9bw_2)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* s) {
NIM_BOOL oldNimErrFin1_;
NIM_BOOL* nimErr_;
nimfr_("addSubview", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* blitTmp;
if (!!(((*s).superview == v))) goto LA4_;
removeFromSuperview__PwRchBM6Y8yIh6LLkWtu7A_3(s);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
blitTmp = s;
s = 0;
add__kLpwKk8xV2auJ3OFHxIbkA((&(*v).subviews), blitTmp);
eqsink___8VKhgbUMSTjqqJr9aIEgwHg_2(&(*s).superview, v);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
v = 0;
}
LA4_: ;
{
LA1_:;
}
{
oldNimErrFin1_ = *nimErr_; *nimErr_ = NIM_FALSE;
eqdestroy___9bQg4odyPJSr6edAg8s1ldA(&s);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
eqdestroy___9bQg4odyPJSr6edAg8s1ldA(&v);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
*nimErr_ = oldNimErrFin1_;
}
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, reloadData__PwRchBM6Y8yIh6LLkWtu7A)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v) {
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* s;
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* T2_;
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* blitTmp;
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* blitTmp_2;
NIM_BOOL oldNimErrFin1_;
NIM_BOOL* nimErr_;
nimfr_("reloadData", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
s = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*)0;
removeAllSubviews__PwRchBM6Y8yIh6LLkWtu7A_2(v);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
T2_ = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*)0;
T2_ = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*) nimNewObj(sizeof(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A));
s = T2_;
{
if (!!(!((s == v)))) goto LA5_;
failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(TM__SRd76hP9cMfCzdUO857UhQQ_11);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
}
LA5_: ;
blitTmp = v;
v = 0;
blitTmp_2 = s;
s = 0;
addSubview__eQzVCXvClhBpD4sHsMvS9bw_2(blitTmp, blitTmp_2);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
{
LA1_:;
}
{
oldNimErrFin1_ = *nimErr_; *nimErr_ = NIM_FALSE;
eqdestroy___9bQg4odyPJSr6edAg8s1ldA(&s);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
eqdestroy___9bQg4odyPJSr6edAg8s1ldA(&v);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
*nimErr_ = oldNimErrFin1_;
}
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
popFrame();
}
static N_INLINE(void, initStackBottomWith)(void* locals) {
}
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) {
void (*volatile inner)(void);
inner = PreMainInner;
systemDatInit000();
initStackBottomWith((void *)&inner);
systemInit000();
(*inner)();
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
initStackBottomWith((void *)&inner);
(*inner)();
}
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_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* colontmpD_;
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* colontmpD__2;
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* T1_;
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
colontmpD_ = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*)0;
colontmpD__2 = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*)0;
T1_ = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*)0;
T1_ = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*) nimNewObj(sizeof(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A));
v__ZBo9advJ7u8QecSF0Bd4bHA = T1_;
colontmpD_ = 0;
eq___8VKhgbUMSTjqqJr9aIEgwHg(&colontmpD_, v__ZBo9advJ7u8QecSF0Bd4bHA);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
reloadData__PwRchBM6Y8yIh6LLkWtu7A(colontmpD_);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
colontmpD__2 = 0;
eq___8VKhgbUMSTjqqJr9aIEgwHg(&colontmpD__2, v__ZBo9advJ7u8QecSF0Bd4bHA);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
reloadData__PwRchBM6Y8yIh6LLkWtu7A(colontmpD__2);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
eqdestroy___9bQg4odyPJSr6edAg8s1ldA(&v__ZBo9advJ7u8QecSF0Bd4bHA);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
}
```
2023-07-13T00:32:31Z
2023-07-13T00:33:56
2023-07-13T00:33:56
now
nim c --gc:arc --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
82.76 Kb
```cpp
#define NIM_INTBITS 64
#include "nimbase.h"
#undef LANGUAGE_C
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef linux
#undef mips
#undef near
#undef far
#undef powerpc
#undef unix
# 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, file) \
FR_.line = n; FR_.filename = file;
typedef struct tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A;
typedef struct tySequence__6MpIxaa4SeJjuhxMHJJB7Q tySequence__6MpIxaa4SeJjuhxMHJJB7Q;
typedef struct tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
typedef struct tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A;
struct tySequence__6MpIxaa4SeJjuhxMHJJB7Q {
NI len; tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content* p;
};
struct tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A {
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* superview;
tySequence__6MpIxaa4SeJjuhxMHJJB7Q subviews;
};
struct NimStrPayload {
NI cap;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
NI len;
NimStrPayload* p;
};
struct tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A {
NI rc;
};
#ifndef tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content_PP
#define tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content_PP
struct tySequence__6MpIxaa4SeJjuhxMHJJB7Q_Content { NI cap; tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* data[SEQ_DECL_SIZE];};
#endif
N_LIB_PRIVATE N_NIMCALL(void*, nimNewObj)(NI size);
N_LIB_PRIVATE N_NIMCALL(void, reloadData__PwRchBM6Y8yIh6LLkWtu7A)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v);
N_LIB_PRIVATE N_NIMCALL(void, removeAllSubviews__PwRchBM6Y8yIh6LLkWtu7A_2)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v);
N_LIB_PRIVATE N_NIMCALL(void, removeFromSuperview__PwRchBM6Y8yIh6LLkWtu7A_3)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v);
N_LIB_PRIVATE N_NIMCALL(void, removeSubview__eQzVCXvClhBpD4sHsMvS9bw)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* s);
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A)(NimStringV2 msg);
static N_INLINE(NI, find__Fvo0Y3R9awq9cz17DPL5QSjgsystem)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q a, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* item);
N_LIB_PRIVATE N_NIMCALL(void, eq___8VKhgbUMSTjqqJr9aIEgwHg)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* src);
static N_INLINE(void, nimIncRef)(void* p);
static N_INLINE(NI, minuspercent___dgYAo7RfdUVVpvkfKDym8wsystem)(NI x, NI y);
static N_INLINE(void, nimFrame)(TFrame* s);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__mMRdr4sgmnykA9aWeM9aDZlw)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
static N_INLINE(NIM_BOOL, nimDecRefIsLast)(void* p);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___6MQSevRMSKCP9cjNI59cPa2Q)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* dest);
N_LIB_PRIVATE N_NIMCALL(void, nimRawDispose)(void* p);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___9bg1lN7cA9ailXyLyMjxX36Q)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q* dest);
N_LIB_PRIVATE N_NOCONV(void, deallocShared)(void* p);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i, NI n);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___9bQg4odyPJSr6edAg8s1ldA)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest);
N_LIB_PRIVATE N_NIMCALL(void, delete__8UMvAmMOUAN07jAWMSnMcw)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q* x, NI i);
N_LIB_PRIVATE N_NOINLINE(void, raiseRangeErrorI)(NI64 i, NI64 a, NI64 b);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___8VKhgbUMSTjqqJr9aIEgwHg_2)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* src);
N_LIB_PRIVATE N_NIMCALL(void, addSubview__eQzVCXvClhBpD4sHsMvS9bw_2)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* s);
N_LIB_PRIVATE N_NIMCALL(void, add__kLpwKk8xV2auJ3OFHxIbkA)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q* x, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* value);
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
static N_INLINE(void, initStackBottomWith)(void* locals);
N_LIB_PRIVATE N_NIMCALL(void, systemDatInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, systemInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
static const struct {
NI cap; NIM_CHAR data[50+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_2 = { 50 | NIM_STRLIT_FLAG, "/home/runner/work/Nim/Nim/temp.nim(5, 9) `v != s` " };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_3 = {50, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_2};
static const struct {
NI cap; NIM_CHAR data[146+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_8 = { 146 | NIM_STRLIT_FLAG, "/home/runner/.choosenim/toolchains/nim-1.2.0/lib/system/iterato"
"rs.nim(189, 11) `len(a) == L` the length of the seq changed whil"
"e iterating over it" };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_9 = {146, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_8};
static const struct {
NI cap; NIM_CHAR data[52+1];
} TM__SRd76hP9cMfCzdUO857UhQQ_10 = { 52 | NIM_STRLIT_FLAG, "/home/runner/work/Nim/Nim/temp.nim(24, 11) `s != v` " };
static const NimStringV2 TM__SRd76hP9cMfCzdUO857UhQQ_11 = {52, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_10};
N_LIB_PRIVATE tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v__ZBo9advJ7u8QecSF0Bd4bHA;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern NIM_BOOL nimInErrorMode__759bT87luu8XGcbkw13FUjA;
static N_INLINE(void, nimFrame)(TFrame* s) {
{
if (!(framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw == NIM_NIL)) goto LA3_;
(*s).calldepth = ((NI16) 0);
}
goto LA1_;
LA3_: ;
{
(*s).calldepth = (NI16)((*framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw).calldepth + ((NI16) 1));
}
LA1_: ;
(*s).prev = framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw = s;
{
if (!((*s).calldepth == ((NI16) (((NI) 2000))))) goto LA8_;
callDepthLimitReached__mMRdr4sgmnykA9aWeM9aDZlw();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw = (*framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw).prev;
}
static N_INLINE(NI, minuspercent___dgYAo7RfdUVVpvkfKDym8wsystem)(NI x, NI y) {
NI result;
nimfr_("-%", "/home/runner/.choosenim/toolchains/nim-1.2.0/lib/system/arithme"
"tics.nim");
result = (NI)0;
result = ((NI) ((NU)((NU64)(((NU) (x))) - (NU64)(((NU) (y))))));
popFrame();
return result;
}
static N_INLINE(void, nimIncRef)(void* p) {
NI T1_;
NI TM__SRd76hP9cMfCzdUO857UhQQ_4;
nimfr_("nimIncRef", "/home/runner/.choosenim/toolchains/nim-1.2.0/lib/system/refs_v2"
".nim");
{ T1_ = (NI)0;
T1_ = minuspercent___dgYAo7RfdUVVpvkfKDym8wsystem(((NI) (ptrdiff_t) (p)), ((NI) 8));
if (nimAddInt((*((tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A*) (T1_))).rc, ((NI) 8), &TM__SRd76hP9cMfCzdUO857UhQQ_4)) { raiseOverflow(); goto BeforeRet_;
};
(*((tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A*) (T1_))).rc = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_4);
}BeforeRet_: ;
popFrame();
}
static N_INLINE(NIM_BOOL, nimDecRefIsLast)(void* p) {
NIM_BOOL result;
nimfr_("nimDecRefIsLast", "/home/runner/.choosenim/toolchains/nim-1.2.0/lib/system/refs_v2"
".nim");
{ result = (NIM_BOOL)0;
{
tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A* cell;
NI T5_;
if (!!((p == NIM_NIL))) goto LA3_;
T5_ = (NI)0;
T5_ = minuspercent___dgYAo7RfdUVVpvkfKDym8wsystem(((NI) (ptrdiff_t) (p)), ((NI) 8));
cell = ((tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A*) (T5_));
{
if (!((NI)((*cell).rc & ((NI) -8)) == ((NI) 0))) goto LA8_;
result = NIM_TRUE;
}
goto LA6_;
LA8_: ;
{
NI TM__SRd76hP9cMfCzdUO857UhQQ_5;
if (nimSubInt((*cell).rc, ((NI) 8), &TM__SRd76hP9cMfCzdUO857UhQQ_5)) { raiseOverflow(); goto BeforeRet_;
};
(*cell).rc = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_5);
}
LA6_: ;
}
LA3_: ;
}BeforeRet_: ;
popFrame();
return result;
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (NIM_BOOL*)0;
result = (&nimInErrorMode__759bT87luu8XGcbkw13FUjA);
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___9bg1lN7cA9ailXyLyMjxX36Q)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q* dest) {
NI colontmp_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
colontmp_ = ((NI) 0);
{
while (1) {
NI T3_;
T3_ = (*dest).len;
if (!(colontmp_ < T3_)) goto LA2;
{
NIM_BOOL T6_;
T6_ = (NIM_BOOL)0;
T6_ = nimDecRefIsLast((*dest).p->data[colontmp_]);
if (!T6_) goto LA7_;
eqdestroy___6MQSevRMSKCP9cjNI59cPa2Q((*dest).p->data[colontmp_]);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest).p->data[colontmp_]);
(*dest).p->data[colontmp_] = NIM_NIL;
}
LA7_: ;
colontmp_ += ((NI) 1);
} LA2: ;
}
if ((*dest).p && !((*dest).p->cap & NIM_STRLIT_FLAG)) {
deallocShared((*dest).p);
(*dest).p = NIM_NIL; (*dest).len = 0; }
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___6MQSevRMSKCP9cjNI59cPa2Q)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* dest) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLast((*dest).superview);
if (!T3_) goto LA4_;
eqdestroy___6MQSevRMSKCP9cjNI59cPa2Q((*dest).superview);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest).superview);
(*dest).superview = NIM_NIL;
}
LA4_: ;
eqdestroy___9bg1lN7cA9ailXyLyMjxX36Q((&(*dest).subviews));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eq___8VKhgbUMSTjqqJr9aIEgwHg)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* src) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
if (!src) goto LA3_;
nimIncRef(src);
}
LA3_: ;
{
NIM_BOOL T7_;
T7_ = (NIM_BOOL)0;
T7_ = nimDecRefIsLast((*dest));
if (!T7_) goto LA8_;
eqdestroy___6MQSevRMSKCP9cjNI59cPa2Q((*dest));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest));
}
LA8_: ;
(*dest) = src;
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___9bQg4odyPJSr6edAg8s1ldA)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLast((*dest));
if (!T3_) goto LA4_;
eqdestroy___6MQSevRMSKCP9cjNI59cPa2Q((*dest));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest));
(*dest) = NIM_NIL;
}
LA4_: ;
}BeforeRet_: ;
}
static N_INLINE(NI, find__Fvo0Y3R9awq9cz17DPL5QSjgsystem)(tySequence__6MpIxaa4SeJjuhxMHJJB7Q a, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* item) {
NI result;
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* i;
NIM_BOOL oldNimErrFin1_;
NIM_BOOL* nimErr_;
nimfr_("find", "/home/runner/.choosenim/toolchains/nim-1.2.0/lib/system.nim");
{nimErr_ = nimErrorFlag();
result = (NI)0;
i = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*)0;
{
NI i_2;
NI L;
NI T3_;
i_2 = ((NI) 0);
T3_ = a.len;
L = T3_;
{
while (1) {
NI TM__SRd76hP9cMfCzdUO857UhQQ_6;
NI TM__SRd76hP9cMfCzdUO857UhQQ_7;
if (!(i_2 < L)) goto LA5;
if ((NU)(i_2) >= (NU)a.len){ raiseIndexError2(i_2,a.len-1); goto LA1_;
}
eq___8VKhgbUMSTjqqJr9aIEgwHg(&i, a.p->data[i_2]);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
{
if (!(i == item)) goto LA8_;
eqdestroy___9bQg4odyPJSr6edAg8s1ldA(&i);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
goto BeforeRet_;
}
LA8_: ;
if (nimAddInt(result, ((NI) 1), &TM__SRd76hP9cMfCzdUO857UhQQ_6)) { raiseOverflow(); goto LA1_;
};
result = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_6);
if (nimAddInt(i_2, ((NI) 1), &TM__SRd76hP9cMfCzdUO857UhQQ_7)) { raiseOverflow(); goto LA1_;
};
i_2 = (NI)(TM__SRd76hP9cMfCzdUO857UhQQ_7);
{
NI T12_;
T12_ = a.len;
if (!!((T12_ == L))) goto LA13_;
failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(TM__SRd76hP9cMfCzdUO857UhQQ_9);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
}
LA13_: ;
} LA5: ;
}
}
result = ((NI) -1);
{
LA1_:;
}
{
oldNimErrFin1_ = *nimErr_; *nimErr_ = NIM_FALSE;
eqdestroy___9bQg4odyPJSr6edAg8s1ldA(&i);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
*nimErr_ = oldNimErrFin1_;
}
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqsink___8VKhgbUMSTjqqJr9aIEgwHg_2)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A** dest, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* src) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = nimDecRefIsLast((*dest));
if (!T3_) goto LA4_;
eqdestroy___6MQSevRMSKCP9cjNI59cPa2Q((*dest));
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nimRawDispose((*dest));
}
LA4_: ;
(*dest) = src;
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, removeSubview__eQzVCXvClhBpD4sHsMvS9bw)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* s) {
NI i;
NIM_BOOL* nimErr_;
nimfr_("removeSubview", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
if (!!(!((v == s)))) goto LA3_;
failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(TM__SRd76hP9cMfCzdUO857UhQQ_3);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA3_: ;
i = find__Fvo0Y3R9awq9cz17DPL5QSjgsystem((*v).subviews, s);
{
if (!!((i == ((NI) -1)))) goto LA7_;
if ((i) < ((NI) 0) || (i) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI(i, ((NI) 0), ((NI) IL64(9223372036854775807))); goto BeforeRet_;
}
delete__8UMvAmMOUAN07jAWMSnMcw((&(*v).subviews), ((NI) (i)));
}
LA7_: ;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, removeFromSuperview__PwRchBM6Y8yIh6LLkWtu7A_3)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v) {
NIM_BOOL* nimErr_;
nimfr_("removeFromSuperview", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
if (!!(((*v).superview == NIM_NIL))) goto LA3_;
removeSubview__eQzVCXvClhBpD4sHsMvS9bw((*v).superview, v);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
eqsink___8VKhgbUMSTjqqJr9aIEgwHg_2(&(*v).superview, NIM_NIL);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA3_: ;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, removeAllSubviews__PwRchBM6Y8yIh6LLkWtu7A_2)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v) {
NIM_BOOL* nimErr_;
nimfr_("removeAllSubviews", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
while (1) {
NI T3_;
T3_ = (*v).subviews.len;
if (!(((NI) 0) < T3_)) goto LA2;
if ((NU)(((NI) 0)) >= (NU)(*v).subviews.len){ raiseIndexError2(((NI) 0),(*v).subviews.len-1); goto BeforeRet_;
}
removeFromSuperview__PwRchBM6Y8yIh6LLkWtu7A_3((*v).subviews.p->data[((NI) 0)]);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
} LA2: ;
}
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, addSubview__eQzVCXvClhBpD4sHsMvS9bw_2)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v, tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* s) {
NIM_BOOL oldNimErrFin1_;
NIM_BOOL* nimErr_;
nimfr_("addSubview", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
{
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* blitTmp;
if (!!(((*s).superview == v))) goto LA4_;
removeFromSuperview__PwRchBM6Y8yIh6LLkWtu7A_3(s);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
blitTmp = s;
s = 0;
add__kLpwKk8xV2auJ3OFHxIbkA((&(*v).subviews), blitTmp);
eqsink___8VKhgbUMSTjqqJr9aIEgwHg_2(&(*s).superview, v);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
v = 0;
}
LA4_: ;
{
LA1_:;
}
{
oldNimErrFin1_ = *nimErr_; *nimErr_ = NIM_FALSE;
eqdestroy___9bQg4odyPJSr6edAg8s1ldA(&s);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
eqdestroy___9bQg4odyPJSr6edAg8s1ldA(&v);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
*nimErr_ = oldNimErrFin1_;
}
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, reloadData__PwRchBM6Y8yIh6LLkWtu7A)(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* v) {
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* s;
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* T2_;
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* blitTmp;
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* blitTmp_2;
NIM_BOOL oldNimErrFin1_;
NIM_BOOL* nimErr_;
nimfr_("reloadData", "/home/runner/work/Nim/Nim/temp.nim");
{nimErr_ = nimErrorFlag();
s = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*)0;
removeAllSubviews__PwRchBM6Y8yIh6LLkWtu7A_2(v);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
T2_ = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*)0;
T2_ = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*) nimNewObj(sizeof(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A));
s = T2_;
{
if (!!(!((s == v)))) goto LA5_;
failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(TM__SRd76hP9cMfCzdUO857UhQQ_11);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
}
LA5_: ;
blitTmp = v;
v = 0;
blitTmp_2 = s;
s = 0;
addSubview__eQzVCXvClhBpD4sHsMvS9bw_2(blitTmp, blitTmp_2);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
{
LA1_:;
}
{
oldNimErrFin1_ = *nimErr_; *nimErr_ = NIM_FALSE;
eqdestroy___9bQg4odyPJSr6edAg8s1ldA(&s);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
eqdestroy___9bQg4odyPJSr6edAg8s1ldA(&v);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
*nimErr_ = oldNimErrFin1_;
}
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
popFrame();
}
static N_INLINE(void, initStackBottomWith)(void* locals) {
}
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) {
void (*volatile inner)(void);
inner = PreMainInner;
systemDatInit000();
initStackBottomWith((void *)&inner);
systemInit000();
(*inner)();
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
initStackBottomWith((void *)&inner);
(*inner)();
}
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_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* colontmpD_;
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* colontmpD__2;
tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A* T1_;
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
colontmpD_ = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*)0;
colontmpD__2 = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*)0;
T1_ = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*)0;
T1_ = (tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A*) nimNewObj(sizeof(tyObject_ViewcolonObjectType___jdgDJ9c6xbwxrrQ9bIjCvP5A));
v__ZBo9advJ7u8QecSF0Bd4bHA = T1_;
colontmpD_ = 0;
eq___8VKhgbUMSTjqqJr9aIEgwHg(&colontmpD_, v__ZBo9advJ7u8QecSF0Bd4bHA);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
reloadData__PwRchBM6Y8yIh6LLkWtu7A(colontmpD_);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
colontmpD__2 = 0;
eq___8VKhgbUMSTjqqJr9aIEgwHg(&colontmpD__2, v__ZBo9advJ7u8QecSF0Bd4bHA);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
reloadData__PwRchBM6Y8yIh6LLkWtu7A(colontmpD__2);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
eqdestroy___9bQg4odyPJSr6edAg8s1ldA(&v__ZBo9advJ7u8QecSF0Bd4bHA);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
}
```
55 minutes
bisecting 7
commits at 0
commits per second. I'm working on this issue, with --mm:arc -d:useMalloc
, it gives
/home/wind/play/Nim/test8.nim(35) test8
/home/wind/play/Nim/test8.nim(28) reloadData
/home/wind/play/Nim/test8.nim(19) removeAllSubviews
/home/wind/.choosenim/toolchains/nim-#devel/lib/system.nim(940) removeFromSuperview
/home/wind/.choosenim/toolchains/nim-#devel/lib/system/arc.nim(205) nimDecRefIsLast
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
Valgrind doesn't produce any errors.
I have a question. let s = View()
creates a View ref, which is added to the sequence subviews. When removeSubview
removes it from the sequence, the refs should decrease to zero since no other variables points to it. I'm not sure where the issue is or whether the logic is right.
Btw, it works with -d:useMalloc --mm:orc
.
It does not work and valgrind is not happy either:
nim c -g --cursorInference:off --mm:arc -d:useMalloc temp3.nim && valgrind ./temp3
==1870==
==1870== Invalid read of size 8
==1870== at 0x1112DD: eqsink___temp51_u169 (system.nim:928)
==1870== by 0x111AB5: removeFromSuperview__temp51_u318 (system.nim:929)
==1870== by 0x111BA6: removeAllSubviews__temp51_u324 (temp3.nim:22)
==1870== by 0x112363: reloadData__temp51_u356 (temp3.nim:31)
==1870== by 0x112535: NimMainModule (temp3.nim:38)
==1870== by 0x1125B7: NimMainInner (system.nim:952)
==1870== by 0x1125CE: NimMain (system.nim:963)
==1870== by 0x1125F4: main (system.nim:971)
==1870== Address 0x4a900a8 is 8 bytes inside a block of size 32 free'd
==1870== at 0x484B27F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==1870== by 0x10B096: deallocImpl__system_u1761 (malloc.nim:28)
==1870== by 0x10B0A8: deallocSharedImpl__system_u1774 (malloc.nim:45)
==1870== by 0x10B0BA: deallocShared (memalloc.nim:308)
==1870== by 0x10B66F: alignedDealloc (memalloc.nim:367)
==1870== by 0x10CD51: nimRawDispose (arc.nim:172)
==1870== by 0x1116DF: eqdestroy___temp51_u160 (system.nim:930)
==1870== by 0x10FD5F: reset__temp51_u143 (system.nim:933)
==1870== by 0x10FE00: shrink__temp51_u123 (seqs_v2.nim:88)
==1870== by 0x10FE69: setLen__temp51_u116 (seqs_v2.nim:127)
==1870== by 0x1100DE: delete__temp51_u271 (system.nim:1959)
==1870== by 0x11195B: removeSubview__temp51_u5 (temp3.nim:13)
==1870== Block was alloc'd at
==1870== at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==1870== by 0x10B072: alloc0Impl__system_u1759 (malloc.nim:11)
==1870== by 0x10B084: allocShared0Impl__system_u1772 (malloc.nim:37)
==1870== by 0x10D4C8: alignedAlloc0__system_u1937 (memalloc.nim:351)
==1870== by 0x10C59F: nimNewObj (arc.nim:82)
==1870== by 0x112388: reloadData__temp51_u356 (temp3.nim:32)
==1870== by 0x112513: NimMainModule (temp3.nim:37)
==1870== by 0x1125B7: NimMainInner (system.nim:952)
==1870== by 0x1125CE: NimMain (system.nim:963)
==1870== by 0x1125F4: main (system.nim:971)
==1870==
Isn't that expected for ARC?
proc removeFromSuperview(v: View) =
if v.superview != nil:
v.superview.removeSubview(v) # the reference of v drops to zero, it is free'd
v.superview = nil # segfault `=sink(v.superview, nil)`
Further reduced:
type
View* = ref object
superview*: View
subviews*: seq[View]
proc removeFromSuperview(v: View) =
if v.superview != nil:
#v.superview.removeSubview(v)
let i = v.superview.subviews.find(v)
if i != -1:
v.superview.subviews.delete(i)
v.superview = nil
proc reloadData(v: View) =
while v.subviews.len > 0:
when true:
v.subviews[0].removeFromSuperview() # <-- "Reentrancy" here
else:
let v = v.subviews[0]
if v.superview != nil:
v.superview.removeSubview(v)
v.superview = nil
let s = View()
#assert(s != v) # <-- Fails here
v.subviews.add(s)
s.superview = v
proc main =
let v = View()
v.reloadData()
v.reloadData()
main()
This is undefined behavior. Compare it to the following, roughly analogous program which also fails:
type
View* = ref object
parent: View
child: View
proc reloadData(parent: View) =
if parent.child != nil:
if parent.child.parent != nil:
discard "abc"
parent.child.parent.child = nil
parent.child.parent = nil
let child = View()
parent.child = child
child.parent = parent
proc reloadDataSimple(parent: View) =
let child = View()
parent.child = child
child.parent = parent
proc main =
let parent = View()
parent.reloadDataSimple()
parent.reloadData()
main()
But admittedly, it's subtle and unclear what to watch out for in practice. It is related to nil
and nil checking.
Maybe time to fix/improve strictNotNil
?. đŸ¤”
EDIT: strictNotNil
catches this with an AssertionDefect.
Description
Originally found in nimx. Doesn't reproduce on refc gc. The bug has many possible outcomes depending on gc usage pattern. Note the "fails here" line, where we're comparing a newly allocated reference to a supposedly alive one, which should never happen.
Nim Version
Nim Compiler Version 1.9.5 [Linux: amd64] Compiled at 2023-07-11 Copyright (c) 2006-2023 by Andreas Rumpf
git hash: 9ddd768cce291e5c562cde23baeeefb47aa79c86 active boot switches: -d:release
Current Output
Expected Output
Possible Solution
Change line:
to
Additional Information
No response