[ANN] Lua 5.4.0 (beta) now available

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANN] Lua 5.4.0 (beta) now available

Luiz Henrique de Figueiredo
Lua 5.4.0 (beta) has been frozen and is now available for testing at
        http://www.lua.org/work/lua-5.4.0-beta.tar.gz

The checksums are
        MD5 961e2692a10a4a3c6fe80086e4cbefd5  -
        SHA1 5d018de9b1f69b7e334dc3fa43b815669e103880  -

This is an beta version. Some details may change in the final version.

The main changes in Lua 5.4.0 are listed at
        http://www.lua.org/work/doc/#changes

An updated reference manual is included and also available at
        http://www.lua.org/work/doc

The complete diffs of changes are available at
        http://www.lua.org/work/

A test suite is available at
        http://www.lua.org/work/lua-5.4.0-beta-tests.tar.gz

If your platform is a common Unix-like platform, just do
        make guess
The Makefile will guess your platform using uname and build Lua for it.
We welcome feedback on this, which is new, especially more uname targets
with explicit rules and fixes for existing ones.

We also welcome feedback on the listings output by luac -l -l, because
luac has been rewritten to account for the new VM instructions.

All feedback welcome. Thanks.
--lhf

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.4.0 (beta) now available

Andrew Gierth
I hadn't noticed initially that some optimization options (-Os) have now
been hardcoded in the Makefile (i.e. used directly in rules, not via
variables).

Can we please not have this sort of thing hardcoded? If you must have
separate options for some files, they should be in some variable so that
they can be overridden without having to patch the makefile rules.

--
Andrew.

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.4.0 (beta) now available

Russell Haley
In reply to this post by Luiz Henrique de Figueiredo


On Wed, Oct 16, 2019 at 10:30 AM Luiz Henrique de Figueiredo <[hidden email]> wrote:
Lua 5.4.0 (beta) has been frozen and is now available for testing at
        http://www.lua.org/work/lua-5.4.0-beta.tar.gz

The checksums are
        MD5     961e2692a10a4a3c6fe80086e4cbefd5  -
        SHA1    5d018de9b1f69b7e334dc3fa43b815669e103880  -

This is an beta version. Some details may change in the final version.

The main changes in Lua 5.4.0 are listed at
        http://www.lua.org/work/doc/#changes

An updated reference manual is included and also available at
        http://www.lua.org/work/doc

The complete diffs of changes are available at
        http://www.lua.org/work/

A test suite is available at
        http://www.lua.org/work/lua-5.4.0-beta-tests.tar.gz

If your platform is a common Unix-like platform, just do
        make guess
The Makefile will guess your platform using uname and build Lua for it.
We welcome feedback on this, which is new, especially more uname targets
with explicit rules and fixes for existing ones.

We also welcome feedback on the listings output by luac -l -l, because
luac has been rewritten to account for the new VM instructions.

All feedback welcome. Thanks.
--lhf

Just an FYI, I'm mucking about with the Kiel compiler and I see two warnings: 

*** Using Compiler 'V5.06 update 3 (build 300)', folder: 'E:\Keil-5_21\ARM\ARMCC\Bin'
Rebuild target 'Target 1'
compiling lbaselib.c...
compiling lapi.c...
compiling lcode.c...
lua-5.4.0-beta\src\lcode.c(113): warning:  #68-D: integer conversion resulted in a change of sign
    static const Instruction invalidinstruction = -1;
lua-5.4.0-beta\src\lcode.c: 1 warning, 0 errors
compiling lcorolib.c...
compiling lctype.c...
compiling ldblib.c...
compiling ldebug.c...
compiling lfunc.c...
compiling ldo.c...
compiling linit.c...
compiling lgc.c...
compiling liolib.c...
compiling lmem.c...
compiling lmathlib.c...
compiling lobject.c...
compiling lopcodes.c...
compiling lstate.c...
compiling lstring.c...
compiling lparser.c...
compiling ltable.c...
compiling lstrlib.c...
compiling ltablib.c...
compiling ltm.c...
compiling lutf8lib.c...
compiling lzio.c...
compiling lvm.c...
lua-5.4.0-beta\src\lvm.c(1569): warning:  #111-D: statement is unreachable
         
mbreak;
lua-5.4.0-beta\src\lvm.c: 1 warning, 0 errors
creating Library...
".\Objects\lua-build.lib" - 0 Error(s), 2 Warning(s).
Build Time Elapsed:  00:00:14

Cheers, 
Russ


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.4.0 (beta) now available

Roberto Ierusalimschy
> > Just an FYI, I'm mucking about with the Kiel compiler and I see two
> warnings:
>
> [...]

Thanks,

-- Roberto

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.4.0 (beta) now available

actboy168@gmail.com
In reply to this post by Luiz Henrique de Figueiredo

https://github.com/lua/lua/blob/6e1aec7a677a9891f2f8ca57e039d9984fdc69bc/lvm.c#L1085  

  lua_assert(isIT(i) || (L->top = base));

