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.
This fixes: #3866 -- Internal compiler error when creating Portable PDB files for source files with very long lines
I'm still not sure this is really a bug, the very long lines in question are over 700000 characters long ... which is indeed very long.
However, the issue ultimately was caused by the range constructor during typechecking at the start of the compilation, it ends up creating invalid pdbdata at the end of the compilation.
Anyway, this PR proposes a change in the range encoding:
Currently, it allows:
File identifiers: 0 - 2^24 --- 16,777,216
Columns: 0 - 2^20 --- 1,048,576
Lines: 0 - 2^31 --- 2,147,483,648
This PR steals 4 bits from file ids reducing a compilation to only: 1,048,576 and gives 2 to each of start column and end column giving: 4,194,304
Anyway, I will spend a bit of time determining whether:
Whether there is any unintentional or at least unforseen consequences to columns being bit stealers.