Commit Graph

966 Commits

Author SHA1 Message Date
Paul Berry 0e7e8eb07e Flow analysis: rework tests
Two changes:

- Rather than remember to call `FlowAnalysis.finish` at the end of
  each test, we now have a `_Harness.run` method that calls it
  automatically.

- Variables are created using `_Harness.addVar` and their declarations
  are reported to flow analysis using `_Harness.declare`.  This allows
  us to more easily test scenarios where a variable might be
  referenced before its declaration site is encountered (which might
  occur due to analyzer error recovery).

Change-Id: I0eff619840aeb057dcce8d64b6c6d23a265f81bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115421
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-04 19:23:41 +00:00
Paul Berry 079ff845a5 Sort tests in flow_analysis_test.dart
Change-Id: I28f81d8160e80ef6cfb7c95c39658d0f5396e6ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115420
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-04 19:23:41 +00:00
Paul Berry c73df64c94 Flow analysis: move tracking of definite assignment into VariableModel class.
Change-Id: I28cdc6f65aa3488da3538a7b920dc10f87ec1de0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115003
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-04 13:33:52 +00:00
Paul Berry c9a75cbbc9 Flow analysis: fix crash in for_conditionBegin.
The crash occurred when:

- The body of the for-loop contained a write to a variable that was
  declared inside the body of the loop.

- At least one variable was declared outside the for-loop.

Fixes #37983.

Change-Id: I241312e1f1c9efb879bbff93fc0ca569d8ec8370
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115262
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-03 20:28:36 +00:00
Dmitry Stefantsov 8ee22c246e [cfe] Update the api for nullability on TypeParameterTypes
The nullability on the LHS of type-parameter types is assumed to be set
explicitly, at the moment of creation of the type or some time after
that.  The latter case is needed for when the bound of the corresponding
type parameter is not yet set.

The second change is that the overall nullability is not stored in a
field, but is computed as a getter.

Change-Id: Ifbe6922c3a17943dd6c4f054976516c4f6bfc96d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115209
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-03 13:35:16 +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
Paul Berry c7f3300448 Flow analysis: begin tracking where variables are written to in closures.
Not yet used.  This will be needed in order to implement the
"writeCaptured" behaviors in the flow analysis spec.

Change-Id: I873f10089a7b93ec5b40d979ddf3a6754e30b181
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114960
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-08-29 17:01:24 +00:00
asiva 45b85e12d2 [VM] - Remove rules to build vm_legacy_platform
Change-Id: If79375d73e24f99017cbeafd3357e03001925162
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114924
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2019-08-29 15:57:54 +00:00
Johnni Winther 7dbf8eed3b [cfe] Support sharding in pkg/testing tests
Splits strong_test into 4 shards. This test took 4+ minutes locally with
the fast_strong_test and analyze_test ticking in at ~1:45. This change
makes local testing of frontend unittests take 2 instead of 4 minutes in
total.

Change-Id: Id6015de86d547b209a699b1e5196b3edad1e6977
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114501
Reviewed-by: Jens Johansen <jensj@google.com>
2019-08-27 09:56:53 +00:00
Paul Berry b8cb25c96f Flow analysis: shift responsibility for handling final fall-through to FlowAnalysis.
Dart allows the last switch case to "fall through" the end of the
switch statement.  To account for this, we previously required the
caller of FlowAnalysis to calling `handleBreak` at the end of the last
switch case.  (In the analyzer implementation we actually only did
this if the last case was a `default` case, but in practice there was
no observable difference).

This CL shifts the responsibility to FlowAnalysis to handle this
scenario; the caller only needs to call `handleBreak` if there is an
actual break statement present.

Change-Id: Ia0d7abb21d78205f1050873e28b30cddc5fbe344
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114547
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-08-26 19:39:00 +00:00
Paul Berry 2011b6fa6b Flow analysis: refactor and unit test switch statement logic.
Responsibility for deciding whether to cancel promotions has been
moved to FlowAnalysis (previously the caller decided).  This should
reduce the risk of the analyzer and front end behaviors diverging.

Also removed an unnecessary argument from
FlowAnalysis.switchStatement_end.