should be:

 lua_assert(isIT(i) || (L->top == base));

I think.

 

--actboy168


On Thu, Oct 17, 2019 at 1:29 AM Luiz Henrique de Figueiredo <[hidden email]> wrote:
Lua 5.4.0 (beta) has been frozen and is now available for testing at
        http://www.lua.org/work/lua-5.4.0-beta.tar.gz

The checksums are
        MD5     961e2692a10a4a3c6fe80086e4cbefd5  -
        SHA1    5d018de9b1f69b7e334dc3fa43b815669e103880  -

This is an beta version. Some details may change in the final version.

The main changes in Lua 5.4.0 are listed at
        http://www.lua.org/work/doc/#changes

An updated reference manual is included and also available at
        http://www.lua.org/work/doc

The complete diffs of changes are available at
        http://www.lua.org/work/

A test suite is available at
        http://www.lua.org/work/lua-5.4.0-beta-tests.tar.gz

If your platform is a common Unix-like platform, just do
        make guess
The Makefile will guess your platform using uname and build Lua for it.
We welcome feedback on this, which is new, especially more uname targets
with explicit rules and fixes for existing ones.

We also welcome feedback on the listings output by luac -l -l, because
luac has been rewritten to account for the new VM instructions.

All feedback welcome. Thanks.
--lhf



--
-- actboy168
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.4.0 (beta) now available

Roberto Ierusalimschy
> https://github.com/lua/lua/blob/6e1aec7a677a9891f2f8ca57e039d9984fdc69bc/lvm.c#L1085
>
>
>   lua_assert(isIT(i) || (L->top = base));
>
> should be:
>
>  lua_assert(isIT(i) || (L->top == base));
>
> I think.

Strange as it is, this is correct. See previous comment:

    /* invalidate top for instructions not expecting it */
    lua_assert(isIT(i) || (L->top = base));

The idea is that only opcodes marked with 'isIT' should use L->top.
To test this, all other opcodes set L->top to an "absurd" value
(base, so that it is out of the range of valid registers) to force
some error if it is used.

-- Roberto

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.4.0 (beta) now available

actboy168@gmail.com
Thank you for your detailed explanation.

On Mon, Nov 4, 2019 at 10:54 PM Roberto Ierusalimschy <[hidden email]> wrote:
> https://github.com/lua/lua/blob/6e1aec7a677a9891f2f8ca57e039d9984fdc69bc/lvm.c#L1085
>
>
>   lua_assert(isIT(i) || (L->top = base));
>
> should be:
>
>  lua_assert(isIT(i) || (L->top == base));
>
> I think.

Strange as it is, this is correct. See previous comment:

    /* invalidate top for instructions not expecting it */
    lua_assert(isIT(i) || (L->top = base));

The idea is that only opcodes marked with 'isIT' should use L->top.
To test this, all other opcodes set L->top to an "absurd" value
(base, so that it is out of the range of valid registers) to force
some error if it is used.

-- Roberto



--
-- actboy168
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.4.0 (beta) now available

Philippe Verdy
Le mar. 5 nov. 2019 à 06:42, actboy168 <[hidden email]> a écrit :
Thank you for your detailed explanation.

On Mon, Nov 4, 2019 at 10:54 PM Roberto Ierusalimschy <[hidden email]> wrote:
> https://github.com/lua/lua/blob/6e1aec7a677a9891f2f8ca57e039d9984fdc69bc/lvm.c#L1085
Strange as it is, this is correct. See previous comment:

    /* invalidate top for instructions not expecting it */
    lua_assert(isIT(i) || (L->top = base));

The idea is that only opcodes marked with 'isIT' should use L->top.
To test this, all other opcodes set L->top to an "absurd" value
(base, so that it is out of the range of valid registers) to force
some error if it is used.

You should then mark it in the code explictly as:

      /* invalidate top for instructions not expecting it */
      lua_assert(isIT(i) || (L->top = base) != 0);

This makes clear you want an assignment of top with "absurd" base, and then the zero-test of this "absurd" base ; it and will shut up linters (The C compiler already performs implicitly the "!= 0" test on all non-boolean operands of "||"; but when you use an assignment as an operand of "||" instead of a boolean comparison, lot of compilers have a linter emitting a warning for the frequent possible typo or misuse of "=" instead of "=="; such typo/misuse does not occur in Lua programs because assignments cannot be subexpressions, and in Lua you would have used an if/else to separate the side-effect for the assignment).

However I wonder if the side-effect of this conditional assignment, expected when compiling in debug mode where lua_assert() will perform it, should not be made when the lua_assert() macro is a do-nothing in non-debug mode (and then does not compile its expression given in parameter):

      /* invalidate top for instructions not expecting it */ 
      if (!isIT(i)) {
         L->top = base;
         lua_assert(base != 0);
     }

For me the linting warnings emitted by C compilers are correct, meaning that you need to fix it because of the conditional side-effect of the assignment.