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

Does not work on Lua 5.3 #6

Open
Quenty opened this issue Nov 6, 2015 · 0 comments
Open

Does not work on Lua 5.3 #6

Quenty opened this issue Nov 6, 2015 · 0 comments

Comments

@Quenty
Copy link

Quenty commented Nov 6, 2015

It looks like Lua 5.3's bytecode read out is a bit different, so Lua Lint does not parse if the compiler is Lua 5.3

You'll notice, for example, that SETGLOBAL and GETGLOBAL are now GETTABUP and SETTABUP on the _ENV table. Other changes like that need to be considered for Lua Lint to work.

0+ params, 5 slots, 1 upvalue, 3 locals, 12 constants, 1 function
        1       [1]     LOADNIL         0 0
        2       [2]     CLOSURE         1 0     ; 0x233a760
        3       [3]     GETTABUP        2 0 -1  ; _ENV "os"
        4       [3]     GETTABLE        2 2 -2  ; "getenv"
        5       [3]     LOADK           3 -3    ; "HOME"
        6       [3]     CALL            2 2 2
        7       [3]     TEST            2 1
        8       [3]     JMP             0 3     ; to 12
        9       [4]     SETTABUP        0 -4 -5 ; _ENV "realy_aborting" true
        10      [5]     GETTABUP        2 0 -6  ; _ENV "abortt"
        11      [5]     CALL            2 1 1
        12      [8]     GETTABUP        2 0 -7  ; _ENV "print"
        13      [8]     GETTABUP        3 0 -8  ; _ENV "x"
        14      [8]     GETTABLE        3 3 -9  ; "n"
        15      [8]     CALL            2 2 1
        16      [9]     LOADK           2 -10   ; 25
        17      [10]    GETTABUP        3 0 -7  ; _ENV "print"
        18      [10]    LOADK           4 -11   ; "Done"
        19      [10]    CALL            3 2 1
        20      [11]    GETTABUP        3 0 -12 ; _ENV "sdf"
        21      [11]    ADD             2 2 3
        22      [11]    RETURN          0 1
SimonHeimberg added a commit to SimonHeimberg/lualint that referenced this issue Jun 30, 2023
It runs with newer lua,
but maybe not everything runs correctly

improves philips#6
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

No branches or pull requests

1 participant