Skip to content

Commit f041e44

Browse files
Dave Luciadavydog187
authored andcommitted
chore: Fix formatter issues
1 parent b106a45 commit f041e44

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

lib/lua/vm/executor.ex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ defmodule Lua.VM.Executor do
796796

797797
{result, new_state} =
798798
try_binary_metamethod("__band", val_a, val_b, state, fn ->
799-
Bitwise.band(to_integer!(val_a), to_integer!(val_b)) |> to_signed_int64()
799+
val_a |> to_integer!() |> Bitwise.band(to_integer!(val_b)) |> to_signed_int64()
800800
end)
801801

802802
regs = put_elem(regs, dest, result)
@@ -809,7 +809,7 @@ defmodule Lua.VM.Executor do
809809

810810
{result, new_state} =
811811
try_binary_metamethod("__bor", val_a, val_b, state, fn ->
812-
Bitwise.bor(to_integer!(val_a), to_integer!(val_b)) |> to_signed_int64()
812+
val_a |> to_integer!() |> Bitwise.bor(to_integer!(val_b)) |> to_signed_int64()
813813
end)
814814

815815
regs = put_elem(regs, dest, result)
@@ -822,7 +822,7 @@ defmodule Lua.VM.Executor do
822822

823823
{result, new_state} =
824824
try_binary_metamethod("__bxor", val_a, val_b, state, fn ->
825-
Bitwise.bxor(to_integer!(val_a), to_integer!(val_b)) |> to_signed_int64()
825+
val_a |> to_integer!() |> Bitwise.bxor(to_integer!(val_b)) |> to_signed_int64()
826826
end)
827827

828828
regs = put_elem(regs, dest, result)
@@ -860,7 +860,7 @@ defmodule Lua.VM.Executor do
860860

861861
{result, new_state} =
862862
try_unary_metamethod("__bnot", val, state, fn ->
863-
Bitwise.bnot(to_integer!(val)) |> to_signed_int64()
863+
val |> to_integer!() |> Bitwise.bnot() |> to_signed_int64()
864864
end)
865865

866866
regs = put_elem(regs, dest, result)
@@ -1752,7 +1752,7 @@ defmodule Lua.VM.Executor do
17521752
defp lua_shift_left(val, shift) when shift < 0, do: lua_shift_right(val, -shift)
17531753

17541754
defp lua_shift_left(val, shift) do
1755-
Bitwise.bsl(val, shift) |> to_signed_int64()
1755+
val |> Bitwise.bsl(shift) |> to_signed_int64()
17561756
end
17571757

17581758
defp lua_shift_right(_val, shift) when shift >= 64, do: 0
@@ -1762,7 +1762,7 @@ defmodule Lua.VM.Executor do
17621762
defp lua_shift_right(val, shift) do
17631763
# Unsigned right shift - mask to 64-bit unsigned first
17641764
unsigned_val = Bitwise.band(val, 0xFFFFFFFFFFFFFFFF)
1765-
Bitwise.bsr(unsigned_val, shift) |> to_signed_int64()
1765+
unsigned_val |> Bitwise.bsr(shift) |> to_signed_int64()
17661766
end
17671767

17681768
# Wrap an arbitrary-precision integer to a signed 64-bit integer

0 commit comments

Comments
 (0)