This commit was generated by the following steps:
- Manually change the SDK constraint in `pkg/front_end/pubspec.yaml`
- Run `gclient sync`
- Run `find pkg/front_end/benchmarks pkg/front_end/lib
pkg/front_end/presubmit_helper.dart
pkg/front_end/presubmit_helper_spawn.dart pkg/front_end/test
pkg/front_end/tool -iname '*.dart' | xargs
tools/sdks/dart-sdk/bin/dart format`
- Manually fix remaining long lines and add dead code ignore comments.
- Fix coverage by running `dart --enable-asserts
pkg/front_end/test/coverage_suite.dart --tasks=5
--add-and-remove-comments`
- Fix `pkg/front_end/test/coverage_merger/assert_message_auto_ignored`
by running `dart pkg/front_end/test/unit_test_suites.dart -p
pkg/front_end/test/coverage_merger/assert_message_auto_ignored
-DupdateExpectations=true`
The diff is large because the version bump causes the formatter to
switch into "tall mode".
Change-Id: I6a6a696410da8b168060acfe0e4d6e91e294c4f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/447628
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
This remove the iterators from the NameSpace interface and instead
collects the list of builders belonging to a library or declaration
directly inside these builders.
Adds ComputedNameSpace for import, export and prefix name spaces. This
allows for replacing a member and has a filteredIterator function. These name spaces are computed from import/exports and therefore need to be iterated through directly and replace builder when two builders collide.
Change-Id: Iec974656c5331498aa1cfca7973300ac6e044994
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/428820
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
This remove part of the NameSpace to avoid an overreliance on its implementation. This is done in preparation for hold the name space content in a single map instead of a separate map for getables and setables.
The NamedBuilder interfaces is added to use for Builders that can be mapped in name spaces. This avoids the need for the NameIterator and all the associated methods.
Change-Id: Ia547bdc8ddcb83f47473b51a2059428b352f8916
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/428001
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Augmentations no longer have the own Builder objects so the origin and isAugmenting properties can be removed from Builder.
Lookup functions have been cleaned up accordingly.
Change-Id: Ib872d88d400906ef3ada5f7ec7cb2fb81f8ef4ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416961
Reviewed-by: Jens Johansen <jensj@google.com>
This removes the SourceProcedureBuilder. This is achieved by adding SyntheticMethodBuilder for creating synthesized methods, currently only used for `_enumToString` in enums, changin the creation of Expression for expression compilation to avoid the need for a SourceMemberBuilder.
Change-Id: I81fe891ec26a979b04e6cdd4c2b906bd945d4bde
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400980
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
The implementation for generating symbolic language markers only
handled language versions in the data but not in the code itself.
This fixes this by doing post processing on the whole file instead
of the individual annotations.
Change-Id: I451e39a40a6f1616cbd2ae70550091c19c85fa10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/365220
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Scope.forEach iterates through the builder immediately mapped in the
scope. For duplicate declarations, this means that it'll give direct access to the last defined declaration and not to the first defined
declaration, which is inconsistent with how we generally handle
duplications. It also doesn't skip builders that are not "owned" by
the scope but merely accessible, which means that we easily have
duplicate handling of patches and augmentations which are part of
both the scope in which the were declared and the scope of the origin.
To normalize the handle of scope, this CL removes Scope.forEach
with iterators that explicit filter what subset of the builder
that we want to have access to. This prepares for the more complex
scope introduced by the augmentation libraries in which all
scopes have access to all declarations from the origin library as
well as other augmentation libraries.
Change-Id: I88bdfb1068fbb4eb9dd6fa3881b86a61104e50e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255240
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
This CL add support for introspecting members added in Phase 2 from
one macro application to the next.
Included is a refactoring of the class/member patching where the
origin now owns the patches similar to how library patching now
works.
Change-Id: Ifdf03461d66be3f5a5df4b5bdb1e3da9f4cfd688
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233462
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
This change adds a SourceMemberBuilderImpl subclass to MemberBuilderImpl
that use common only to SourceMemberBuilders. This allows moving methods
to the SourceMemberBuilder interface and let the
SyntheticConstructorBuilder, and the newly added
_RedirectingConstructorsFieldBuilder implements SourceMemberBuilder.
Change-Id: I1c98a61482bda3bea5be95124f34b9c4501e9333
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225726
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
This CL enables the avoid_void_async lint in the CFE, makes the needed
changes and adds the missing `await` (because the lint
`unawaited_futures` doesn't react to void async methods).
Change-Id: Iffc1f173badd3c2d48356ee02e81a9aed492ce5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213481
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
In each library where an import is removed, the library uses some elements
provided by the import, BUT there is another import which provides all of the
same elements, and at least one more which the library uses.
In this change, we remove the imports which can be simply removed in favor of
the other already present imports.
See https://github.com/dart-lang/sdk/issues/44569 for more information.
Change-Id: Iea21ddba3f26637a244437911730253e4c6f22dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199460
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Even when non-nullable is enabled by default, enabling the experiment
explicitly should result in the experiment release version (and not
the experiment enabled version) to be used for opting in.
For this change, the semantics of parseExperimentalFlags was change
to _not_ normalize the flags to a full mapping including default values.
For this reason all uses of such maps are renamed to
'explicitExperimentalFlags'.
Closes#43879
Change-Id: I0d0262e68ec1403549abcfd305ae3a4404fe93e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168654
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
This CL embeds the sdk_nnbd/lib/_internal/allowed_experiments.json
into the CFE and uses this to allow experiments enabled on a
per library basis. The file is embedded through generated code to
avoid reliance on access to the file itself.
A presubmit check is also added to ensure that the json file and
the generated code are in sync.
This work is in preparation for https://github.com/dart-lang/sdk/issues/41538
Change-Id: Ic03c0fc69684d124c685f2fe6e80423a7e751530
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149064
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>