Commit Graph

56 Commits

Author SHA1 Message Date
Dmitry Stefantsov c191551fac [cfe] Remove BottomType
TEST=Covered by existing tests.

Change-Id: Ied8be1874164e68e0a3a48e1b2f9a33310071381
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183009
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-02-24 13:21:55 +00:00
Johnni Winther 56f46b0659 Remove non-nullable experiment flag from front_end test cases.
This changes the CFE expectation test suites to use unsound null safety
as default to avoid passing --enable-experiments=no-non-nullable to opt
out old test folders.

This change removes most test folders from the 'strong' tester, since
this now only supports sound null safety, which requires all libraries
to be opted in. Instead, the 'weak' tester now runs all test folders.
Additionally the 'outline' tester is changed to use unsound null safety
so that it call be used on all test folders.

The 'fast_strong' tester is removed since it should just be run locally
and it can be run by passing an option to the other testers.

References to non-existing 'shaker' folder has been removed from
testing.json.


Change-Id: Ibcc306f7b27d06b9637c205238bc408194f1d062
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184787
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-02-18 12:29:18 +00:00
Alexander Markov 9d1a307954 [vm] Add specialized factory constructors for small list literals
Flutter gallery in release mode:
AOT snapshot size arm64 -0.22%, arm -0.21%
instructions size arm64 -0.46%, arm -0.4%

TEST=existing tests

Fixes https://github.com/dart-lang/sdk/issues/44391

Change-Id: I4733e91ecf4601c0bcde725cf9e97f5db0b8bc13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175821
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2021-01-11 19:32:30 +00:00
Johnni Winther 76dcd9e37d [cfe] Ensure implicit-as and typedef reference are legacy erased
TEST=existing expectation tests

Change-Id: I48571347ef95b709a0804d284902ac6af7115afd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176083
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-12-15 15:34:40 +00:00
Johnni Winther f7ae22a4c1 Reland "[cfe] Improve encoding of set/list literals for unified collections"
Change-Id: I4f8098e110c9a5e5d6e102b8c6230e85c1575c6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175040
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-12-04 09:52:20 +00:00
Johnni Winther 7a130ccc49 [cfe] Rename isNullableByDefault annotation to isLegacy
TEST=Existing tests

Change-Id: I0aad4deea062ba2016a8be47489ffaa970bfc03e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174260
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-11-27 13:36:29 +00:00
Johnni Winther 48ae906dc4 Revert "[cfe] Improve encoding of set/list literals for unified collections"
This reverts commit 3380168c76.

Reason for revert: Performance regression on VM

Original change's description:
> [cfe] Improve encoding of set/list literals for unified collections
>
> Closes #44188
>
> Change-Id: Ib7d457f4beef0f7284922803d46cfe5d4b14cb1d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173268
> Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
> Commit-Queue: Johnni Winther <johnniwinther@google.com>

TBR=dmitryas@google.com,johnniwinther@google.com

Change-Id: If61882f73e59d0d61a2c23bd28179a881545d295
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173541
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-11-23 16:00:08 +00:00
Johnni Winther 3380168c76 [cfe] Improve encoding of set/list literals for unified collections
Closes #44188

Change-Id: Ib7d457f4beef0f7284922803d46cfe5d4b14cb1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173268
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-11-23 11:21:33 +00:00
Johnni Winther 1930c07cd7 [cfe] Add flags to MethodInvocation and fileEndOffset to Block
The CL add a 'flags' to MethodInvocation with the properties isInvariant
and isBoundsSafe. The former is used for to marks safe calls in unified
collection encoding. Both can be used further by backends.

The CL also adds a 'fileEndOffset' to Block. This is current set for
block declared in used code.

In response to https://github.com/dart-lang/sdk/issues/43994
and https://github.com/dart-lang/sdk/issues/43965

Change-Id: I579fc2928331465dfc2c152ccfd21297b12cfdd3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170695
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-11-09 07:36:44 +00:00
Dmitry Stefantsov d54e2bb568 [cfe,ddc,dart2js,vm] Add NullType
This CL is the sum of the following 5 CLs:
* https://dart-review.googlesource.com/c/sdk/+/170342/
* https://dart-review.googlesource.com/c/sdk/+/170344/
* https://dart-review.googlesource.com/c/sdk/+/170345/
* https://dart-review.googlesource.com/c/sdk/+/170346/
* https://dart-review.googlesource.com/c/sdk/+/170347/

The reason for landing the 5 CLs as one CL is to prevent potential
troubles with bisecting over the branch because the change is fully
functional only with all 5 CLs.

Closes #40122.

TEST=Verified by changes in .expect files in pkg/vm/.
Bug: https://github.com/dart-lang/sdk/issues/40122
Change-Id: Ib8197802fdc69694387ae47ac990c58b3aaab7a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170689
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-11-06 12:43:52 +00:00
Johnni Winther 137c7b6c84 [cfe] Explicitly run front_end unittest without non-nullable
This prepares front_end unittests for turning on non-nullable by default.

Change-Id: I9588a2d026ab9f5b1dcf08a140d25bd5dca3d5bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168346
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-10-20 13:13:33 +00:00
Anna Gringauze f04bc85e4f Refined scope calculation in expression compiler
- make sure nested blocks scopes are visited
- make sure variable definitions do not leak beyond block scopes
- properly collect scopes for loops, if statements, constructors
- add calculation of fileEndOffsets for blocks
- save block file offsets to dill
  - update binary format version
  - change kernel readers and writers to read and write block offsets
  - change vm readers to read and block offsets for new version
- add missing fileOffsets and fileEndOffsets on functions for
  late fields
- add missing fileOffsets and fileEndOffsets on functions for
  extensions
- add errors on failures to find scope
- find libraries for private fields correctly
- add more expression compilation tests
- add test to verify fileOffsets and fileEndOffsets are set for
  SDK summary (will add full dill tests later)

Closes: https://github.com/dart-lang/sdk/issues/40278
Related: https://github.com/dart-lang/sdk/issues/34942

Change-Id: I5bc1bb645543045b689d8d61069ee77dc4ee9025
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167541
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-10-20 01:44:52 +00:00
Jens Johansen a9ddd4bb96 [CFE] Change Set-literal transformation from nested let to BlockExpression
Fixes #43756.

Change-Id: Ib126ba8b91ae0d0c222383b51418b3d9f730bcfe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168022
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-10-19 07:16:36 +00:00
Johnni Winther 28c6ab316d [cfe] Report errors on incompatible getter/setter types
Closes #42702

Change-Id: I9af4b8d616c4368c9f955f658f27e581352a3cd3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165806
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-10-05 21:53:42 +00:00
Jens Johansen e6ffc0b285 [parser] Issue different warnings for missing identifier based on whether the token is used or not.
E.g. "var = 42;" now has a different error message than "var default = 42;".

Fixes #22553

Change-Id: I58affe988569d8e79190b63f7267b471a1b0ebc8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162182
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-14 08:55:18 +00:00
Jens Johansen ad4d43cf5b [CFE] Constant transformation for expression compilation
Fixes https://github.com/dart-lang/sdk/issues/42240

Change-Id: Idc75e99aed6acbb67755c77faa1904183a630f91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153355
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-07-08 07:17:40 +00:00
asiva ce5d18b0f0 [CFE] - Update exectations of CFE unit tests to account for NNBD unfork
These updated expectations were generated by running the script
pkg/front_end/tool/update_all.dart

Change-Id: I6b8f7c5e50160da96e90c44fa888bd9b072efd06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147321
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-05-07 23:16:21 +00:00
Martin Kustermann e2b6cc93b6 [vm/async] Update async transformation to take NNBD mode into account
The removal of unsafeCast causes flutter galley size regressions:

  - armv7: -0.43%
  - armv8: -0.21%

which we should look into recovering by having better inlining heuristics.

Issue https://github.com/dart-lang/sdk/issues/41373
Closes https://github.com/dart-lang/sdk/issues/41307

Change-Id: I7c0ba4c9598e13f01e807a607c83d50cf03e9abe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142501
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-04-11 08:56:52 +00:00
Jens Johansen 605f9eb030 [CFE] Perform transformPostInference when doing expression compilation
Previously, if using spread features, it would crash (if not before
when trying to serialize), and set literals wouldn't be transformed
away either (which the VM probably requires).

It should fix https://github.com/flutter/flutter/issues/41678

