[CFE] Don't call enableNative when creating BodyBuilderImpl - we never use the field anyway

When compiling a big internal app this reduces the wall-clock time from
`2m21.756s` to `1m43.671s`.

Change-Id: I0e89c0c41fe59d2fb3541a50c8c7e2963b0bff47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/501461
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This commit is contained in:
Jens Johansen
2026-05-08 03:06:34 -07:00
committed by dart-scoped@luci-project-accounts.iam.gserviceaccount.com
parent 07d8325735
commit b511694fab
@@ -189,8 +189,6 @@ class BodyBuilderImpl extends StackListenerImpl
final LocalScope enclosingScope;
final bool enableNative;
// TODO(ahe): Consider renaming [uri] to 'partUri'.
@override
final Uri uri;
@@ -372,9 +370,6 @@ class BodyBuilderImpl extends StackListenerImpl
required this.extensionScope,
required ThisVariable? internalThisVariable,
}) : _context = context,
enableNative = libraryBuilder.loader.target.backendTarget.enableNative(
libraryBuilder.importUri,
),
benchmarker = libraryBuilder.loader.target.benchmarker,
_localScopes = new LocalStack([enclosingScope]),
_labelScopes = new LocalStack([new LabelScopeImpl()]),