Skip to content

Commit 0de52e8

Browse files
scheglovCommit Queue
authored andcommitted
Fine. Add internal _firstFragment getter to avoid API tracking
Previously, internal analyzer logic that accessed element properties would would require `globalResultRequirements.includedInId()` wrapper to avoid inadvertently trigger opaque API usage tracking. This created unnecessary overhead for internal operations. This change introduces a new internal `_firstFragment` getter on `ElementImpl` and its subclasses. Element properties that are used internally are updated to access data directly through `_firstFragment`, bypassing the API tracking wrapper. The existing `firstFragment` field in most element implementations has been renamed to `_firstFragment`, and a new public getter is provided to maintain the public API. As part of this refactoring, `MultiplyDefinedFragmentImpl` is also updated to extend `FragmentImpl` for consistency. Change-Id: I391d64fa3dd24451acefe37d8bc100fdfe88be4a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/445782 Commit-Queue: Konstantin Shcheglov <[email protected]> Reviewed-by: Paul Berry <[email protected]>
1 parent 0db0c48 commit 0de52e8

File tree

1 file changed

+390
-293
lines changed

1 file changed

+390
-293
lines changed

0 commit comments

Comments
 (0)