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

core: Use SourceLocation (new name Span) over Span (new name ByteRange) to refer to locations #909

Merged
merged 9 commits into from
Jul 22, 2023

Conversation

feds01
Copy link
Contributor

@feds01 feds01 commented Jul 21, 2023

  • ast: Make AST spanless, and store Spans within SPAN_MAP
  • ast: Use RwLock and once_cell:sync::Lazy for SpanMap
  • lower: fix panic when trying to access numbered ADT fields
  • ast: Add AstNodeId to AstNodes, guaranteeing node lists have spans
  • ast+source: use SourceLocation over Span
  • ir+lower: switch to using AstNodeIds for spans instead of directly using spans
  • ir: add static size assertions
  • source: rename RowColSpan to RowColRange
  • source: rename Span to ByteRange
  • source: rename SourceLocation to Span
  • tir: allow AstInfo to have multiple items refer to the same AstNodeId

Todo:

@feds01 feds01 self-assigned this Jul 21, 2023
@feds01 feds01 added the core Relating to the core internals of the compiler. label Jul 21, 2023
@feds01 feds01 changed the title core: Use SourceLocation (new name Span) over Span to refer to locations core: Use SourceLocation (new name Span) over Span (new name ByteRange) to refer to locations Jul 21, 2023
compiler/hash-ir/src/ir.rs Outdated Show resolved Hide resolved
compiler/hash-lexer/src/lib.rs Show resolved Hide resolved
@feds01 feds01 merged commit 5f3af9e into main Jul 22, 2023
1 check passed
@feds01 feds01 deleted the source-location-to-span branch July 22, 2023 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Relating to the core internals of the compiler.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants