Commit Graph

1681 Commits

Author SHA1 Message Date
Jens Johansen 4a9a0fa949 [kernel] Test for reading all platforms
This test would have cought the need for
https://dart-review.googlesource.com/c/sdk/+/171727
sooner (or, rather it wouldn't have been needed at all because we would
have found out before landing the original :)).

Change-Id: If9e3216b1b8733d0463006fb253e1dbb484291eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171883
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-11-16 08:36:21 +00:00
Johnni Winther c4622003a2 [kernel] Remove dynamic access from text_serializer
Change-Id: Ic1012992472f8798c384af8795db8b1f42f8ccb1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171945
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-11-16 08:16:39 +00:00
Johnni Winther a39ea25627 [cfe] Add test for dynamic access in CFE/kernel code
Change-Id: I9cd5aec2bd9b455a099503ca3c55f61659145869
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171726
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-11-15 12:04:47 +00:00
Dmitry Stefantsov b4dbbe220c [cfe] Use type parser in type constraint gatherer tests
Closes #44096.

Bug: https://github.com/dart-lang/sdk/issues/44096
Change-Id: Id977e1ef70a1c17b30aedf072be7e6d2ea812d8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171587
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-11-12 17:25:27 +00:00
Dmitry Stefantsov ffc5ea67a1 [cfe] Read Null in a supertype position as an InterfaceType
Change-Id: I64927f996eee9e6928ee3a4303b39be4328ee0b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171727
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-11-12 16:51:07 +00:00
Johnni Winther 7b89827956 [cfe] Support bit mask for enabling specific late lowerings
TEST=pkg/front_end/testcases/late_lowering/late_lowering_bitmasks.dart

Closes #43993

Change-Id: I47d238dd7cf0ea22983a38bed86e415330070596
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171580
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-11-11 14:06:30 +00:00
Johnni Winther 13dfd58ac2 [kernel] Remove unification code
Change-Id: I1e5d8196839c3e0b54c7ad9aca1cdb41ca3aecbe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171582
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-11-11 12:51:28 +00:00
Johnni Winther b38821f39d [kernel] Enforce lints in pkg/kernel
Change-Id: I954f7632f22b552febed2a3140f81245277cb050
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171581
Reviewed-by: Jens Johansen <jensj@google.com>
2020-11-11 12:51:28 +00:00
Stephen Adams 8c13fa841e [dart2js] Kernel transformer expansion for List.generate
Simple calls to `List.generate` are expanded into a list allocation
and a loop. This generates better code for several reasons:

 - There is no overhead for the function argument (closure allocation,
   closure type, closure class)

 - Global type inference is more precise since each List.generate list
   is tracked separately, and the assignments in the loop give better
   inference to the collection's element type.

To get precise element type inference, there are two new JSArray
constructors. Global type inference starts with the element type being
bottom for these elements, avoiding spurious nulls in the inferred
type.

Change-Id: I5efb90651ae3f9eb2e81af556704960cdf0b75c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168770
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-11-11 04:27:22 +00:00
Johnni Winther 267a061c2b [kernel] Clone Block.fileEndOffset
+ remove redundant clone of fileOffset.

Change-Id: Ie13e35a710e8496da4e93b858ee18b54dd0d551f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170960
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-11-09 20:59:14 +00:00
Dmitry Stefantsov 783d83950b [cfe] Use type parser in type schema elimination tests
Closes: #44095.

Bug: https://github.com/dart-lang/sdk/issues/44095
Change-Id: Iff15b0686557388c4e701075a4f6e4fc16dfa5fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170901
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-11-09 16:54:39 +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
Clement Skau 27ca552ddb [SDK] Replaces async's _AsyncAwaitCompleter with _Future.
Run time (less is better) impact:
dart:
- Calls.AwaitAsyncCall  -43.95% ~ -55.50%
- Calls.AwaitAsyncCallClosureTargetPolymorphic  -40.33% ~ -53.58%
- Calls.AwaitAsyncCallInstanceTargetPolymorphic  -42.69% ~ -55.65%
- Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits  -42.05% ~ -56.14%
- Calls.Await...  0% ~ -13%
dart-aot:
- Calls.AwaitAsyncCall  -9.748% ~ -11.13%
- Calls.AwaitAsyncCallClosureTargetPolymorphic  -8.673% ~ -13.19%
- Calls.AwaitAsyncCallInstanceTargetPolymorphic  -9.799% ~ -11.74%
- Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits  -5.412% ~ -13.43%

