/* Creates an array for the hash part of a table with the given size, or reuses the dummy node if size is zero. The computation for size overflow is in two steps: the first comparison ensures that the shift in the second one does not overflow.  */
static void setnodevector(lua_State *L, Table *t, unsigned int size)
/* Creates an array for the hash part of a table with the given size, or reuses the dummy node if size is zero. The computation for size overflow is in two steps: the first comparison ensures that the shift in the second one does not overflow.  */
static void setnodevector(lua_State *L, Table *t, unsigned int size)
{
    t->node = cast(Node *, dummynode);
    t->lsizenode = 0;
    t->lastfree = NULL;
  }
  else {
    int i;
    int lsize = luaO_ceillog2(size);
    if (lsize > MAXHBITS || (1u << lsize) > MAXHSIZE)
      luaG_runerror(L, "table overflow");
    size = twoto(lsize);
    t->node = luaM_newvector(L, size, Node);
    for (i = 0; i < (int)size; i++) {
      Node *n = gnode(t, i);
      gnext(n) = 0;
      setnilkey(n);
      setempty(gval(n));
    }
    t->lsizenode = cast_byte(lsize);
    t->lastfree = gnode(t, size);
  }
}