diff --git a/src/builtins/sysfn.c b/src/builtins/sysfn.c index 8b284721..f45e4522 100644 --- a/src/builtins/sysfn.c +++ b/src/builtins/sysfn.c @@ -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)); diff --git a/src/h.h b/src/h.h index e458a022..4b944933 100644 --- a/src/h.h +++ b/src/h.h @@ -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 nc1 = 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) { diff --git a/src/ns.c b/src/ns.c index ae538d2f..71f3110e 100644 --- a/src/ns.c +++ b/src/ns.c @@ -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); diff --git a/src/opt/mm_buddyTemplate.h b/src/opt/mm_buddyTemplate.h index ca20f931..b6ef8170 100644 --- a/src/opt/mm_buddyTemplate.h +++ b/src/opt/mm_buddyTemplate.h @@ -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(suid = currObjCounter++; diff --git a/src/rtwrap.c b/src/rtwrap.c index 89e5c21d..3a7626a0 100644 --- a/src/rtwrap.c +++ b/src/rtwrap.c @@ -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; diff --git a/src/vm.c b/src/vm.c index be96d749..4ae0f7dc 100644 --- a/src/vm.c +++ b/src/vm.c @@ -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) {