Merge branch 'master' into v2.1

master
Mike Pall 2015-10-24 18:03:55 +02:00
commit b20642cec9
1 changed files with 5 additions and 4 deletions

View File

@ -435,11 +435,12 @@ static void LJ_FASTCALL recff_ipairs_aux(jit_State *J, RecordFFData *rd)
static void LJ_FASTCALL recff_xpairs(jit_State *J, RecordFFData *rd)
{
if (!(LJ_52 && recff_metacall(J, rd, MM_ipairs))) {
TRef tab = J->base[0];
if (tref_istab(tab)) {
TRef tr = J->base[0];
if (!((LJ_52 || (LJ_HASFFI && tref_iscdata(tr))) &&
recff_metacall(J, rd, MM_ipairs))) {
if (tref_istab(tr)) {
J->base[0] = lj_ir_kfunc(J, funcV(&J->fn->c.upvalue[0]));
J->base[1] = tab;
J->base[1] = tr;
J->base[2] = rd->data ? lj_ir_kint(J, 0) : TREF_NIL;
rd->nres = 3;
} /* else: Interpreter will throw. */