Code size impact:
- flutter_gallery_app_so_brotli_size  -0.1237% ~ -0.2410%
- flutter_gallery_readonlydata_size  0.1693% ~ 0.2041%
- flutter_gallery_instructions_size  0.1157% ~ 0.1779%
- flutter_gallery_total_size  0.1021% ~ 0.1413%

Bug: https://github.com/dart-lang/sdk/issues/39119
Change-Id: I64d28a8bea078277946d7be43737e265920c8f16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126322
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-11-05 09:51:13 +00:00
Jens Johansen 7b75bd8ece [CFE] Special case StrongModeNNBDPackageOptOut message in IncrementalCompiler
This CL fixes the wrong message, so - when in the process of fixing
the package nnbd settings - one gets the correct message, mentioning the
right packages and no longer mentioning the fixed ones.

Change-Id: Ied26094055e56b44dfdd2e942b98eb9e1e7968fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170423
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-11-05 09:43:23 +00:00
Jens Johansen 60a5c58196 [CFE] Fix not getting rid of NNBD error in package in incremental compiler
This fixes the issue of the error not going away, but can (see added
test) give a wrong error message when in the process of fixing the issues.

A follow-up CL will (try to) correct the wrong error message.

Change-Id: I3547fe5fb5cfd179897996029a00a4995a967e54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170422
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-11-05 08:47:42 +00:00
Jens Johansen 9ec87c2da0 [kernel] Field has 2 references
Change-Id: I9c946119e55256b9fbcbf3076ea008aaa1312e86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168949
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-11-03 16:02:16 +00:00
Jens Johansen 332ce76055 [CFE][kernel] Add 'invalid' nnbd mode; use when trying to out out when compiling in strong mode
Change-Id: I3d1a8da4378cd59e733fc796df38ae98aaf59d6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169881
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-11-03 14:12:56 +00:00
Johnni Winther 0609c6dacc [cfe] Add predefined constructors for late error messages
This CL adds predefined constructors to LateInitializationErrorImpl that
only take the name of the late field/variable as argument. This can reduce
the size of the generated code for ddc/dart2js size because the long
message isn't repeated at all call sites.

In response to #43995

Change-Id: Ie276dd1455feab1655da3a503856da425b20f04f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169883
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-11-03 12:47:06 +00:00
Johnni Winther 3f7ca42391 [cfe] Ensure that getDispatchTargetKernel returns a concrete member
In response to #43988

Change-Id: I3aa73a073b275b634b679bebfa2bf2ed9c292074
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170087
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-11-03 12:20:37 +00:00
Johnni Winther d70796bae8 [kernel] Add caching ability to StaticTypeContext
Dart2js is changed to use the caching scheme in preparation for dart2js
to use the static types computed by the CFE instead its own custom
static type computation.

Change-Id: I1d45eda2f67ce4b23d669ec49e476ee357b37fc1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166845
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-10-30 17:55:21 +00:00
Johnni Winther 5efe55abf7 [cfe] Fix missing case of using receiver type instead of bound
+ fix test to expect erasure of `S & int` to `S` also when bound is `dynamic`.

Closes #43591

Change-Id: I44cb4c726648d4065bdf89bb2dbf71b2753c6c84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169340
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2020-10-30 16:33:51 +00:00
Leaf Petersen a6faf8f2f9 [Language] Enable null safety in Dart 2.12.
Closes https://github.com/dart-lang/sdk/issues/22

Change-Id: I662dd17fda0ff62a871314896fbf1dbe220f41de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166790
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
2020-10-29 18:25:56 +00:00
Johnni Winther 13704520a0 [cfe] Indicate nullability as assignability issue when appropriate
Closes #43592.

Bug: https://github.com/dart-lang/sdk/issues/43592
Change-Id: Ib57a70526a39a7125238546f08e1a2e97c279f0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168860
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-10-29 16:10:03 +00:00
Johnni Winther 34cedb980c [kernel] Make Procedure.kind final
Change-Id: I1a97c483bd0110061f4a60d26d28ab625dbbc00b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169220
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-10-27 13:56:38 +00:00
Jens Johansen 2928af2b12 [kernel] Remove unused Class.level, ClassLevel enum and shift Library.flags down
ClassLevel and Class.level have been unused for (at least) years.
This CL removes them.
Library.flags furthermore had the first bit unused after the 'external'
flag was removed (last year I think).
This CL shifts it down so the actual flags doesn't start at bit 1.

Change-Id: Ie0afd150cad331ea694bc5fe2a20aafed22916cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169202
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-10-27 12:59:33 +00:00
Jens Johansen ff60518cad [kernel] Remove getChildFromMember from CanonicalName
We always know exactly what it is at the call site, so why start doing
is checks to figure it out again?

