Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SETLIST without active table #80

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

half-duplex
Copy link

Attempt to fix failures decompiling SETLIST instructions without an active table.

$ cat test.lua
local foo = {0}
print() -- to prevent optimizing to nothing
$ luac5.1 -s test.lua
$ luadec luac.out
cannot find blockend > 5 , pc = 4, f->sizecode = 6
cannot find blockend > 6 , pc = 5, f->sizecode = 6
-- Decompiled using luadec 2.2 rev: 895d923 for Lua 5.1 from https://github.com/viruscamp/luadec
-- Command line: luac.out

-- params : ...
-- function num : 0
local l_0_0 = {}
-- DECOMPILER ERROR at PC2: No list found for R0 , SetList fails

-- DECOMPILER ERROR at PC3: Overwrote pending register: R1 in 'AssignReg'

;
(0)()

I'm not sure what lua code the original decompiler code was built to handle, so I have little confidence I did not break that.

Previously failed on e.g. `print({0})` in `luac5.1 -s`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant