[Tarantool-patches] [PATCH luajit 18/19] DynASM/MIPS: Fix shadowed variable.
Maxim Kokryashkin
m.kokryashkin at tarantool.org
Wed Aug 16 12:03:12 MSK 2023
Hi, Sergey!
Thanks for the patch!
LGTM, except for the single typo in the commit message.
On Wed, Aug 09, 2023 at 06:36:07PM +0300, Sergey Kaplun via Tarantool-patches wrote:
> From: Mike Pall <mike>
>
> Cleanup only, bug cannot trigger.
> Thanks to Domingo Alvarez Duarte.
>
> (cherry-picked from commit 5c911998a3c85d024a8006feafc68d0b4c962fd8)
>
> This patch fixes local shadow variable `n` in `template__` function from
Typo: s/local/the local/
> <dynasm/dasm_mips.lua> by renaming it to `m`. Since this cannot be
> triggered, there is no test provided.
>
> Sergey Kaplun:
> * added the description for the problem
> ---
> dynasm/dasm_mips.lua | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/dynasm/dasm_mips.lua b/dynasm/dasm_mips.lua
> index 78a4e34a..bd2a2b43 100644
> --- a/dynasm/dasm_mips.lua
> +++ b/dynasm/dasm_mips.lua
> @@ -809,9 +809,9 @@ map_op[".template__"] = function(params, template, nparams)
> elseif p == "X" then
> op = op + parse_index(params[n]); n = n + 1
> elseif p == "B" or p == "J" then
> - local mode, n, s = parse_label(params[n], false)
> - if p == "B" then n = n + 2048 end
> - waction("REL_"..mode, n, s, 1)
> + local mode, m, s = parse_label(params[n], false)
> + if p == "B" then m = m + 2048 end
> + waction("REL_"..mode, m, s, 1)
> n = n + 1
> elseif p == "A" then
> op = op + parse_imm(params[n], 5, 6, 0, false); n = n + 1
> --
> 2.41.0
>
More information about the Tarantool-patches
mailing list