normalize tag whitespace

This commit is contained in:
dzaima 2021-09-21 17:24:18 +03:00
parent ebb010ea34
commit b38e8c9aeb
7 changed files with 17 additions and 17 deletions

View File

@ -453,7 +453,7 @@ B reBQN_c1(B t, B x) {
scVal = bi_N;
} else {
Scope* sc = m_scope(initBlock->bodies[0], NULL, 0, 0, NULL);
scVal = tag(sc, OBJ_TAG);
scVal = tag(sc,OBJ_TAG);
}
ptr_dec(initBlock);
return m_nfn(reBQNDesc, m_v2(m_f64(replVal), scVal));

14
src/h.h
View File

@ -157,7 +157,7 @@ static const u16 ARR_TAG = 0b1111111111110111; // FFF7 1111111111110111ppppppppp
static const u16 VAL_TAG = 0b1111111111110 ; // FFF. 1111111111110................................................... pointer to Value, needs refcounting
#define ftag(X) ((u64)(X) << 48)
#define tag(V, T) b(((u64)(V)) | ftag(T))
#define taga(V) tag(V, ARR_TAG)
#define taga(V) tag(V,ARR_TAG)
void cbqn_init(void);
@ -249,11 +249,11 @@ void gc_forceGC(void); // force a gc; who knows what happens if gc is disabled (
void gc_visitRoots(void);
// some primitive actions
static const B bi_N = b((u64)0x7FF2000000000000ull); // tag(0, TAG_TAG); // make gcc happy
static const B bi_noVar = b((u64)0x7FF2000000000001ull); // tag(1, TAG_TAG);
static const B bi_okHdr = b((u64)0x7FF2000000000002ull); // tag(2, TAG_TAG);
static const B bi_optOut = b((u64)0x7FF2000000000003ull); // tag(3, TAG_TAG);
static const B bi_noFill = b((u64)0x7FF2000000000005ull); // tag(5, TAG_TAG);
static const B bi_N = b((u64)0x7FF2000000000000ull); // tag(0,TAG_TAG); // make gcc happy
static const B bi_noVar = b((u64)0x7FF2000000000001ull); // tag(1,TAG_TAG);
static const B bi_okHdr = b((u64)0x7FF2000000000002ull); // tag(2,TAG_TAG);
static const B bi_optOut = b((u64)0x7FF2000000000003ull); // tag(3,TAG_TAG);
static const B bi_noFill = b((u64)0x7FF2000000000005ull); // tag(5,TAG_TAG);
extern B bi_emptyHVec, bi_emptyIVec, bi_emptyCVec, bi_emptySVec;
#define emptyHVec() incG(bi_emptyHVec)
#define emptyIVec() incG(bi_emptyIVec)
@ -343,7 +343,7 @@ static inline bool isPrim(B x) { return isCallable(x) && v(x)->flags; }
// make objects
static B m_f64(f64 n) { assert(isF64(b(n))); return b(n); } // assert just to make sure we're actually creating a float
static B m_c32(u32 n) { return tag(n, C32_TAG); } // TODO check validity?
static B m_c32(u32 n) { return tag(n,C32_TAG); } // TODO check validity?
static B m_i32(i32 n) { return m_f64(n); }
static B m_usz(usz n) { return n<I32_MAX? m_i32((i32)n) : m_f64(n); }

View File

@ -20,7 +20,7 @@ NFnDesc* registerNFn(B name, BB2B c1, BBB2B c2) {
r->c1 = c1;
r->c2 = c2;
r->name = name;
nfn_list = vec_add(nfn_list, tag(r, OBJ_TAG));
nfn_list = vec_add(nfn_list, tag(r,OBJ_TAG));
return r;
}
B m_nfn(NFnDesc* desc, B obj) {

View File

@ -35,7 +35,7 @@ B m_ns(Scope* sc, NSDesc* desc) { // consumes both
r->desc = desc;
r->nameList = r->desc->nameList;
r->sc = sc;
return tag(r, NSP_TAG);
return tag(r,NSP_TAG);
}
B ns_getU(B ns, B cNL, i32 nameID) { VTY(ns, t_ns);

View File

@ -35,7 +35,7 @@ static void* BN(allocL)(i64 bucket, u8 type) {
u64* p = (u64*)x;
u64* s = p + sizeof(Value)/8;
u64* e = p + BSZ(bucket)/8;
while(s<e) *s++ = tag(NULL, OBJ_TAG).u;
while(s<e) *s++ = tag(NULL,OBJ_TAG).u;
#endif
#ifdef OBJ_COUNTER
x->uid = currObjCounter++;

View File

@ -167,7 +167,7 @@ B rtWrap_wrap(B t) {
r->c1t = 0; r->c1a = 0;
r->c2t = 0; r->c2a = 0;
#endif
return tag(r, FUN_TAG);
return tag(r,FUN_TAG);
}
#ifdef RT_PERF
if (isMd1(t)) {
@ -181,7 +181,7 @@ B rtWrap_wrap(B t) {
lastWM1 = r;
r->c1a = 0; r->c2a = 0;
r->c1t = 0; r->c2t = 0;
return tag(r, MD1_TAG);
return tag(r,MD1_TAG);
}
if (isMd2(t)) {
Md2* fc = c(Md2,t);
@ -195,7 +195,7 @@ B rtWrap_wrap(B t) {
lastWM2 = r;
r->c1a = 0; r->c2a = 0;
r->c1t = 0; r->c2t = 0;
return tag(r, MD2_TAG);
return tag(r,MD2_TAG);
}
#endif
return t;

View File

@ -806,7 +806,7 @@ B m_funBlock(Block* bl, Scope* psc) { // doesn't consume anything
r->sc = psc; ptr_inc(psc);
r->c1 = funBl_c1;
r->c2 = funBl_c2;
return tag(r, FUN_TAG);
return tag(r,FUN_TAG);
}
B m_md1Block(Block* bl, Scope* psc) {
Md1Block* r = mm_alloc(sizeof(Md1Block), t_md1_block);
@ -814,7 +814,7 @@ B m_md1Block(Block* bl, Scope* psc) {
r->sc = psc; ptr_inc(psc);
r->c1 = md1Bl_c1;
r->c2 = md1Bl_c2;
return tag(r, MD1_TAG);
return tag(r,MD1_TAG);
}
B m_md2Block(Block* bl, Scope* psc) {
Md2Block* r = mm_alloc(sizeof(Md2Block), t_md2_block);
@ -822,7 +822,7 @@ B m_md2Block(Block* bl, Scope* psc) {
r->sc = psc; ptr_inc(psc);
r->c1 = md2Bl_c1;
r->c2 = md2Bl_c2;
return tag(r, MD2_TAG);
return tag(r,MD2_TAG);
}
DEF_FREE(scope) {