1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192
|
/* Generated by Nim Compiler v2.2.0 */
#define NIM_INTBITS 64
#define NIM_EmulateOverflowChecks
#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
typedef struct tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ;
typedef struct tyObject_Int128__Moyhy3H7f18q9axhPc7Yt9bg tyObject_Int128__Moyhy3H7f18q9axhPc7Yt9bg;
typedef struct tyObject_TType__8qAQZfpTDk89aeclTNn4d9cg tyObject_TType__8qAQZfpTDk89aeclTNn4d9cg;
typedef struct tyObject_TLineInfo__cGj50BJ9bj3Zx09a9bMvKs8HA tyObject_TLineInfo__cGj50BJ9bj3Zx09a9bMvKs8HA;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
typedef struct tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg;
typedef struct tyObject_TIdent__LG4CHFyohryWo9bzZeyjDjA tyObject_TIdent__LG4CHFyohryWo9bzZeyjDjA;
typedef struct tySequence__9ahcSjIErJohSBBFLwuF56Q tySequence__9ahcSjIErJohSBBFLwuF56Q;
typedef struct tySequence__9ahcSjIErJohSBBFLwuF56Q_Content tySequence__9ahcSjIErJohSBBFLwuF56Q_Content;
typedef NU32 tyArray__FleBT9cC2nxhgiXmSYYnEKA[4];
struct tyObject_Int128__Moyhy3H7f18q9axhPc7Yt9bg {
tyArray__FleBT9cC2nxhgiXmSYYnEKA udata;
};
struct tyObject_TLineInfo__cGj50BJ9bj3Zx09a9bMvKs8HA {
NU16 line;
NI16 col;
NI32 fileIndex;
};
typedef NU32 tySet_tyEnum_TNodeFlag__3UjGgL9bLM4RXBnoZJs9cviw;
typedef NU8 tyEnum_TNodeKind__eZrq5BxQzEyOryCcwdj4Kw;
struct NimStrPayload {
NI cap;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
NI len;
NimStrPayload* p;
};
struct tySequence__9ahcSjIErJohSBBFLwuF56Q {
NI len; tySequence__9ahcSjIErJohSBBFLwuF56Q_Content* p;
};
struct tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ {
tyObject_TType__8qAQZfpTDk89aeclTNn4d9cg* typ;
tyObject_TLineInfo__cGj50BJ9bj3Zx09a9bMvKs8HA info;
tySet_tyEnum_TNodeFlag__3UjGgL9bLM4RXBnoZJs9cviw flags;
tyEnum_TNodeKind__eZrq5BxQzEyOryCcwdj4Kw kind;
union{
struct {
NI64 intVal;
} _kind_1;
struct {
NF floatVal;
} _kind_2;
struct {
NimStringV2 strVal;
} _kind_3;
struct {
tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg* sym;
} _kind_4;
struct {
tyObject_TIdent__LG4CHFyohryWo9bzZeyjDjA* ident;
} _kind_5;
struct {
tySequence__9ahcSjIErJohSBBFLwuF56Q sons;
} _kind_6;
};
};
struct tySequence__9ahcSjIErJohSBBFLwuF56Q_Content { NI cap; tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ* data[SEQ_DECL_SIZE]; };
static N_INLINE(NI, len__ast_u3163)(tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ* n_p0);
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__Moyhy3H7f18q9axhPc7Yt9bg, getOrdValue__types_u166)(tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ* n_p0);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, lteq___int128_u408)(tyObject_Int128__Moyhy3H7f18q9axhPc7Yt9bg a_p0, tyObject_Int128__Moyhy3H7f18q9axhPc7Yt9bg b_p1);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, eqeq___int128_u412)(tyObject_Int128__Moyhy3H7f18q9axhPc7Yt9bg a_p0, tyObject_Int128__Moyhy3H7f18q9axhPc7Yt9bg b_p1);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
extern NIM_BOOL nimInErrorMode__system_u4269;
static N_INLINE(NI, len__ast_u3163)(tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ* n_p0) {
NI result;
NI T1_;
T1_ = (*n_p0)._kind_6.sons.len;
result = T1_;
return result;
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (&nimInErrorMode__system_u4269);
return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, caseObjDefaultBranch__expanddefaults_u4)(tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ* obj_p0, tyObject_Int128__Moyhy3H7f18q9axhPc7Yt9bg branch_p1) {
NI result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
result = ((NI)0);
{
NI i;
NI colontmp_;
NI i_2;
i = (NI)0;
colontmp_ = (NI)0;
colontmp_ = len__ast_u3163(obj_p0);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
i_2 = ((NI)1);
{
while (1) {
if (!(i_2 < colontmp_)) goto LA3;
i = i_2;
{
NI j;
NI colontmp__2;
NI T5_;
NI res;
j = (NI)0;
colontmp__2 = (NI)0;
T5_ = (NI)0;
T5_ = len__ast_u3163((*obj_p0)._kind_6.sons.p->data[i]);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
colontmp__2 = (NI)(T5_ - ((NI)2));
res = ((NI)0);
{
while (1) {
if (!(res <= colontmp__2)) goto LA7;
j = ((NI) (res));
{
tyObject_Int128__Moyhy3H7f18q9axhPc7Yt9bg x;
tyObject_Int128__Moyhy3H7f18q9axhPc7Yt9bg y;
if (!((*(*(*obj_p0)._kind_6.sons.p->data[i])._kind_6.sons.p->data[j]).kind == ((tyEnum_TNodeKind__eZrq5BxQzEyOryCcwdj4Kw)44))) goto LA10_;
x = getOrdValue__types_u166((*(*(*obj_p0)._kind_6.sons.p->data[i])._kind_6.sons.p->data[j])._kind_6.sons.p->data[((NI)0)]);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
y = getOrdValue__types_u166((*(*(*obj_p0)._kind_6.sons.p->data[i])._kind_6.sons.p->data[j])._kind_6.sons.p->data[((NI)1)]);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
{
NIM_BOOL T14_;
T14_ = (NIM_BOOL)0;
T14_ = lteq___int128_u408(x, branch_p1);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
if (!(T14_)) goto LA15_;
T14_ = lteq___int128_u408(branch_p1, y);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
LA15_: ;
if (!T14_) goto LA16_;
result = i;
goto BeforeRet_;
}
LA16_: ;
}
goto LA8_;
LA10_: ;
{
tyObject_Int128__Moyhy3H7f18q9axhPc7Yt9bg T19_;
NIM_BOOL T20_;
T19_ = getOrdValue__types_u166((*(*obj_p0)._kind_6.sons.p->data[i])._kind_6.sons.p->data[j]);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
T20_ = (NIM_BOOL)0;
T20_ = eqeq___int128_u412(T19_, branch_p1);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
if (!T20_) goto LA21_;
result = i;
goto BeforeRet_;
}
goto LA8_;
LA21_: ;
LA8_: ;
res += ((NI)1);
} LA7: ;
}
}
{
NI T25_;
T25_ = (NI)0;
T25_ = len__ast_u3163((*obj_p0)._kind_6.sons.p->data[i]);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
if (!(T25_ == ((NI)1))) goto LA26_;
result = i;
goto BeforeRet_;
}
LA26_: ;
i_2 += ((NI)1);
} LA3: ;
}
}
result = ((NI)1);
goto BeforeRet_;
}BeforeRet_: ;
return result;
}
|