Commit aba0c5f
committed
go/callgraph/vta: optimize scc type initialization
During type propagation, initial types for an scc are two times stored
to a map: once they are computed and the second time when they are saved
to the type set of the scc. This CL ensures only one traversal is done.
Change-Id: I7f6babae6a1130721c467e33da4f2d23462116d6
Reviewed-on: https://go-review.googlesource.com/c/tools/+/350160
Run-TryBot: Zvonimir Pavlinovic <zpavlinovic@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Tim King <taking@google.com>
Trust: Zvonimir Pavlinovic <zpavlinovic@google.com>1 parent 1a7ca93 commit aba0c5f
1 file changed
+10
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | 121 | | |
128 | 122 | | |
129 | 123 | | |
130 | 124 | | |
131 | 125 | | |
132 | 126 | | |
133 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
134 | 135 | | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
| 136 | + | |
| 137 | + | |
140 | 138 | | |
141 | | - | |
| 139 | + | |
142 | 140 | | |
143 | 141 | | |
144 | 142 | | |
145 | 143 | | |
146 | 144 | | |
147 | 145 | | |
148 | 146 | | |
149 | | - | |
150 | 147 | | |
151 | 148 | | |
152 | 149 | | |
| |||
0 commit comments