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

feature: add an option L to show opcode with lineinfo. #9

Closed
wants to merge 2 commits into from

Conversation

doujiang24
Copy link
Member

so that we can use luajit -bL code.lua | grep -E 'G[GS]ET' in lua-releng.

@agentzh
Copy link
Member

agentzh commented Mar 12, 2017

@yangshuxin Mind to have a quick look at this? Thanks!

@yangshuxin
Copy link

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.

@@ -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

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.

@doujiang24
Copy link
Member Author

@yangshuxin Thanks for your review:) Fixed:)
I just followed the output style from luac -p -l file.lua.

@@ -617,6 +619,9 @@ local function docmd(...)
local opt = string.sub(a, m, m)
if opt == "l" then
list = true
elseif opt == "L" then
Copy link
Member

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?

@agentzh
Copy link
Member

agentzh commented Mar 13, 2017

@doujiang24 Merged with the fix for that indentation problem. Thanks!

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.

None yet

3 participants