Change-Id: Ib015e4e360e62da7bb267057e4626acaa94e9e74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114541
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-08-26 16:11:25 +00:00
Johnni Winther 103a43dd73 [cfe] Towards deprecating Builder.target
- deprecates 'target' on LibraryBuilder, ClassBuilder, ExtensionBuilder,
  TypeAliasBuilder, and TypeVariableBuilder.
- prepares for deprecation of 'target' on MemberBuilder,
  VariableBuilder, and FormalParameterBuilder

Change-Id: Ic04c533eb5443c7b7c6413e48f399450d1ebe43a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113440
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-08-26 12:52:10 +00:00
Paul Berry 30e4092d27 Flow analysis: handle empty for-loop conditions directly in FlowAnalysis.
Previously the client was required to create a synthetic `true`
literal.  The client may still do that (it's equivalent), but it's no
longer necessary.

Change-Id: Iffa12769b542678dab6cd4b5583d7058b41aebd1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114342
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-08-23 16:19:49 +00:00
Paul Berry 5fb29b6a8d Flow analysis: allow sets of referenced variables to be any iterable.
Change-Id: I999d06deaf5764ea422cf5bbbb4b9c1cb1cddcfe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114080
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-08-23 11:07:58 +00:00
Paul Berry 1f9dd21940 Flow analysis: create the VariableModel data structure.
In the long term we want to track a lot of information about each
variable; currently we are only tracking the promoted type.

Change-Id: Ibdf90e0db524b4b87eb23921529ff2a65a927f9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113748
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-08-23 11:07:58 +00:00
Jens Johansen bd681ea660 [CFE] Move testing out of lib/src/fasta
Change-Id: I477892fa9268ab3715152c0253dd65a1c1541c1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114072
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-08-23 06:20:03 +00:00
Jens Johansen e4c552fb48 [CFE] Add test that runs analyzer on CFE source with lints
We already have an analyzer test in CFE, but because that test also
includes for instance everything that imports the front_end, kernel or
testing, we had to disable lints in that one.
This CL adds an analyzer test for CFE sorces onlyi where lints are
enabled.

Change-Id: Ic58c8c6e92f4a7962bbf5489a37f2bf95a5c095b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114067
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-08-22 10:52:59 +00:00
Paul Berry 51cd16ecf0 Flow analysis: support for and for-in elements in collections.
Change-Id: Ia73c68c2b8a57c62ce2b4984184cf8a712b554af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113944
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2019-08-21 21:57:54 +00:00
Johnni Winther 7f9f4ad774 [cfe] Delete legacy tests
+ make sdk_test test non-legacy

Change-Id: Ie9861e54d12301f454d4fccf6eccd3516e0387d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113825
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-08-21 09:01:44 +00:00
Johnni Winther 91c8cf7167 [cfe] Support per folder experimental flags in testcases
Change-Id: Ia4d795959f6b192d83c97c45870c5fc59d406f4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113824
Reviewed-by: Jens Johansen <jensj@google.com>
2019-08-21 09:01:44 +00:00
Johnni Winther 027071318f [cfe] Change outline test to test strong mode
Closes #37904

Change-Id: I75cd093922dbcf29c0b073d6a37aaba9d6c1f5f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113697
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-08-20 13:51:10 +00:00
Paul Berry 0ff0cc1229 Flow analysis: remove unnecessary argument to doStatement_end.
And add unit testing of do statements.

Change-Id: I976780a400cbd852f71d915f1c67b5433ba8807c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113267
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-08-19 15:49:43 +00:00
Paul Berry 14e84afb63 Flow analysis: fix incorrect comment
Change-Id: Iec2229fcf1e1688ead0acb094d3397cf4278ab46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113400
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-08-16 20:31:10 +00:00
Johnni Winther eae781c73e [cfe] Add Field.isLate, VariableDeclaration.isLate and VariableDeclaration.isRequired
Add support for the `late` modifier on fields and local variables in
CFE, and `required` on named parameters When using the option
--enable-experiment=non-nullable the `isLate` and `isRequired` flags will be set
accordingly on Field and VariableDeclaration nodes.

Closes #37686
Closes #37684

Change-Id: If37fc93defdabc5cc974f3f068f57752a665f4cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113036
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-08-16 19:39:05 +00:00
Paul Berry 8ab978b6d4 Flow analysis: remove unnecessary parameters from conditional_* methods.
Also rework the flow analysis tests a bit to allow tests to be written
in a more compact way.

Change-Id: I6642ce9987bb89b9b858e709575ce12510c8f442
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-08-16 18:44:00 +00:00
Jens Johansen 7136d9e4e7 [CFE] Add a 'tool' that runs a quick smoke test
Runs a number of tests that are quick, currently:
* Messages test in a new fast mode which skips compilation
* The spelling tests
* The custom CFE lint test

Change-Id: I7b444e5be1cf2397d6d776aac96dd7c2ad2b302d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113320
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-08-16 11:14:07 +00:00
Jens Johansen 050ec9eebd [CFE] Spelling tests give proper error messages
Change-Id: I5a145b070acc4388ecf0ac5dab1a36f5647f6150
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113185
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-08-16 07:24:57 +00:00
Paul Berry 23387d636b Flow analysis: merge APIs for handling && and ||.
This will make it easier to integrate flow analysis into the migration
tool, since the migration tool has a shared code path for handling
`&&` and `||`.

Change-Id: Ibf1c7362dfeaab505a2ecf7298b2569a40fca781
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113038
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-08-15 13:34:30 +00:00
Johnni Winther 9d4e778cde [cfe] Support getters, setters, fields and operators in extensions
Change-Id: Ic84380ea767691bbbb802c65cb72fe43893f78a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112257
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-08-15 12:12:00 +00:00
Jens Johansen cae08c6813 [CFE] Apply lines_longer_than_80_chars lint
Change-Id: I35b62b34d3ccc7098c21a680a80612c0bb927123
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113030
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-08-15 10:01:20 +00:00
Jens Johansen c4727fddf4 [CFE] Apply unawaited_futures lint
Change-Id: I1d783a883c7be84f743724d9eaadc390f84d4b33
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113028
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-14 13:42:13 +00:00
Jens Johansen 56c3cfe34c [CFE] Apply prefer_adjacent_string_concatenation lint
Change-Id: I14b3f5060d1eda6a8ea1e0c808593a57f821a725
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113026
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-08-14 13:00:53 +00:00
Jens Johansen 38336d6b5a [CFE] Split spell dictionary into several different dictionaries
Change-Id: Ie7e274b66d554eb9db8fffdf0e945d78be231ea8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112392
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-13 07:18:29 +00:00
Johnni Winther 271ad96813 [cfe] Create Extension nodes for extensions
Adds Extension node to kernel/ast, currently with serialization. This
is needed to support resolution of extension methods through dill
boundaries.

Adds (Source)ExtensionBuilder for build Extension nodes and
DeclarationBuilder as common superclass of ClassBuilder and
ExtensionBuilder.

Change-Id: Id945a40452f2729f9a4f390477dd6c76f9030eaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112256
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-08-09 20:46:01 +00:00
Jens Johansen 5601eabda6 [CFE] Spell check messages and dart code
This CL adds a simple spell-checker, adds a spell-checking-phase to
messages_test to spell-check our messages, adds a new test that
spell-check our dart-code and fixes a lot of spelling mistakes / typos.

Change-Id: I8943a5bd67970e9a8a775251ae0aa97799eab097
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112346
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-09 08:47:00 +00:00
Johnni Winther 9a71c998f9 [cfe] Rename Declaration and DeclarationBuilder
Rename Declaration to Builder and DeclarationBuilder to TypeParameterScopeBuilder.
This prepares for the introduciton of a DeclarationBuilder superclass of
ClassBuilder, MixinDeclarationBuilder and ExtensionDeclarationBuilder.

Change-Id: I2d392372f458f39ebaea87ec10f365b822ee3841
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112088
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-08-08 14:01:16 +00:00
Jens Johansen b9c0f5c09f [CFE] Issue error when .packages specifies wrong language version
From the feature specification: "If an entry contains an invalid dart
version value, #dart=arglebargle or #dart= or any other value which is
not a semantic versioning version, then tools which need the version
should report an error."

Change-Id: Ieb54dbbad6f2fecb341e27b468e3ffdf90717a7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112245
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-08 07:05:00 +00:00
Paul Berry bff5732c10 Flow analysis: unify API for handling == null and != null.
This reduces code duplication in the client.

Change-Id: I278fb4d3c7fc7b913498d4a69f4f361f6227da32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112146
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-08-07 19:21:24 +00:00
Paul Berry 7912216cd6 Flow analysis: store all variables in promoted map.
Previously we only stored promoted variables.  Storing all variables
paves the way for expanding the `promoted` map into a map from
variable to VariableModel, which will be necessary to bring the
implementation in line with
https://github.com/dart-lang/language/pull/473.

Change-Id: Ief7190b565da03e3c8dc22f8401f96f3e8a1d356
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112040
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-08-07 14:16:11 +00:00
Paul Berry 7893fdbf2f Flow analysis: Rename State to FlowModel.
This makes the terminology consistent with
https://github.com/dart-lang/language/pull/473.

No change other than renaming the class, sorting the file, and
reformatting some comments.

Change-Id: I81ab759decd0495f18d2afbe9a4c9d734f393b04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112037
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-08-07 14:16:11 +00:00
Paul Berry 4d6adbf15c Flow analysis: Move join into State and document it.
Change-Id: I8cec06c0d19107b4973e192534d63f05a5b3d902
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112036
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-08-07 14:16:11 +00:00
Aske Simon Christensen 5121a2e831 [cfe] Read product mode directly from environment in async transform.
When we perform constant evaluation in the CFE, the async transform
runs after constant evaluation. Thus, it can no longer use const
bool.fromEnvironment("dart.vm.product") to query whether the VM is
in product mode.

Instead, it can read the product mode define directly from the
environment defines given to the CFE and generate different code
depending on the value.

Change-Id: I2aabc4a84b50a940d35d5664ff4ebdf0680ed5c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111645
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-07 08:28:25 +00:00
Paul Berry 9f9abe5fcd Flow analysis: get rid of "identity" state.
Previously, flow analysis was using the `_identity` state for two
purposes:

1. As the "if true" state for "false" and the "if false" state for
   "true".

2. As the base state for the "break" and "continue" code paths of
   loops, before any "break" or "continue" statements had been seen.

For the first purpose, it is more consistent to use
`_current.setReachable(false)`.  This ensures that in code disabled by
`if (false)`, promotions are not lost.  For the second purpose, it is
easier to just use `null` as the base state.

There is a small behavioral change: previously in unreachable code, if
we used the `_identity` state, all variables were considered assigned;
otherwise they were considered assigned or not according to the state
of the code prior to the branch point that caused the variables to
become unassigned.  Now, unreachable code consistently has the latter
behavior.

Change-Id: If77a3fcff9391b66164c0445d5242cb04c9a6b76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112023
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-08-05 23:23:47 +00:00
Johnni Winther 5c7fe46e3e [cfe] Merge more Kernel*Builders into *Builders
Change-Id: I335216e2702fe881287e296e0dd1d457e6c7cea7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111541
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-08-05 19:31:28 +00:00
Johnni Winther 262aaf13a0 [cfe] Merge KernelLibraryBuilder into SourceLibraryBuilder
Change-Id: I8c654aa8065b5e2b43c864a43924925cbfd972b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111540
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-08-05 19:31:28 +00:00
Johnni Winther 68e4eeee12 [cfe] Handle property access, update and method invocation on explicit/implicit this in extension methods
Handles property access, update and method invocation on explicit and
implicit this in extension methods. Also use ReadOnlyAccessGenerator
instead of ThisAccessGenerator to handle explicit this.

Change-Id: Ifd6861b1f931f854a39ddfb9ddae35ebf6094327
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110904
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-08-01 12:04:59 +00:00
Johnni Winther 59aa4cd693 [cfe] Merge more Kernel*Builder classes into *Builder classes
* Remove EnumBuilder and rename KerneEnumBuilder to EnumBuilder
* Merge KernelInvalidTypeBuilder into InvalidTypeBuilder
* Merge KernelTypeAliasBuilder into TypeAliasBuilder
* Merge KernelTypeVariableBuilder into TypeVariableBuilder

Change-Id: Ie5554146fc0c073b48453bae446f36592e46ecab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110903
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-07-31 11:19:52 +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
Johnni Winther 3992be71c7 [cfe] Add this parameter to extension methods
Change-Id: I25326e755d63b5707f8f7ce52b3d80c3965372aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110725
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-07-29 15:58:08 +00:00
Johnni Winther 28a7369146 [cfe] Merge KernelClassBuilder into ClassBuilder
Change-Id: I0af957969863a69cd5c9b7a2da6ffc9550018e48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110723
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-07-29 15:58:08 +00:00