-
Notifications
You must be signed in to change notification settings - Fork 807
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
Make it possible to track the original text range #18387
Conversation
❗ Release notes required
|
I had considered exactly this for #18049 - it would simplify that work considerably. And the current |
[<System.Diagnostics.DebuggerDisplay("{OriginalRange} -> ({StartLine},{StartColumn}-{EndLine},{EndColumn}) {ShortFileName} -> {DebugCode}")>] | ||
type Range private (code1: int64, code2: int64, originalRange: struct (int64 * int64) voption) = |
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.
This is more than doubling the size of a very low-level structure used throughout most representations used in the compiler.
Considering #line
a rather edge feature targeting code generators, I don't see this increase well justified.
Given the #line
feature usage, I would rather sacrifice UX when #line is encountered at the referenced feature.
I think the approached you ended up at #18049 makes the right compromise - the only size/perf hit is when |
Ok, I see it. I will close this and revert it from #17519. |
Description
Make it possible to track the original text range after
#line
directive supplied.Used to support #17519
Checklist