-
Notifications
You must be signed in to change notification settings - Fork 1.1k
ReadPositions when unpickling a coord of a symbol #8987
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
Conversation
@@ -531,7 +531,7 @@ class TreeUnpickler(reader: TastyReader, | |||
def complete(denot: SymDenotation)(implicit ctx: Context) = | |||
denot.info = typeReader.readType() | |||
} | |||
val sym = ctx.newSymbol(ctx.owner, name, Flags.Case, completer, coord = coordAt(start)) | |||
val sym = ctx.newSymbol(ctx.owner, name, Flags.Case, completer, coord = coordAt(start)(ctx.addMode(Mode.ReadPositions))) |
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.
addMode
is somewhat expensive since it will require making a copy of the Context if the mode isn't already present. Maybe coordAt
should have an extra parameter to force reading the position even if ReadPosition isn't set. I think we should discuss the purpose of ReadPosition in the next meeting because I don't recall the details.
test performance please |
performance test scheduled: 1 job(s) in queue, 0 running. |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/8987/ to see the changes. Benchmarks is based on merging with master (9450bf2) |
how about putting a method in Context that is true if |
More direct: If |
Enabling ReadPositions in Compiler.newRun also triggered correctly the sourcePathAt in TreeUnpickler, which then exposed the same semanticdb bugs fixed in #8983 , so I'll implement the change there |
pre requisite for #8983