Commits

Laurens Rodriguez committed 449ca83

Renaming killa_setnilvalue -> killa_setnullvalue

Comments (0)

Files changed (11)

src/libraries/killa/kapi.c

   if (idx >= 0) {
     killa_api_check(L, idx <= L->stack_last - (func + 1), "new top too large");
     while (L->top < (func + 1) + idx)
-      killa_setnilvalue(L->top++);
+      killa_setnullvalue(L->top++);
     L->top = (func + 1) + idx;
   }
   else {
 
 KILLA_API void killa_pushnull (killa_State *L) {
   killa_lock(L);
-  killa_setnilvalue(L->top);
+  killa_setnullvalue(L->top);
   killaA_incr_top(L);
   killa_unlock(L);
 }
   if (killa_uvalue(o)->env) {
     killa_sethvalue(L, L->top, killa_uvalue(o)->env);
   } else
-    killa_setnilvalue(L->top);
+    killa_setnullvalue(L->top);
   killaA_incr_top(L);
   killa_unlock(L);
 }

src/libraries/killa/kcode.c

      table has no metatable, so it does not need to invalidate cache */
   killa_setnvalue(idx, killa_cast_num(k));
   killaM_growvector(L, f->k, k, f->sizek, killa_TValue, KILLA_MAXARG_Ax, "constants");
-  while (oldsize < f->sizek) killa_setnilvalue(&f->k[oldsize++]);
+  while (oldsize < f->sizek) killa_setnullvalue(&f->k[oldsize++]);
   killa_setobj(L, &f->k[k], v);
   fs->nk++;
   killaC_barrier(L, f, v);
 
 static int nilK (killa_FuncState *fs) {
   killa_TValue k, v;
-  killa_setnilvalue(&v);
+  killa_setnullvalue(&v);
   /* cannot use nil as key; instead use table itself to represent nil */
   killa_sethvalue(fs->ls->L, &k, fs->h);
   return addk(fs, &k, &v);

src/libraries/killa/kdebug.c

 
 static void collectvalidlines (killa_State *L, killa_Closure *f) {
   if (f == NULL || f->c.isC) {
-    killa_setnilvalue(L->top);
+    killa_setnullvalue(L->top);
     killa_incr_top(L);
   }
   else {

src/libraries/killa/kdo.c

   killa_assert(L->stack_last - L->stack == L->stacksize - KILLA_EXTRA_STACK);
   killaM_reallocvector(L, L->stack, L->stacksize, newsize, killa_TValue);
   for (; lim < newsize; lim++)
-    killa_setnilvalue(L->stack + lim); /* erase new segment */
+    killa_setnullvalue(L->stack + lim); /* erase new segment */
   L->stacksize = newsize;
   L->stack_last = L->stack + newsize - KILLA_EXTRA_STACK;
   correctstack(L, oldstack);
   base = L->top;  /* final position of first argument */
   for (i=0; i<nfixargs; i++) {
     killa_setobjs2s(L, L->top++, fixed + i);
-    killa_setnilvalue(fixed + i);
+    killa_setnullvalue(fixed + i);
   }
   return base;
 }
       func = killa_restorestack(L, funcr);
       n = killa_cast_int(L->top - func) - 1;  /* number of real arguments */
       for (; n < p->numparams; n++)
-        killa_setnilvalue(L->top++);  /* complete missing arguments */
+        killa_setnullvalue(L->top++);  /* complete missing arguments */
       base = (!p->is_vararg) ? func + 1 : adjust_varargs(L, p, n);
       ci = next_ci(L);  /* now 'enter' new function */
       ci->nresults = nresults;
   for (i = wanted; i != 0 && firstResult < L->top; i--)
     killa_setobjs2s(L, res++, firstResult++);
   while (i-- > 0)
-    killa_setnilvalue(res++);
+    killa_setnullvalue(res++);
   L->top = res;
   return (wanted - KILLA_MULTRET);  /* 0 iff wanted == KILLA_MULTRET */
 }

src/libraries/killa/kfunc.c

 killa_UpVal *killaF_newupval (killa_State *L) {
   killa_UpVal *uv = &killaC_newobj(L, KILLA_TUPVAL, sizeof(killa_UpVal), NULL, 0)->uv;
   uv->v = &uv->u.value;
-  killa_setnilvalue(uv->v);
+  killa_setnullvalue(uv->v);
   return uv;
 }
 

src/libraries/killa/kgc.c

   if (g->gcstate == killa_GCSatomic) {  /* final traversal? */
     killa_StkId lim = L->stack + L->stacksize;  /* real end of stack */
     for (; o < lim; o++)  /* clear not-marked stack slice */
-      killa_setnilvalue(o);
+      killa_setnullvalue(o);
   }
   return TRAVCOST + killa_cast_int(o - L->stack);
 }
     killa_Node *n, *limit = gnodelast(h);
     for (n = killa_gnode(h, 0); n < limit; n++) {
       if (!killa_ttisnil(killa_gval(n)) && (iscleared(killa_gkey(n)))) {
-        killa_setnilvalue(killa_gval(n));  /* remove value ... */
+        killa_setnullvalue(killa_gval(n));  /* remove value ... */
         removeentry(n);  /* and remove entry from table */
       }
     }
     for (i = 0; i < h->sizearray; i++) {
       killa_TValue *o = &h->array[i];
       if (iscleared(o))  /* value was collected? */
-        killa_setnilvalue(o);  /* remove value */
+        killa_setnullvalue(o);  /* remove value */
     }
     for (n = killa_gnode(h, 0); n < limit; n++) {
       if (!killa_ttisnil(killa_gval(n)) && iscleared(killa_gval(n))) {
-        killa_setnilvalue(killa_gval(n));  /* remove value ... */
+        killa_setnullvalue(killa_gval(n));  /* remove value ... */
         removeentry(n);  /* and remove entry from table */
       }
     }

