mirror of
https://github.com/dart-lang/sdk
synced 2024-10-06 14:07:57 +00:00
Macro. Reuse parsed unit when merging macro results.
This saves another 160 ms. Bug: https://github.com/dart-lang/sdk/issues/55784 Change-Id: If626d616999b85edaaa4028cbe5fc70fbc1bf86a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372960 Commit-Queue: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
parent
ef1ec76054
commit
08b50825c4
|
@ -579,15 +579,11 @@ class LibraryBuilder with MacroApplicationsContainer {
|
|||
var importedAugmentation = importState.importedAugmentation!;
|
||||
var importedFile = importedAugmentation.file;
|
||||
|
||||
var unitNode = performance.run(
|
||||
'importedFile.parse()',
|
||||
(performance) {
|
||||
performance.getDataInt('length').add(importedFile.content.length);
|
||||
return importedFile.parse(
|
||||
performance: performance,
|
||||
);
|
||||
},
|
||||
var importedFileParsed = importedFile.getParsed(
|
||||
performance: performance,
|
||||
);
|
||||
var unitNode = importedFileParsed.unit;
|
||||
|
||||
var unitElement = CompilationUnitElementImpl(
|
||||
source: importedFile.source,
|
||||
librarySource: importedFile.source,
|
||||
|
|
Loading…
Reference in a new issue