Change-Id: I40361d592e9e7a3fe820c4835aaac893c87d94fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141620
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-03-31 06:48:19 +00:00
Johnni Winther 80dacdf3a0 [kernel] Add Class.hasConstConstructor and Member.isNonNullableByDefault predicates
Closes #40440

Change-Id: I2776c165d23e2aa2bf5d7515741bd0f0d067b26d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134292
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-02-06 12:27:37 +00:00
Johnni Winther 54c8066f6f [cfe] Add new flags to AsExpression and IsExpression
Change-Id: I31eba9b4ced051a1067945fd68e60a09b1fa6ed7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133100
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-01-31 19:55:22 +00:00
Aske Simon Christensen 8f24bd2901 [cfe] Remove or reformulate some bad tips and messages.
Change-Id: I5f37da30370fb48a4417e2b0c990d9fc1c9713a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118990
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-30 09:02:41 +00:00
Johnni Winther 25166af3ea [cfe] Remove SyntheticExpressionJudgment
Change-Id: I2891d772d99d1fd8a5ba42e393d900f3c1618a5c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117700
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-24 07:55:45 +00:00
Dmitry Stefantsov 515a597710 [cfe] Remove Class.rawType
Bug: http://dartbug.com/38224
Change-Id: If0af5487b1d43125738575ee3e0fcd747db54fa9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117546
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-19 10:42:10 +00:00
Dmitry Stefantsov d4342b9021 [cfe] Print Kernel's type-parameter types in more details in text
Change-Id: I10cb27cba22ce91eca4e5cceed53a2753c6d4573
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114943
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-30 10:11:40 +00:00
Dmitry Stefantsov 20e4c74f7f [fasta][nnbd] Print NNBD type modifiers in Kernel's text representation
Change-Id: I48c43858094e2b7264a15be05238bfc3dadd5ecb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108264
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-07-31 08:26:14 +00:00
Samir Jindel 24725a8559 [cfe] Fix handling of private names in expression evaluation.
Issue: dartbug.com/35505

Change-Id: Ia1d211247852ef116139f8b509c21410fc8629d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108606
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-07-11 11:40:03 +00:00
Jens Johansen 43937aa9ca Don't let expression compilation bleed into real library
If an expression compilation issues problems of any sort, they are saved
in the target-libraries problemsAsJson field. That's not ideal,
as it means that they can be re-issued later, as well as possibly being
serialized into the dill file.

This CL resets the problemsAsJson field of the real library,
thus fixing the issue.

Change-Id: I765c2cc50059c6bcda6a56bb749869dd4b181876
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96800
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-04-30 11:38:48 +00:00
Jens Johansen 0720888236 Temporarily ignore context of errors in expression_test
To get the same context on errors for expressions compiled against
something we just compiled and something we've loaded from dill we need
the dill to contain offsets on TypeParameters.
We cannot currently change the binary format to include it, so for now
ignore the context in expression_test.

Change-Id: Ifbcc4352650fc56974bf5a78d9eb615ecec34e39
Reviewed-on: https://dart-review.googlesource.com/c/92743
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2019-02-19 10:18:29 +00:00
Jens Johansen 6ccdffdb35 Test for expression compilation, type variables and initialize from dill
Prior to f4379435dd,
using a type variable in an expression used for
expression compilation, where the type variable came from a class
that was loaded from dill would fail because type variables wasn't set
up so the type variable didn't exist in scope.

This adds a test for it - the actual fix was landed in
f4379435dd.

Change-Id: Icccf796b96853ece5ea96d4f29d76bb92b59fc83
Reviewed-on: https://dart-review.googlesource.com/c/92564
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2019-02-19 10:11:24 +00:00
Jens Johansen 71bee8f05e Fix serializing procdure when realClass is Object from dart:core.
Bug: 34224
Change-Id: I244ed3c15a2e134f1599588a156a7ff45917d4be
Reviewed-on: https://dart-review.googlesource.com/c/91641
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-01-30 08:44:05 +00:00
Aske Simon Christensen c9aaa7a654 Re-formulation of type bound violation error messages
Change-Id: I7f0b99c184b02f6910da054b877b5b5bee86f6bc
Reviewed-on: https://dart-review.googlesource.com/c/85346
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-11-29 13:27:16 +00:00
Aske Simon Christensen c959bd98af Print origins of types in bullet points below error messages.
This gets rid of the useless '#lib1::' prefixes on types in error
messages and instead adds a line to the error message for each
interface type appearing in the message stating where that type
originates.

