The whereType method silently does the wrong thing without methods,
so make it throw until we turn them on everywhere.
Change-Id: Id934c8bdb4f682dbc3560d78fbca580e37297e2d
Reviewed-on: https://dart-review.googlesource.com/45744
Reviewed-by: Nate Bosch <nbosch@google.com>
This change is needed before we turn on the CFE by default in dart2js.
R=whesse@google.com,athom@google.com
Change-Id: I2868d2dcef82d95456a56e809fe90e28dc698437
Reviewed-on: https://dart-review.googlesource.com/45640
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Add `typeArguments` to Invocation.
Add constructors to Invocation, making it less necessary for users to create their own implementations.
Add tests.
Add Symbol.unaryMinus and Symbol.empty constants.
Change-Id: I70cb3265f9413617cf57fce1297e393a29eeb26a
Reviewed-on: https://dart-review.googlesource.com/40741
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
This simplifies formatting and reporting logic.
Also move the noLength constant to fasta_codes.dart, where it more
rightly belongs. This avoids loads of bogus imports of the parser.
Change-Id: I2720df0e6ff627fba8f4bdd9ed03ee87bc0db0bd
Reviewed-on: https://dart-review.googlesource.com/44424
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
A reused type argument vector that is longer than necessary needs to be
shortened to the correct length upon type canonicalization.
The runtime call comparing two instance runtime types also needs to consider
reused vectors.
Add regression test.
Change-Id: Ib3b9620409b9cff313f270c4f3fb7051fecbb604
Reviewed-on: https://dart-review.googlesource.com/45340
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
This speeds up TFA on Flutter gallery:
Analysis time before change: 10131ms
Analysis time after change: 8041ms
Change-Id: I370cc3f1fefc87e5efc311b390e9a6a07dae4497
Reviewed-on: https://dart-review.googlesource.com/45360
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This CL adds all necessary support for analyzing types of named
parameters.
Also, optional positional parameters are analyzed more precisely:
default value is taken into account only if there is a call which omits
parameter.
Issue: https://github.com/dart-lang/sdk/issues/30480
Change-Id: I33ee68cfc736afb65ce561361975d67153af04a3
Reviewed-on: https://dart-review.googlesource.com/44883
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
file last time and I couldn't test this since it's on Windows. :-(
Change-Id: I8224bd2b97153a10f2e1b36197423c38364c2bcd
Reviewed-on: https://dart-review.googlesource.com/45542
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This 'almost typo' was preventing any setters from being inlined.
Change-Id: Idca5ba35df34f2328e3f926790e093ce02ac8863
Reviewed-on: https://dart-review.googlesource.com/45367
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
for as far back as I can see in the history.
Change-Id: I674143e5a7db29d5fe687c26acfc00b25ef0285e
Reviewed-on: https://dart-review.googlesource.com/45540
Reviewed-by: Alexander Thomas <athom@google.com>
The changes to the CQ bot should take effect immediately. The changes
to the other bots will take effect once those bots are switched over
to use the test matrix.
Change-Id: Ibfe59817a11f730fd1847cdc60b3244b4a71a480
Reviewed-on: https://dart-review.googlesource.com/45300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Previously, we were setting `expression` incorrectly after generating
the implicit tear-off of .call, so if an implicit downcast was needed
as well, it was not attached to the proper kernel node, and the
resulting kernel representation was invalid.
Addresses the front end manifestation of #32426.
Change-Id: Ibd86b75c54a53db1fc4606b7583910c57e1c4aae
Reviewed-on: https://dart-review.googlesource.com/45522
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Change-Id: I23f5ab9c9aaaee595ab6c552a6dddf9522ee17cd
Reviewed-on: https://dart-review.googlesource.com/45400
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This should work around #32450 and fix the buildbots.
Change-Id: I21d187a34de86ef4e383a9ea7fc297eda1363780
Reviewed-on: https://dart-review.googlesource.com/45521
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This class can be used to annotate declarations with
tool specific hints.
For example @pragma('vm:extern') can tell that a method is invoked from
outside (e.g. via VM C API), which informs Kernel based tools not to
tree-shake this method.
Design doc (internal) https://docs.google.com/document/d/1yqje8uctBqITcwKxhebb0EHunY1bt0Qd4yZExrTHIW8/edit
Change-Id: Icf2106accfb1167124582466a3a55486d432793d
Reviewed-on: https://dart-review.googlesource.com/43062
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Change-Id: I5d073d1c678dc313e79193074c6491085c093596
Reviewed-on: https://dart-review.googlesource.com/45381
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
This CL changes the handling of writeContext (for complex
assignments), returnOrYieldContext (for closures), expectedType (for
ensureAssignable), and receiverType (for findInterfaceMember) so that
they no longer use `null` to represent a context; they use UnknownType
or DynamicType as appropriate.
It also changes the handling of expectedType (for ensureAssignable) so
that it does not require the type to be known. That makes this CL
simpler and paves the way for fixing #31792.
Change-Id: Ib1be06182f9a9e9f77a9eb81f5daf2364de0f3a7
Reviewed-on: https://dart-review.googlesource.com/44800
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
recursive_import: was covering logic for the old frontend and it is no longer
relevant. dummy_compiler is not just about APIs, is about self-hosting.
TBR=sra@google.com
Bug: https://github.com/dart-lang/sdk/issues/30773
Change-Id: I56d094d9ecee47264c7a7a206f942d9e3dbdaadc
Reviewed-on: https://dart-review.googlesource.com/45364
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>