[Date Prev][Date Next][Thread Prev][Thread Next]
- 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 <email@example.com>:
>> 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:
> 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  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.
>  <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.
Description: OpenPGP digital signature