Fix despecialization of ITERN when already running.

This commit is contained in:
Mike Pall
2012-09-12 16:58:47 +02:00
parent 23932a6c8b
commit aed2009378
6 changed files with 15 additions and 2 deletions

View File

@@ -545,6 +545,8 @@ static uint32_t keyindex(lua_State *L, GCtab *t, cTValue *key)
return t->asize + (uint32_t)(n - noderef(t->node));
/* Hash key indexes: [t->asize..t->asize+t->nmask] */
} while ((n = nextnode(n)));
if (key->u32.hi == 0xfffe7fff) /* ITERN was despecialized while running. */
return key->u32.lo - 1;
lj_err_msg(L, LJ_ERR_NEXTIDX);
return 0; /* unreachable */
}