src/libraries/killa/kobject.h

 
 #define killa_changenvalue(o,x)	killa_check_exp(killa_ttisnumber(o), killa_num_(o)=(x))
 
-#define killa_setnilvalue(obj) killa_settt_(obj, KILLA_TNULL)
+#define killa_setnullvalue(obj) killa_settt_(obj, KILLA_TNULL)
 
 #define killa_setfvalue(obj,x) \
     { killa_TValue *io=(obj); killa_val_(io).f=(x); killa_settt_(io, KILLA_TLCF); }

src/libraries/killa/kstate.c

   L1->stack = killaM_newvector(L, KILLA_BASIC_STACK_SIZE, killa_TValue);
   L1->stacksize = KILLA_BASIC_STACK_SIZE;
   for (i = 0; i < KILLA_BASIC_STACK_SIZE; i++)
-    killa_setnilvalue(L1->stack + i);  /* erase new stack */
+    killa_setnullvalue(L1->stack + i);  /* erase new stack */
   L1->top = L1->stack;
   L1->stack_last = L1->stack + L1->stacksize - KILLA_EXTRA_STACK;
   /* initialize first ci */
   ci->next = ci->previous = NULL;
   ci->callstatus = 0;
   ci->func = L1->top;
-  killa_setnilvalue(L1->top++);  /* 'function' entry for this 'ci' */
+  killa_setnullvalue(L1->top++);  /* 'function' entry for this 'ci' */
   ci->top = L1->top + KILLA_MINSTACK;
   L1->ci = ci;
 }
   g->strt.size = 0;
   g->strt.nuse = 0;
   g->strt.hash = NULL;
-  killa_setnilvalue(&g->l_registry);
+  killa_setnullvalue(&g->l_registry);
   killaZ_initbuffer(L, &g->buff);
   g->panic = NULL;
   g->version = killa_version(NULL);

src/libraries/killa/ktable.c

   int i;
   killaM_reallocvector(L, t->array, t->sizearray, size, killa_TValue);
   for (i=t->sizearray; i<size; i++)
-     killa_setnilvalue(&t->array[i]);
+     killa_setnullvalue(&t->array[i]);
   t->sizearray = size;
 }
 
     for (i=0; i<size; i++) {
       killa_Node *n = killa_gnode(t, i);
       killa_gnext(n) = NULL;
-      killa_setnilvalue(killa_gkey(n));
-      killa_setnilvalue(killa_gval(n));
+      killa_setnullvalue(killa_gkey(n));
+      killa_setnullvalue(killa_gval(n));
     }
   }
   t->lsizenode = killa_cast_byte(lsize);
       killa_gnext(othern) = n;  /* redo the chain with `n' in place of `mp' */
       *n = *mp;  /* copy colliding node into free pos. (mp->next also goes) */
       killa_gnext(mp) = NULL;  /* now `mp' is free */
-      killa_setnilvalue(killa_gval(mp));
+      killa_setnullvalue(killa_gval(mp));
     }
     else {  /* colliding node is in its own main position */
       /* new node will go into free position */

src/libraries/killa/kundump.c

  n=LoadInt(S);
  f->k=killaM_newvector(S->L,n,killa_TValue);
  f->sizek=n;
- for (i=0; i<n; i++) killa_setnilvalue(&f->k[i]);
+ for (i=0; i<n; i++) killa_setnullvalue(&f->k[i]);
  for (i=0; i<n; i++)
  {
   killa_TValue* o=&f->k[i];
   switch (t)
   {
    case KILLA_TNULL:
-	killa_setnilvalue(o);
+	killa_setnullvalue(o);
 	break;
    case KILLA_TBOOLEAN:
 	killa_setbvalue(o,LoadChar(S));

src/libraries/killa/kvm.c

       vmcase(OP_LOADNIL,
         int b = KILLA_GETARG_B(i);
         do {
-          killa_setnilvalue(ra++);
+          killa_setnullvalue(ra++);
         } while (b--);
       )
       vmcase(OP_GETUPVAL,
             killa_setobjs2s(L, ra + j, base - n + j);
           }
           else {
-            killa_setnilvalue(ra + j);
+            killa_setnullvalue(ra + j);
           }
         }
       )