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 {
180180
181181 let start = Date ( )
182182 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 {
184186 for file in files {
187+ if iter != 0 {
188+ parseTransition. setupTransition ( tree: previousTreeDict [ file] !, edits: ConcurrentEdits ( fromSequential: [ ] ) )
189+ }
185190 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 )
187192 }
188193 }
189194 }
You can’t perform that action at this time.
0 commit comments