Change-Id: I362ebcfd777086e048188e8fe2efddc3a9ae3c79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168827
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-10-27 12:24:38 +00:00
Jens Johansen 741bb5ec4e [kernel] Change library nnbd bit encoding slightly
This is a follow-up to
https://dart-review.googlesource.com/c/sdk/+/169080
mostly changing the library nnbd bit encoding so that weak is uniquely
represented as "00" which is the default when nothing else is set.

Change-Id: I1cd31e8c1927fee29d579772fb6893cb28befbf1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169200
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-10-27 11:53:48 +00:00
Jens Johansen ae5fc78992 [kernel] Remove 'addMember'
Most of the time one already knows at the call site if it's a Field,
a Procedure etc --- so use that instead.

For now I'll leave the corresponding getters that are basically
documented as "don't use" ("[...] for convenience, not efficiency.
Consider manually iterating the members [...]").

Change-Id: Ib732759432c62963e6645f85f6df301c4281df9d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168826
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-10-27 11:36:58 +00:00
Clement Skau c486a07b02 [VM] Fixes yield* exception handling in sync*.
This adds a mechanism similar to that used in async functions where
exceptions are caught in the synthetic code and passed into the
generated body to be rethrow'n.
This ensures the exception is throw'n from the same place as the
original yield*, as per the spec.

Bug: https://github.com/dart-lang/sdk/issues/42466
Change-Id: I054b9db568a49b046b6bb49f3e775bf093f83950
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160221
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2020-10-27 06:46:27 +00:00
Jens Johansen bee48f6ed6 [CFE][kernel] Add more checks for NNBD settings mismatch
* When initializing from a dill in the incremental compiler check that
  the nnbd mode matches what we're asked to compile.
  If they don't, silently do not initialize from the file.
* When serializing and deserializing, assert that the individual
  libraries match the component compilation mode.
* When appending dill libraries in the CFE, assert that they match
  what we're asked to compile.
* Remove NonNullableByDefaultCompiledMode.Disabled -- it's not a thing
  anyway.

https://github.com/flutter/flutter/issues/68901

Change-Id: I2e68f17cb3a065c4352e4db7c8aee3c13747f23a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169080
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-10-26 15:23:56 +00:00
Johnni Winther 942f765763 [cfe] Use semantic nullability for "is non-nullable" queries in UP/DOWN
Previously declaredNullability was used which missed that FutureOr<Function?>
is nullable.

+ add computation, test and use of NonNull in UP/DOWN

Closes #43742

Change-Id: Icf0b95143a85abb5eec056ee0aea23ef40a5283a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168946
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-10-23 14:58:42 +00:00
Clement Skau 7f0bd5e811 [VM] Removes _Future's and _StreamImpl's _awaiter.
Changes debugger.cc to use the 'lazy async stack' mechanism for
unwinding async stacks, which means we no longer have to manually
keep track of the caller.

This also allows us to get rid of _asyncStarListenHelper.

Bug: https://github.com/dart-lang/sdk/issues/42457
Change-Id: I536e9da4af275998140ae5f05e3a43e07c77cfc7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167561
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-10-21 12:38:23 +00:00
Jens Johansen 29fa4e8148 [CFE et al] Compile flutter platform as agnostic for test; set component mode more
Bug: dartbug.com/43844 dartbug.com/43807
Change-Id: Iba662f0955897244aaac86ceace73b213fa06319
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168482
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-10-21 10:04:41 +00:00
Aske Simon Christensen 059b5cefbc [kernel] Fix some typos in Nullability comments
Change-Id: I9eb939210e34b771cb7dfa0b2c3f8fe367cf96ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168488
Auto-Submit: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-10-20 12:50:13 +00:00
Michal Terepeta 5f18d498a0 Revert "[cfe] Avoid transforming members in other classes to no-such-method forwarders"
This reverts commit 87d3e03bf8.

Reason for revert: Breaks internal builds (http://b/171258924)


Revert "[cfe] Use CombinedMemberSignature to create noSuchMethod forwarders"

This reverts commit 13b7a83d57.

Reason for revert: Depends on a commit that breaks internal builds
(http://b/171258924)


Revert "[cfe] Use CombinedMemberSignature for creating simple legacy member signatures"

This reverts commit 170f05f91b.

Reason for revert: Depends on a commit that breaks internal builds
(http://b/171258924)


Revert "[cfe] Use origin location for member signatures"

This reverts commit 354dcf4386.

Reason for revert: Depends on a commit that breaks internal builds
(http://b/171258924)

Change-Id: I51f524949f259351336a77f43847bf1d0d11f104
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168487
Reviewed-by: David Morgan <davidmorgan@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Michal Terepeta <michalt@google.com>
2020-10-20 12:23:53 +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
Johnni Winther 87d3e03bf8 [cfe] Avoid transforming members in other classes to no-such-method forwarders
Change-Id: Ic4b5e914c1ab6ae2a3bef98e9d16a3a73f5a44d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168200
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-10-19 07:59:36 +00:00
Johnni Winther 3e0975bdc4 [cfe] Add 'knownLibraries' to the ClassHierarchy interface
+ use Uri for checking library identity in widget cache.

Change-Id: I3b8fed3994ad587b8560a0d33defbb159ca003c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167743
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-10-15 16:31:06 +00:00
jonahwilliams 1f3c76ccdd [widget_cache] lookup framework Class on each run, expose isExtended method
Invalidations below the framework layer could lead to NPEs, since the framework class types will get
recreated. To ensure this doesn't happen, look them up each time.

Instead of checking the component for subtypes, use an isExtended API and the existing mixed in API to
get the same results. This should allow this check to work correctly with the new invalidation strategy.

Bug: https://github.com/dart-lang/sdk/issues/43760
Change-Id: I439c085540403e29083c74b2add642656b3fa0a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167441
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-10-15 08:58:53 +00:00
Johnni Winther 73bbb6e008 [cfe] Handle scope patch-up for getter/setter/fields
Fields might be lowered to getter/setter pairs from source to
AST. This CL makes members able to show this for correct computation
of exports and handles scope patch-up when the relation isn't 1-to-1
between source and dill builders.

Change-Id: I5e4a711cd985730d320e582c3bd9d36602030992
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167320
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-10-14 08:23:57 +00:00
Jens Johansen b3ae203907 [CFE] Add hash-code to UnevaluatedConstants and add extra canonicalization for them
This gets rid of some of the weirdness about `UnevaluatedConstant`s.

Change-Id: I5e34dedd7ad4ad5ef57b3f27e17b456f5619e14d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167281
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-10-13 12:27:37 +00:00
Dmitry Stefantsov 319c02c3c0 [cfe] Implement the update in UP for FutureOr types
Closes #43721.
Closes #43677.

Bug: https://github.com/dart-lang/sdk/issues/43721
Bug: https://github.com/dart-lang/sdk/issues/43677
Change-Id: Iac7840e7699809946830067cd709314c6302986e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166639
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-10-09 13:39:16 +00:00
Johnni Winther 16ea8422d5 [cfe] Fix encoding for sync*/async/async* extension tear-offs
The internal closure was wrongly marked with the async marker of the
torn-off method.

Change-Id: Ie29eee6ed77fb07e9c0992bd0e49590cc10edd3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166634
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-10-09 10:42:56 +00:00
Dmitry Stefantsov 3b4fe0dc06 [cfe] Use computeRawType in Null Safe UP and DOWN
Closes #43536.

Bug: https://github.com/dart-lang/sdk/issues/43536
Change-Id: I6616739e7ac0eb0be084988cef0460e916a3b448
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165804
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-10-07 08:40:34 +00:00
Johnni Winther 4292d9cc28 [cfe] Handle required parameters in subtype check
+ use legacy erasure on weak mode const object checking
+ changes Null to subtype of Never when ignoring nullabilities

Closes #43606
Closes #43624

Change-Id: Ief695829c550562ec1bfd0c1145cc33c584a4b8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165805
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-10-06 08:34:23 +00:00
Jens Johansen d69a2110ef [CFE] Remove old dill test, suit etc.
This is no longer necessary with the VM only supporting the latest
version and kernel (optionally) including a git-checksum to match up
VM and dills.

Change-Id: Ifccfd0d12333cd99258100cda30e1536cc230bc2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166024
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-10-05 12:52:49 +00:00
Johnni Winther 8b07d1902c [kernel] Remove DirectPropertyGet/DirectPropertySet/DirectMethodInvocation
These nodes are no longer used.

Change-Id: I40c8df7376f0c40a4122c22d934fb3c6f6fd520d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165902
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-10-03 19:15:41 +00:00
Johnni Winther 6753c930c9 [kernel] Remove unused super call resolution transformation
Change-Id: Iacaadcae823eda57f85d3fcc42debab916924eda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165900
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-10-03 19:15:41 +00:00
Jens Johansen fc7de901ee [kernel] Make LogicalExpression operator an enum (and rename)
Change-Id: I6054e8e44133d2419582d74700c4223d51495978
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165606
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-10-02 09:41:12 +00:00