[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [PATCH] Jump Tables for Switch/Case and Computed Goto
- From: "Liam Devine" <liamdevine@...>
- Date: Tue, 06 May 2014 08:55:40 +0100
On 06/05/14 05:47, Dirk Laurie wrote:
>
> 2014-05-06 3:26 GMT+02:00 Paige DePol <lual@serfnet.org>:
>
>> This patch is exciting as it adds a new feature to Lua; Jump Tables,
>> this addition then allows for two new features; Switch/Case and Computed
>> Goto. This patch does add a new opcode, OP_JMPTBL, so it will not be
>> bytecode compatible with unpatched versions of Lua.
>>
>> Additionally the patch adds two additional features, which are related to
>> Jump Tables in that they all use the new `continue` keyword. The first
>> additional feature is a new shortcut if statement, the second is the
>> addition of `continue` as a loop flow control keyword.
>>
>> The patch is available via GitHub at the following address:
>>
>> https://github.com/FizzyPop/lua-patches/tree/master/joint-patches/jump-table%2Bif-shct%2Bcont-loop/
>
> Thanks for the good documentation.
>
> There is no patch to `lua.h`. When the executable is invoked,
> it still welcomes you with the same message that the unpatched
> Lua 5.3 does.
>
> The Wiki entry on patches [1] says: «If you apply a patch that changes
> the syntax or semantics of Lua, the resulting language should not be
> called "Lua".»
>
> This patch introduces six new keywords, two new composite symbols
> and a new VM instruction.
>
> That seems enough to justify a pretty dramatic name change, not
> merely something like Lua++. Maybe one of the larger moons of
> Jupiter or Saturn. Maybe even an asteroid.
>
> [1] <http://lua-users.org/wiki/LuaPowerPatches>
>
I would like to see the bytecode header changed as you have changed the
format, released it into the wild and it is not official.
--
Liam
Attachment:
signature.asc
Description: OpenPGP digital signature