Add the --fatal-lints flag so that lints will fail on the bots.
Change-Id: I25e1dab6de9a0cc92d2e9437bef2582f35891352
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103160
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Working towards turning on all lints from package:pedantic. This change includes
the lints that needed cleanup and don't change any behavior.
Applied cleanup:
* Don't explicitly initialize variables to null.
* DO use curly braces for all flow control structures.
* Use `.isEmpty` instead of `.length == 0`.
* Use `.isNotEmpty` instead of `.length > 0` or `! .isEmpty`.
* Use `=` to separate a named parameter from its default value.
The remaining lints from package:pedantic will require cleanup that is less
automatic and will be addressed in later changes.
Change-Id: Ie4c3ba685f8a559209dd14ac037203ecd16252c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103086
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Some changes in indentation for adjacent string literals and a case of
formatting inside string interpolation.
Change-Id: I30eb9b9e891a11a54f89351e0f2d4c0172e69066
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103161
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
These aren't useful to see cluttering up diagnostic lists - they can be
found easily enough in other ways.
Change-Id: I34b800c1145ae476822afddff558d62c4ffb9b2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103141
Reviewed-by: Mark Zhou <markzipan@google.com>
Type propagator adds Redefinition instructions to provide more accurate
type information only for dominated uses (for example, to mark receiver
as non-nullable after instance calls). However, adding Redefinition
instructions may interfere with branch simplification, which looks only
at empty join blocks. This change avoids adding unused Redefinition
instructions (if there are no dominated uses).
This particular situation happens in Flutter in RenderObject.layout() where
constraints.isTight is inlined with multiple polymorphic targets, including
SliverConstraints.isTight which returns false.
Branch simplification was not happening due to Redefinition instruction
for 'constraints'. That Redefinition instruction is not used.
Change-Id: I15082bacd7cc6ea1445a4dadc8ef97853142ba74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103023
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Previously 36% of overrides were annotated, including inconsistent
annotations within a single class.
- Add annotations on remaining overridden methods.
- Add linter section to `analysis_options.yaml` so that missing
annotations are visible while editing.
Change-Id: Ief1a6d5b8da6f4b630a6cfc72a6ed67db346c081
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103140
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
When a mixin class is created, there might be anonymous closures copied over to the other script.
Previously the script of closure function is the script of its parent function, which is not true in that case.
The solution is to create a patch class as the owner if parent function has a different script object. Return script of owner when query for script of closure function.
Bug: https://github.com/dart-lang/sdk/issues/34841
Change-Id: I53065cbf13f2d0dc8da320993fd3cd425e5c9714
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102226
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
The tests were taking more than an hour on two of the shards, and timing out.
Change-Id: I1d242f827b50d2b9a3ddef705f8a54ee061bc101
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103120
Reviewed-by: Alexander Thomas <athom@google.com>
The serialization/deserialization is performed in test-mode.
Change-Id: I90f31a6a88dbdf2c38beb9b5409ce3c52557e227
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102740
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Note, that this will start building it always, regardless of the
state of the useSummary2 flag.
Summary1: 4892680 bytes.
Summary2: 7105744 bytes.
Both: 10748992 bytes.
Time:
Summary1: 2550 ms.
Summary2: 2750 ms.
Both: 4000 ms.
Change-Id: If81367c24654c1d57a4dcdbd42f76d80ae8c4b39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102540
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
It doesn't work to make TypeParameterElement.type choose
nullability/non-nullability based on the enclosing library, because
for type parameters of synthetic function types, there is no enclosing
library.
Change-Id: Ic74cc639534e3c03f3c46e7eacfb5655ca74019a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102981
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Previously we would generate the prologue in FunctionEntryInstr or OsrEntryInstr
on X64/ARM, and in CompileGraph on ARM64/IA32/DBC. This caused a confusing asymmetry
in the code.
Now we generate it in FunctionEntryInstr/OsrEntryInstr on all backends.
Partially addresses dartbug.com/34162.
This also fixes a regression on a protobuf benchmark due to ICDatas not being saved.
Change-Id: Ie270d759234b197141025dde07a27546d221f6c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101297
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
1. Read GenericFunctionType fully, but in two steps to avoid recursion.
We need to read it fully, because it might be a part of a const
initializer, so the client might request the initializer expression,
and there is no way to him to finish reading. Amnd in general, we
don't read expressions lazily.
2. For consistency we need to set identifiers for all GenericFunctionType
nodes that we want to store. So, DeclarationResolver should be updated
to move the identifier number even though we don't use the same
mechanism for building elements ininitializers, as we use for type
annotations outside expressions.
R=brianwilkerson@google.com
Change-Id: I58faa5408bff5250a8c775249438def7f742594b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102840
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
At this time this only compiles to .dill and then compiles from multiple modular
dill files.
Next steps: add the global split and add the modular data bits
Change-Id: I3399776dbd5187ddb0a3e2fdd307622a736570c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102126
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
package import uris
THis is not actively used in the loader unit tests yet, but will be in the
dart2js pipeline.
Change-Id: Ie0db6243c735e2fba396f2a5a156d52ea1e53bbe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102125
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Rethrow should behave the same as throwing from debugger point of view. Thus, notify debugger for possibly pausing on exceptions.
Bug: https://github.com/dart-lang/sdk/issues/36907
Change-Id: I84886fd8f3e1c579f60802aadb9fdaa4e076b6c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102681
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
This CL revises the scanner API so that tokens are always prepended
to the beginning of the token stream. This allows the parser handling
of error tokens to be simplified. Any clients using the scanner directly
rather than through the scanner API should call scannerRecovery
if the scanner has detected errors in the content.
Change-Id: I32510da10205bd964f80898a238489d1508733e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
This frame is already filtered from the trie, so this will make behavior
consistent.
Change-Id: I9283a6ef170b725f739d91795fbb81cf7d902470
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102103
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Remove the optimization function stub and self function from the constant pool of every unoptimized function.
Remove one PP move from unoptimized frame entry.
Bug: https://github.com/dart-lang/sdk/issues/36409
Change-Id: Idbe37ce36b57dc316a131e6c83742ee2b3df4a0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102660
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
* Remove all `&& $strong` clauses.
* Delete all sections that include a `&& !$strong` clause.
Change-Id: Idd32cf5623793e3f98e3e998025bac079d88e2f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102223
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>