Commit d458cf0
committed
Fix #11885: Always clone trees if position already set
The cause of the problem is that we use parallelism in Pickler:
if !Pickler.ParallelPickling || ctx.settings.YtestPickler.value then force()
Sometimes on Windows, the futures run a little slower, and the later
phase `Inlining` can change the positions of the trees to be pickled,
thus non-determinism.
For the Dotty project, the statistics is as follows:
- Before: ntrees = 5331539
- After: ntrees = 5334075
Performance-wise, this should be better than synchronizing the pickling tasks.1 parent e2e77b5 commit d458cf0
File tree
2 files changed
+6
-8
lines changed- compiler
- src/dotty/tools/dotc/ast
- test/dotty/tools/dotc
2 files changed
+6
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
70 | | - | |
| 68 | + | |
| 69 | + | |
71 | 70 | | |
72 | | - | |
73 | | - | |
| 71 | + | |
| 72 | + | |
74 | 73 | | |
75 | 74 | | |
76 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
| 21 | + | |
| 22 | + | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| |||
0 commit comments