File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -180,10 +180,15 @@ class PerformanceTest: ParsableCommand {
180
180
181
181
let start = Date ( )
182
182
let startInstructions = getInstructionsExecuted ( )
183
- for _ in 0 ..< self . iterations {
183
+ let parseTransition = IncrementalParseTransition ( )
184
+ var previousTreeDict : [ Data : SourceFileSyntax ] = [ : ]
185
+ for iter in 0 ..< self . iterations {
184
186
for file in files {
187
+ if iter != 0 {
188
+ parseTransition. setupTransition ( tree: previousTreeDict [ file] !, edits: ConcurrentEdits ( fromSequential: [ ] ) )
189
+ }
185
190
file. withUnsafeBytes { buf in
186
- _ = Parser . parse ( source: buf. bindMemory ( to: UInt8 . self) )
191
+ previousTreeDict [ file ] = Parser . parse ( source: buf. bindMemory ( to: UInt8 . self) , parseTransition : parseTransition )
187
192
}
188
193
}
189
194
}
You can’t perform that action at this time.
0 commit comments