clean up whitespace
This commit is contained in:
parent
b3d0d5cb49
commit
d383fe57a7
@ -139,7 +139,7 @@ typedef void (*AndBytesFn)(u8*, u8*, u64, u64);
|
|||||||
)
|
)
|
||||||
#undef GC2f
|
#undef GC2f
|
||||||
|
|
||||||
|
|
||||||
#if SINGELI
|
#if SINGELI
|
||||||
#define AA_DISPATCH(NAME) FORCE_INLINE B NAME##_AA(B t, B w, B x) { return dyArith_AA(&NAME##DyTableAA, w, x); }
|
#define AA_DISPATCH(NAME) FORCE_INLINE B NAME##_AA(B t, B w, B x) { return dyArith_AA(&NAME##DyTableAA, w, x); }
|
||||||
AA_DISPATCH(add) AA_DISPATCH(or)
|
AA_DISPATCH(add) AA_DISPATCH(or)
|
||||||
@ -410,11 +410,11 @@ static u64 gcd_u64(u64 a, u64 b) {
|
|||||||
|
|
||||||
b >>= bz;
|
b >>= bz;
|
||||||
while (a > 0) {
|
while (a > 0) {
|
||||||
a >>= az;
|
a >>= az;
|
||||||
u64 d = b - a;
|
u64 d = b - a;
|
||||||
az = CTZ(d);
|
az = CTZ(d);
|
||||||
b = b<a? b : a;
|
b = b<a? b : a;
|
||||||
a = b<a? -d : d;
|
a = b<a? -d : d;
|
||||||
}
|
}
|
||||||
return b << sh;
|
return b << sh;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -47,7 +47,7 @@ B bit_negate(B x) { // consumes
|
|||||||
} \
|
} \
|
||||||
base: SLOW1(SYMB"𝕩", x); return arith_recm(NAME##_c1, x); \
|
base: SLOW1(SYMB"𝕩", x); return arith_recm(NAME##_c1, x); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
B add_c1(B t, B x) {
|
B add_c1(B t, B x) {
|
||||||
if (isF64(x)) return x;
|
if (isF64(x)) return x;
|
||||||
|
|||||||
@ -246,7 +246,7 @@ B fold_c2(Md1D* d, B w, B x) { B f = d->f;
|
|||||||
if (rtid==n_eq) { bool r=wi^fold_ne(xp, ia) ^ (1&ia); decG(x); return m_i32(r); }
|
if (rtid==n_eq) { bool r=wi^fold_ne(xp, ia) ^ (1&ia); decG(x); return m_i32(r); }
|
||||||
goto base;
|
goto base;
|
||||||
}
|
}
|
||||||
if (rtid==n_add) { // +
|
if (rtid==n_add) { // +
|
||||||
u8 sel = xe - el_i8;
|
u8 sel = xe - el_i8;
|
||||||
f64 r = sum_fns[sel](tyany_ptr(x), ia, wf);
|
f64 r = sum_fns[sel](tyany_ptr(x), ia, wf);
|
||||||
decG(x); return m_f64(r);
|
decG(x); return m_f64(r);
|
||||||
|
|||||||
@ -949,7 +949,7 @@ B slash_im(B t, B x) {
|
|||||||
usz ria = (usz)max + 1; \
|
usz ria = (usz)max + 1; \
|
||||||
i##N* rp; r = m_i##N##arrv(&rp, ria); for (usz i=0; i<ria; i++) rp[i]=0; \
|
i##N* rp; r = m_i##N##arrv(&rp, ria); for (usz i=0; i<ria; i++) rp[i]=0; \
|
||||||
for (usz i = 0; i < xia; i++) rp[xp[i]]++; \
|
for (usz i = 0; i < xia; i++) rp[xp[i]]++; \
|
||||||
r = num_squeeze(r);
|
r = num_squeeze(r);
|
||||||
#define CASE_SMALL(N) \
|
#define CASE_SMALL(N) \
|
||||||
case el_i##N: { \
|
case el_i##N: { \
|
||||||
i##N* xp = i##N##any_ptr(x); \
|
i##N* xp = i##N##any_ptr(x); \
|
||||||
|
|||||||
@ -866,7 +866,7 @@ typedef struct pollfd pollfd;
|
|||||||
void shClose(int fd) { if (close(fd)) err("bad file descriptor close"); }
|
void shClose(int fd) { if (close(fd)) err("bad file descriptor close"); }
|
||||||
|
|
||||||
// #define shDbg(...) printf(__VA_ARGS__); fflush(stdout)
|
// #define shDbg(...) printf(__VA_ARGS__); fflush(stdout)
|
||||||
#define shDbg(...)
|
#define shDbg(...)
|
||||||
|
|
||||||
B sh_c2(B t, B w, B x) {
|
B sh_c2(B t, B w, B x) {
|
||||||
|
|
||||||
@ -1500,7 +1500,7 @@ B sys_c1(B t, B x) {
|
|||||||
}
|
}
|
||||||
case 14: { // •file
|
case 14: { // •file
|
||||||
if(!fileNS.u) {
|
if(!fileNS.u) {
|
||||||
initFileNS();
|
initFileNS();
|
||||||
REQ_PATH;
|
REQ_PATH;
|
||||||
#define F(X) m_nfn(X##Desc, inc(path))
|
#define F(X) m_nfn(X##Desc, inc(path))
|
||||||
fileNS = m_nns(file_nsGen, q_N(path)? m_c32(0) : inc(path), F(fileAt), F(fList), F(fBytes), F(fChars), F(fLines), F(fType), F(fCreated), F(fAccessed), F(fModified), F(fSize), F(fExists), inc(bi_fName), inc(bi_fParent), F(fMapBytes), F(createdir), F(rename), F(remove));
|
fileNS = m_nns(file_nsGen, q_N(path)? m_c32(0) : inc(path), F(fileAt), F(fList), F(fBytes), F(fChars), F(fLines), F(fType), F(fCreated), F(fAccessed), F(fModified), F(fSize), F(fExists), inc(bi_fName), inc(bi_fParent), F(fMapBytes), F(createdir), F(rename), F(remove));
|
||||||
|
|||||||
@ -31,7 +31,7 @@ void mm_dumpHeap(FILE* f);
|
|||||||
|
|
||||||
static u64 mm_round(usz x) { return x; }
|
static u64 mm_round(usz x) { return x; }
|
||||||
static u64 mm_size(Value* x) {
|
static u64 mm_size(Value* x) {
|
||||||
size_t r = malloc_usable_size(x);
|
size_t r = malloc_usable_size(x);
|
||||||
if (((ssize_t)r) < 16) err("MM=0 requires working malloc_usable_size");
|
if (((ssize_t)r) < 16) err("MM=0 requires working malloc_usable_size");
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -191,7 +191,7 @@ NOINLINE void m_copyG_B_generic(void* a, B* mpo, B x, usz xs, usz l) {
|
|||||||
SGet(x)
|
SGet(x)
|
||||||
for (usz i = 0; i < l; i++) mpo[i] = Get(x,i+xs);
|
for (usz i = 0; i < l; i++) mpo[i] = Get(x,i+xs);
|
||||||
}
|
}
|
||||||
DEF_G(void, copy, B, (void* a, usz ms, B x, usz xs, usz l), ms, x, xs, l) {
|
DEF_G(void, copy, B, (void* a, usz ms, B x, usz xs, usz l), ms, x, xs, l) {
|
||||||
B* mpo = ms+(B*)a;
|
B* mpo = ms+(B*)a;
|
||||||
switch(TY(x)) {
|
switch(TY(x)) {
|
||||||
case t_bitarr: { u64* xp = bitarr_ptr(x); for (usz i = 0; i < l; i++) mpo[i] = m_i32(bitp_get(xp, xs+i)); return; }
|
case t_bitarr: { u64* xp = bitarr_ptr(x); for (usz i = 0; i < l; i++) mpo[i] = m_i32(bitp_get(xp, xs+i)); return; }
|
||||||
@ -226,7 +226,7 @@ DEF_G(void, copy, B, (void* a, usz ms, B x, usz xs, usz l), ms, x, x
|
|||||||
void custom_storeu_si32(void* p, __m128i x) {
|
void custom_storeu_si32(void* p, __m128i x) {
|
||||||
_mm_store_ss(p, _mm_castsi128_ps(x));
|
_mm_store_ss(p, _mm_castsi128_ps(x));
|
||||||
}
|
}
|
||||||
#define _mm_loadu_si32 custom_loadu_si32
|
#define _mm_loadu_si32 custom_loadu_si32
|
||||||
#define _mm_storeu_si32 custom_storeu_si32
|
#define _mm_storeu_si32 custom_storeu_si32
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
2
src/vm.c
2
src/vm.c
@ -701,7 +701,7 @@ B evalBC(Body* b, Scope* sc, Block* bl) { // doesn't consume
|
|||||||
#define P(N) B N=POP;
|
#define P(N) B N=POP;
|
||||||
#define ADD(X) { B tr=X; *(gStack++) = tr; }
|
#define ADD(X) { B tr=X; *(gStack++) = tr; }
|
||||||
#define PEEK(X) gStack[-(X)]
|
#define PEEK(X) gStack[-(X)]
|
||||||
#define STACK_HEIGHT
|
#define STACK_HEIGHT
|
||||||
#define GS_UPD
|
#define GS_UPD
|
||||||
#else
|
#else
|
||||||
B* lgStack = gStack;
|
B* lgStack = gStack;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user