viruscamp
viruscamp
## add struct `GenIterReturn` and macro `gen_iter_return!` to iterate over a generator and get the return value [`GenIterReturn`] can be converted from a [`Generator`](core::ops::Generator), `&mut GenIterReturn` can be used as...
_ENV may not be the first upval in 5.2 and 5.3 , pay attention to it when processing stripped code ``` lua local a local function c() a=a+1 return math.abs(a)...
Remove use of LOCAL(i) Get local name by reg and pc
``` lua do local z=function() return 1 end end do local function z() return 1 end end do local z=function() return z end end do local function z() return z...
test local var scope saved in locvars for 5.1 5.2 and 5.3
test case ``` lua function lt_const(a,b,c) b = a>3 b = 33 then b() end if not (a
see https://github.com/viruscamp/luadec/blob/master/test/error_nested_if/doreturnend2.lua ``` if a then else if b then c=0 end end ``` LuaTool passed the test
处理if,由简单开始,可能是ast引入的新问题 -- DECOMPILER ERROR: 7 unprocessed JMP targets https://github.com/viruscamp/luadec/tree/master/test/error_nested_if/logic/if.lua https://github.com/viruscamp/luadec/tree/master/test/error_nested_if/logic/if_error.lua https://github.com/viruscamp/luadec/tree/master/test/error_nested_if/logic/if_all.lua
单独的 OP_JMP 跳到 OP_LOADBOOL 且 sbc=2 时,与 #1 相关 在 ProcessCode case:OP_JMP 到下列分支 ``` c } else if (sbc == 2 && GET_OPCODE(code[pc+2]) == OP_LOADBOOL) { ``` 测试代码 ``` lua...
单独的 OP_JMP 跳到 OP_LOADBOOL 时,与 #1 相关 在 ProcessCode case:OP_JMP 到下列分支 ``` c processing OP_JMP to } else if (GET_OPCODE(idest) == OP_LOADBOOL) { ``` 基本确认这是错误的处理方法 测试代码 ``` lua local upv0...