Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add name section and object symbol table support to emsymbolizer #21367
Add name section and object symbol table support to emsymbolizer #21367
Changes from 1 commit
7fd1614
95c8b8f
53571cb
3158e60
420f5a4
3293dc5
2d3a457
1912780
3469517
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I've been trying to avoid these single line if/else statements in emscripten because they often do more then one thing per line.
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.
Fixed. Although I don't really think it's an improvement in this case, since one of the arms is just a 0.
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.
Is there some way you could split this test up or @parameterize it?
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.
All the tests except the last one I added in this PR share the results of the get_addr calls, which means that if we did that, we'd run objdump more times and do more work overall. Would that be worth it?
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.
I don't have any great ideas about how to simplify, but this test is IMHO way to long already and can fail in way to many ways.
I just tried to read and understand what was going in this test and found it pretty hard to figure out what was even going on. Perhaps we can find some way to refactor in the future?
I guess in normal python unittest setup you would make emsymbiler test into its own class with a setUpClass method.. but that doesn't really work with the way we run out tests.
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.
I actually realized that llvm-symbolizer doesn't work correctly for object file symbol tables, so I removed the test for that (that was 5). I split the tests using exact source locations apart from the ones using functions only (currently it's just the name section one, but if we fix object files, it would go there too). There's a little duplication, but tests are a little simpler.
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.
?
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.
I guess this was intended to mean that DWARF has the inlining info, and shows bar, but name section doesn't I made it more claer.