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

write: improve high level API #382

Merged
merged 9 commits into from
Feb 11, 2019
Merged

write: improve high level API #382

merged 9 commits into from
Feb 11, 2019

Conversation

philipc
Copy link
Collaborator

@philipc philipc commented Feb 9, 2019

Notably, there is now Dwarf (for multiple units) and DwarfUnit (for single units), and we write to Sections. Also LineProgramTable is gone.

Every unit should have at most one line program, so manage it there.
This will always be set when writing, so make that case more convenient.
It's only when converting that we may not have a line program. For that
case, we create a placeholder and ensure we never succeed in writing it.
We will eventually use this for other unit types too.
Since we already automatically decide with to write the line program,
we have to do the same with the attribute that references it.
@coveralls
Copy link

coveralls commented Feb 9, 2019

Coverage Status

Coverage increased (+0.03%) to 86.568% when pulling fd7c3c2 on philipc:write-unit into 955c33e on gimli-rs:master.

@philipc philipc requested a review from fitzgen February 9, 2019 14:58
Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks, as always, for the nicely split up commits!

src/write/line.rs Outdated Show resolved Hide resolved
@philipc philipc merged commit 1278ccb into gimli-rs:master Feb 11, 2019
@philipc philipc deleted the write-unit branch February 11, 2019 07:00
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.

4 participants