luac-parser-rs icon indicating copy to clipboard operation
luac-parser-rs copied to clipboard

Broken slot operation inlining side effect tracking

Open toxamin opened this issue 2 years ago • 0 comments

When given the following script:

local saved_value
local new_value = somefunc()
local to_ret = new_value - saved_value
saved_value = new_value
return to_ret

Metaworm's luadec incorrectly inlines the SUB to the return, as follows:

local r0_0 = nil
local r1_0 = somefunc()
r0_0 = r1_0
return r1_0 - r0_0

toxamin avatar Oct 13 '23 12:10 toxamin