-
Notifications
You must be signed in to change notification settings - Fork 202
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
feature: add an option L
to show opcode with lineinfo.
#9
Conversation
@yangshuxin Mind to have a quick look at this? Thanks! |
In general LGTM. This change is pretty straightforward. There is an indention problem though(see the interleaving comment), please fix. Yes, Having line-no will make life easier. My own implementation of bc-dump is able to dump line-no as well. But it does not dump line-no for every single BC. It just print line-no at function entry and basic-block entry. |
src/jit/bcsave.lua
Outdated
@@ -617,6 +619,9 @@ local function docmd(...) | |||
local opt = string.sub(a, m, m) | |||
if opt == "l" then | |||
list = true | |||
elseif opt == "L" then | |||
list = true | |||
lineinfo = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In browser, these code does not seem to be indented properly.
@yangshuxin Thanks for your review:) Fixed:) |
@@ -617,6 +619,9 @@ local function docmd(...) | |||
local opt = string.sub(a, m, m) | |||
if opt == "l" then | |||
list = true | |||
elseif opt == "L" then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems there's still an indentation problem here?
@doujiang24 Merged with the fix for that indentation problem. Thanks! |
so that we can use
luajit -bL code.lua | grep -E 'G[GS]ET'
in lua-releng.