nbytes = newsize * sizeof(JSScopeProperty);
nbytes = SCOPE_TABLE_NBYTES(newsize);
ChangeScope(JSContext *cx, JSScope *scope, int change){    int oldlog2, newlog2;    uint32 oldsize, newsize, nbytes;    JSScopeProperty **table, **oldtable, **spp, **oldspp, *sprop;    /* Grow, shrink, or compress by changing scope->table. */    oldlog2 = JS_DHASH_BITS - scope->hashShift;    newlog2 = oldlog2 + change;    oldsize = JS_BIT(oldlog2);    newsize = JS_BIT(newlog2);    nbytes = newsize * sizeof(JSScopeProperty);    table = (JSScopeProperty **) calloc(nbytes, 1);    if (!table) {        JS_ReportOutOfMemory(cx);        return JS_FALSE;    }    /* Now that we have a new table allocated, update scope members. */    scope->hashShift = JS_DHASH_BITS - newlog2;    scope->removedCount = 0;    oldtable = scope->table;    scope->table = table;    /* Copy only live entries, leaving removed and free ones behind. */    for (oldspp = oldtable; oldsize != 0; oldspp++) {        sprop = SPROP_FETCH(oldspp);        if (sprop) {            spp = js_SearchScope(scope, sprop->id, JS_TRUE);            JS_ASSERT(SPROP_IS_FREE(*spp));            *spp = sprop;        }        oldsize--;    }    /* Finally, free the old table storage. */    JS_free(cx, oldtable);    return JS_TRUE;}