lua-users home
lua-l archive

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


On 2023-04-29, 18:08 GMT, Luiz Henrique de Figueiredo wrote:
> Lua 5.4.5 has been frozen and is now the current release of Lua 5.4.

Hmm, it seems to me that there is a small remainder from
https://www.lua.org/bugs.html#5.4.4-3 still stayed unmerged
upstream. What is the correct shape of this?

    --- a/src/lcode.c
    +++ b/src/lcode.c
    @@ -1531,7 +1531,7 @@ static void codecommutative (FuncState *
     static void codebitwise (FuncState *fs, BinOpr opr,
                              expdesc *e1, expdesc *e2, int line) {
       int flip = 0;
    -  if (e1->k == VKINT) {
    +  if (e1->k == VKINT && luaK_exp2K(fs, e1)) {
         swapexps(e1, e2);  /* 'e2' will be the constant operand */
         flip = 1;
       }

The same goes for https://www.lua.org/bugs.html#5.4.4-4 and this
remainder:

    --- a/src/lvm.c
    +++ b/src/lvm.c
    @@ -674,7 +674,7 @@ void luaV_concat (lua_State *L, int tota
           setsvalue2s(L, top - n, ts);  /* create result */
         }
         total -= n - 1;  /* got 'n' strings to create one new */
    -    L->top.p -= n - 1;  /* popped 'n' strings and pushed one */
    +    L->top = top - (n - 1);  /* popped 'n' strings and pushed one */
       } while (total > 1);  /* repeat until only 1 result left */
     }


Also https://www.lua.org/bugs.html#5.4.4-5:

    --- a/src/lfunc.c
    +++ b/src/lfunc.c
    @@ -204,6 +204,7 @@ void luaF_closeupval (lua_State *L, StkI
           luaC_barrier(L, uv, slot);
         }
       }
    +  return level;
     }

Did I have wrong patches or there is something wrong with the released tarball?

Best,

Matěj
-- 
https://matej.ceplovi.cz/blog/, @mcepl@floss.social
GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8
 
If only there were evil people somewhere insidiously committing
evil deeds, and it were necessary only to separate them from the
rest of us and destroy them. But the line dividing good and evil
cuts through the heart of every human being. And who is willing
to destroy a piece of his own heart?
  -- Aleksandr Solzhenitsyn: The Gulag Archipelago

Attachment: signature.asc
Description: Digital signature