Name clashes are disambiguated by appending markers like '/*1*/' and
'/*2*/' to the types whenever two interface types with the same name
appear in the same message.

The commonly used core types 'bool', 'num', 'int', 'double', 'String'
and 'Null' are excluded from the origin list unless they take part in a
name clash.

Change-Id: I017ea376d4f6ff2d4f3b36487774463f03bb3301
Reviewed-on: https://dart-review.googlesource.com/c/84604
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-11-29 13:27:16 +00:00
Peter von der Ahé 5aa705776b Remove desugaredError
Change-Id: Ide688cb577457a642d989deb8d4c7c638274a1bc
Reviewed-on: https://dart-review.googlesource.com/c/80448
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-10-19 07:16:47 +00:00
Peter von der Ahé d4fac1684c Remove CompilerOptions.reportMessages
Change-Id: I6b3e2f44ef89ba6a234fab97e08f56a69247d13f
Reviewed-on: https://dart-review.googlesource.com/c/77081
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-10-16 05:50:05 +00:00
Dmitry Stefantsov 8648d782ae Reland "[fasta] Report errors for bounds violations"
The original commit:
https://github.com/dart-lang/sdk/commit/aa6fb2d3a4298e60b5635f26507d5b39f4e531cb

Change-Id: I34287ec856fde16d56e9369ef2620311ba9bb722
Reviewed-on: https://dart-review.googlesource.com/c/79200
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-10-11 10:20:01 +00:00
Dmitry Stefantsov a539d2ef5f Revert "[fasta] Report errors for bounds violations"
The CL is reverted because it didn't account for the case when a check
of a user-specified type argument against the bound depends on another
type that is only known after type inference is done.

Change-Id: I1fd140af95ed37b9191a5b161a281d4639e3453f
Reviewed-on: https://dart-review.googlesource.com/c/79048
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-10-10 15:31:27 +00:00
Dmitry Stefantsov aa6fb2d3a4 [fasta] Report errors for bounds violations
Fixes #33308.

Bug: http://dartbug.com/33308
Change-Id: Iae087928468ed6883c438db95644135dc7ef0a6a
Reviewed-on: https://dart-review.googlesource.com/c/57621
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2018-10-10 12:03:36 +00:00
Peter von der Ahé a1ebe68359 Change how compile-time NSM is handled
Change-Id: I8dc408c1ffec9307e776288a8fb99604c7dedd6b
Reviewed-on: https://dart-review.googlesource.com/76664
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Auto-Submit: Peter von der Ahé <ahe@google.com>
2018-10-02 16:53:03 +00:00
Peter von der Ahé df32b2ae49 Ignore synthetic tokens when compiling bodies
Change-Id: Id5f6c4158e70f5a444a6baec1374da20f961a4ec
Reviewed-on: https://dart-review.googlesource.com/76603
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Auto-Submit: Peter von der Ahé <ahe@google.com>
2018-10-02 13:59:20 +00:00
Alexander Aprelev c688d0c0c3 [frontend] When serializing compiled expression proc, clone type params first.
If there are circular references between type parameters and types in the bounds,
currently serialization leaves original type parameters unchanged, which results
in failures to serialize compiled expression procedure.

This CL makes sure to clone all type parameters first, then passes map
with old-to-new type parameters to CloneVisitor.

Bug: https://github.com/dart-lang/sdk/issues/34052
Change-Id: Idf3e6e6e9099f93cdd7e970ab3b21921cdb29178
Reviewed-on: https://dart-review.googlesource.com/75241
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-09-20 14:55:59 +00:00
Aske Simon Christensen f8a96b88e9 It is an error if a final field is not initialized.
Bug: https://github.com/dart-lang/sdk/issues/33022

This commit adds an error when a final field is not initialized at all
(and there is at least one generative constructor). A later commit
will add an error for the case where a field is initialized by some,
but not all, generative constructors.

A number of classes in the Dart2js and DDC support libraries use
uninitialized final fields to indicate getters in the corresponding
native classes. This commit adds a temporary whitelist for the
affected files, which can be removed when the fields have been
replaced by external getters.

