move arr_ptr from mut.c to core includes

This commit is contained in:
dzaima 2025-05-23 20:56:53 +03:00
parent e02c267ef5
commit cc0462aa53
2 changed files with 6 additions and 4 deletions

View File

@ -34,6 +34,12 @@ static void* tyslicev_ptr(Arr* x) {
static void* tyarr_ptr(B x) { return tyarrv_ptr(c(TyArr,x)); } static void* tyarr_ptr(B x) { return tyarrv_ptr(c(TyArr,x)); }
static void* tyany_ptr(B x) { return tyanyv_ptr(a(x)); } static void* tyany_ptr(B x) { return tyanyv_ptr(a(x)); }
static void* arr_ptr(Arr* t, u8 el) {
return el==el_B? (void*)harrv_ptr(t) : tyarrv_ptr((TyArr*)t);
}
#define M_TYARR(WM, OVER, MID, RV, PRE) { PRE \ #define M_TYARR(WM, OVER, MID, RV, PRE) { PRE \
Arr* r = m_arr((offsetof(TyArr, a) + ( \ Arr* r = m_arr((offsetof(TyArr, a) + ( \
WM==0? ((u64)ia)*w \ WM==0? ((u64)ia)*w \

View File

@ -39,10 +39,6 @@ NOINLINE Mut make_mut_init(u64 ia, u8 el) {
} }
#endif #endif
static void* arr_ptr(Arr* t, u8 el) {
return el==el_B? (void*)harrv_ptr(t) : tyarrv_ptr((TyArr*)t);
}
INIT_GLOBAL u8 reuseElType[t_COUNT]; INIT_GLOBAL u8 reuseElType[t_COUNT];
void mut_init_copy(Mut* m, B x, u8 el) { void mut_init_copy(Mut* m, B x, u8 el) {
assert(m->fns == &mutFns[el_MAX]); assert(m->fns == &mutFns[el_MAX]);