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

Add spans via metadata to IR. #808

Merged
merged 4 commits into from
Feb 22, 2022
Merged

Add spans via metadata to IR. #808

merged 4 commits into from
Feb 22, 2022

Conversation

otrho
Copy link
Contributor

@otrho otrho commented Feb 17, 2022

This is 95% to where I'd like it to be. There's #795 and #801 which will change how we work with spans, but they're semi-blocked by the new parser (I don't want to have to do it twice). If we take the source out of Span as #795 suggests then the metadata can be simplified.

There are a few changes in the IR -> ASM here which are doing a bunch of calculations for memory allocations for aggregates which I'd like to see simplified by addressing #738.

Closes #718.

Two types are supported now:
- a `filepath` referencing a Sway file.
- a `span` which references a `filepath` and has start and end indices.
When compiling from AST to IR they are generated, and when compiling
from IR to ASM they are referenced.
@otrho otrho added enhancement New feature or request compiler General compiler. Should eventually become more specific as the issue is triaged compiler: ir IRgen and sway-ir including optimization passes labels Feb 17, 2022
@otrho otrho self-assigned this Feb 17, 2022
Copy link
Contributor

@emilyaherbert emilyaherbert left a comment

Choose a reason for hiding this comment

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

LGTM

@otrho otrho merged commit 7a45c38 into master Feb 22, 2022
@otrho otrho deleted the otrho/add_spans_to_ir branch February 22, 2022 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler: ir IRgen and sway-ir including optimization passes compiler General compiler. Should eventually become more specific as the issue is triaged enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Put proper Spans into the IR pipeline.
2 participants