This is tracked by https://github.com/dart-lang/sdk/issues/33762

Change-Id: I6b5cee230c7cd5554da2b61da7ebddb6b0b9396e
Reviewed-on: https://dart-review.googlesource.com/63781
Reviewed-by: Daniel Hillerström <hillerstrom@google.com>
2018-08-17 12:37:52 +00:00
Brian Wilkerson 49437e3bae Split TooManyArguments to support quick fixes
Change-Id: I31511f619cafbce01f68d6e182328567a2bc3523
Reviewed-on: https://dart-review.googlesource.com/70021
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-15 13:24:22 +00:00
Konstantin Shcheglov d69a354026 Put fileEndOffset into ArgumentsJudgment and use to report argument errors.
Change-Id: Id79bd71e7147be379e93024591134c12aa598a38
Reviewed-on: https://dart-review.googlesource.com/69221
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-10 15:40:37 +00:00
Paul Berry 31af5ce13c Revert CLs reworking generator class handling of non-lvalues.
This arc of work is breaking the Flutter roll--see
https://github.com/dart-lang/sdk/issues/33993.

This reverts the following commits:

- 55c0857037 (Create a common generator class to handle non-lvalues.)

- c9b197017c (Rename "assignment_of" -> "assignment_to".)

- 32fd7b15e4 (Remove special case for assignment to parenthesized
  expressions.)

- 432e59e589 (Fix error reporting if a for-in statement attempts to
  assign to a prefix.)

- 232bed3d11 (Change UnresolvedNameGenerator to use
  NonLvalueGenerator.)

- 0b778d0697 (Change IncompleteErrorGenerator to make use of
  NonLValueGenerator.)

- 1a5f94a0a4 (Fix analyzer-CFE integration of illegal references to
  instance members from static contexts.)

Change-Id: Id637e5ec60150a73031c05d7bb4c6effefd2aa8a
Reviewed-on: https://dart-review.googlesource.com/67091
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-07-27 17:18:28 +00:00
Paul Berry 232bed3d11 Change UnresolvedNameGenerator to use NonLvalueGenerator.
This avoids the need for custom assignment-handling logic in
KernelUnresolvedNameGenerator, and ensures that assignments to
unresloved names work properly with analyzer integration.

Change-Id: I802270987c90043d021f8560b56f47babf72fb1e
Reviewed-on: https://dart-review.googlesource.com/66701
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-07-25 18:22:45 +00:00
Konstantin Shcheglov 312a7d13ec Store resolution for unresolved type instance creation.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I91af78cc5b99924c8dab77662d6bd08786a24fd9
Reviewed-on: https://dart-review.googlesource.com/65026
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-07-15 16:50:49 +00:00
Konstantin Shcheglov 7b68a4516f Wrap Let with ShadowSyntheticExpression in wrapInLocatedCompileTimeError().
So, that ExpressionStatementJudgment is created with an ExpressionJudgment, not with raw Let.

Change-Id: I648b1b6053b90b315064535237122be6289f8e6e
Reviewed-on: https://dart-review.googlesource.com/61105
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-06-20 15:44:44 +00:00
Samir Jindel 1a23ff68a5 Fix incorrect handling of NSM forwarders and pull all logic into CFE. (Take 2)
The behavioral difference is that named and optional arguments are filled in
with their default values in the `Invocation` object passed to `noSuchMethod`.

On the implementation side we make NSM forwarders concrete and fill in their
bodies in the CFE. The custom (and somewhat hacky) VM support is no longer
needed, and Dart2JS can benefit from this implementation as well.

According to discussion on #33031 we will be able to re-land this soon without
breaking Mockito.

Prior failures on precompiler bots are fixed in Patchset 2.

Change-Id: If1b7fe4cf6da5ef38f330e1ad226121bcfc958a1
Reviewed-on: https://dart-review.googlesource.com/54401
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-05-15 11:23:32 +00:00
Samir Jindel 03abbc73d2 CFE support for expression evaluation, refactored.
Change-Id: I7eac1020b7aa11ea0276f909d7b11ee6388b1aa7
Reviewed-on: https://dart-review.googlesource.com/53209
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-05-08 11:20:35 +00:00