lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Maybe a better fix is this one:

    case OPR_AND: {
       lua_assert(e1->t == NO_JUMP);  /* list must be closed */
       luaK_dischargevars(fs, e2);
-      luaK_concat(fs, &e1->f, e2->f);
-      e1->k = e2->k; e1->u.s.info = e2->u.s.info;
-      e1->u.s.aux = e2->u.s.aux; e1->t = e2->t;
+      luaK_concat(fs, &e2->f, e1->f);
+      *e1 = *e2;
       break;
     }

It also avoids the "union assignment" discussion. (BTW, Lua already does
union assignments; e.g., in macro setobj.)


> Notice: there are more places in luaK_posfix that need to be fixed as
> well.

There is one other place in the next case (OPR_OR). Is there any other?

-- Roberto