Commit Graph

1440 Commits

Author SHA1 Message Date
Johnni Winther 42f954d5f1 [cfe] Move type parser to package:kernel
Change-Id: Icbb37b586dd4113605f9a0959e585586ee94c33c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131836
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-01-21 14:37:32 +00:00
Jens Johansen 128771af8a [CFE] Version 2 of incremental compiler invalidation strategy
Change-Id: Iff860e2665dee64fc005a50237ae890986ddb0f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127896
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-01-16 07:50:39 +00:00
Johnni Winther d302d7f10a [cfe] Insert member signatures for nnbd aware inheritance
Change-Id: I86dbbd586434af81b6dc4f4ae748cbd8177d06e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129080
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-01-15 07:36:28 +00:00
Dmitry Stefantsov 1eacac48cf [cfe] Make .{thisF,f}unctionType nullability-aware
Change-Id: I4a83f4db7d6412165882e4a1f08c7fded6b9ea3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130373
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-01-08 11:52:06 +00:00
Johnni Winther 96a8282cd9 [cfe] Use structural equality for generic function types
Change-Id: Iecff57779243e042c5e9cad96c96139da9d93380
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129719
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-01-07 07:52:32 +00:00
Jens Johansen 8d11c1dce6 [kernel][vm] Add uris only from mixins to libraries sourceReferences
index to fix VMs coverage issue

This CL fixes the VM not always reporting coverage for mixin usages
properly.

* When asking the VM for coverage you can do it in one of two ways
  * Ask the VM for coverage for everything; or
  * Ask the VM for coverage for a specific script
* Asking the VM for coverage for everything works perfectly fine.
  The VM goes through everything and reports coverage correctly.
* Asking the VM for coverage for a specific script (which is, at least
  now, what the flutter tools does) doesn't work in the simple mixin
  case described at http://dartbug.com/39779: The VM goes through the
  libraries, asking for the list of scripts they "know about",
  and checks for matches against what you asked for.
  In this case, when asking for 'master.dart', the library for
  'lib.dart' says no when it shouldn't --- because of the way the mixin
  transformation works the content is actually in lib.dart.

This CL updates the content of the field 'sourceReferences' on Library
to fix the issue.


Fixes #39779

Change-Id: I0c38a323c81d1784ade704837b67ece549fc95d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128585
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-12-19 06:59:28 +00:00
Dmitry Stefantsov 01a8d76307 [cfe] Fix compiler crashes on for-in iterables with Null type
Closes #39817.

Bug: http://dartbug.com/39817
Change-Id: Id60a3d35d73880c68e6a73adffd4c8c96e9b49fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128664
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-12-18 15:14:21 +00:00
Dmitry Stefantsov 2af5aec84e [cfe] Infer type of x! as Never if x's type is Null
Closes #39822.

Bug: http://dartbug.com/39822
Change-Id: I9600efcd4e69e331de5d9fa8f2b676c402df6502
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128661
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-12-18 09:01:30 +00:00
Dmitry Stefantsov c85979a280 [cfe] Implement the NNBD variation of the assignability property
Change-Id: I802e5668952f918919bd4fda4fd0102623a20ae7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128544
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-12-16 12:38:27 +00:00
Johnni Winther 818ec6db92 [cfe] Implement nnbd-top-merge
+ and use nnbd-top-merge and legacy erasure in hierarchy computation

Change-Id: I4bf06ce8d3c68a9926865ebf84b24b4029828d73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128065
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-12-13 17:19:59 +00:00
Dmitry Stefantsov 4df5b5458a [cfe] Implement NNBD-aware lower / upper bound algorithms
Change-Id: I1def2843f41938e8aee39d12fc4e2807b0c5a1b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126725
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-12-12 11:00:21 +00:00
Johnni Winther d9fa37e85d [kernel] Use Never as static type for throw/rethrow
Change-Id: Iba61a834827747e656a6dc14d73ee152f66864cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127882
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-12-11 08:37:59 +00:00
Nicholas Shahan 7974f3f899 [dartdevc] Reduce the number of SDK libraries in the platform
We are temporarily building a smaller SDK platform to make progress building
applications against the forked sdk_nnbd sources. This is because some of the
libraries have not yet been ported and they don't compose well.

I needed to thread the status of the non-nullable experiment through the front
end entry point and into the target options, and native types.

Also includes some standardization of the flag name in DDC.

https://github.com/dart-lang/sdk/issues/39698

Change-Id: I4bdd503be694b28d7f95828d4af28d1d5fb3691f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127486
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-12-09 22:25:48 +00:00
Johnni Winther de11b7b373 [cfe] Implement legacy erasure
Change-Id: I4f152264469e7cb6d23c7502e277004cd35e8527
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127463
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-12-09 13:07:07 +00:00
Jens Johansen db525fe0f9 [kernel] Remove old unused 'method call' transformer
Change-Id: I20afd79daa0d3668c96d52fcc83c78fb5e3fb4bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127620
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-12-09 10:14:57 +00:00
Johnni Winther 97c2ca5ff1 [cfe] Use valid static types and file offsets in collections transformation
Closes #39566

Change-Id: I589d0dd568b3ea939bb1238b1c61fca6867e737e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127320
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-12-06 10:58:20 +00:00
Samir Jindel 1d4c45d2d0 Re-land "[vm/cfe] Elaborate for-in statements during async transform"
This removes the component of the change which updates the kernel binary
format.

Change-Id: I86dbfe0ea61453bbea6eee200743961d0d0c3814
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127002
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Teagan Strickland <sstrickl@google.com>
2019-12-05 14:06:08 +00:00
Dmitry Stefantsov 47a9ebea76 [cfe] Make API of as-instance-of and legacy LUB/GLB library-specific
Change-Id: I1991c66e654ef537243d9f25f17070acbfa13af9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126380
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-12-05 13:32:28 +00:00
Johnni Winther e4e3f3fbc4 [cfe] Handle for-in on type variables in TypeEnvironment.forInElementType
Closes #39565

Change-Id: I5b4c437879be0a97b306c5cc3579faac917d7e7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127162
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-12-05 12:26:58 +00:00
Clement Skau c1565a7e64 [SDK] Cleans up a few unused functions in core_types.dart.
Change-Id: I5fc97b26f194434e70c814ba78ae6d17f97f4fbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127145
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2019-12-05 12:04:38 +00:00
Alexander Markov f56b0f6907 [vm/aot/tfa] Whole-program constant propagation
Size:
flutter_gallery total size -2.48% (arm), -2.3% (arm64)
flutter_gallery instructions size -2.91% (arm), -2.77% (arm64)
velocity_tracker_bench total size -7.5% (arm), -7.1% (arm64)

Performance:
SkeletalAnimation +46.02% (Intel Core i5), +37.75% (Intel Xeon), +24.86% (arm), +39.75% (arm64).
FfiMemory.Pointer* +44-64% (x64)
FfiMemory.PointerPointer +436-465% (x64), +443% (arm64).

Issue: https://github.com/dart-lang/sdk/issues/37710

Change-Id: I6221bfa02b165ccc17d4ee8b857bb89212febaff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125936
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-12-04 19:19:29 +00:00
Clement Skau f9327d3bac [SDK] Adds --lazy-async-stack support for async*.
Bug: https://github.com/dart-lang/sdk/issues/39525
Change-Id: I53cd334243649901ea8e0f9799d9f41c126e3627
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126729
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-12-04 12:47:48 +00:00
Clement Skau 89e31069e8 Revert "[vm/cfe] Elaborate for-in statements during async transform"
This reverts commit 63333deed6.

Reason for revert: Causes failures on Flutter HHH CI in the "flutter test hostonly_devicelab_tests" step due to kernel binary format version mismatch.

Original change's description:
> [vm/cfe] Elaborate for-in statements during async transform
> 
> This allows us TFA to analyze the iterator calls and we generate much tighter
> code in AOT.
> 
> However, due to the increased inlining opportunities, we end up emitting 0.5%
> more code. Inlining of the _GrowableList iterator specifically also includes the
> concurrent modification check and error handling.
> 
> Calls to get:iterator, moveNext and get:current account for 7.12% of all InstanceCall
> instructions in Flutter Gallery.
> 
> Fixes https://github.com/dart-lang/sdk/issues/39516
> Issue https://github.com/dart-lang/sdk/issues/39566
> Issue https://github.com/dart-lang/sdk/issues/39565
> 
> Change-Id: I8dcc08b7571137e869a16ceea8cc73539eb02a5a
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126381
> Commit-Queue: Samir Jindel <sjindel@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

TBR=kustermann@google.com,sjindel@google.com,johnniwinther@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I89b88c3d9f7c743fc340ee73a45c3f57059bcf30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126734
Reviewed-by: Clement Skau <cskau@google.com>
Reviewed-by: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2019-12-03 12:29:35 +00:00
Johnni Winther 5013ce6e5d [cfe] Use correct types and errors in late lowering
Change-Id: I6e7dcbd96e151a69fc67a6cd5e5af1620760b02a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126647
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2019-12-02 15:00:18 +00:00
Alexander Thomas 46a5f35da7 [infra] Bump VERSION to 2.8.0
Change-Id: I7a984bdaccab42ab908624e88e066e6e9fb3840a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126840
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2019-12-02 13:58:47 +00:00
Jens Johansen 97d6ac21d5 [CFE] Spell check on kernel src; presubmit on kernel & _fe_analyzer_shared
Change-Id: I3ca7c856bdf9e6ad6e4474c804fd4f7f6b23571e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126730
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-12-02 13:00:47 +00:00
Jens Johansen 1c3468a646 [kernel] Remove Library.isExternal
Change-Id: I6638b915c1189838e7081069a0075e4ecd9ee9d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125600
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-12-02 09:24:42 +00:00
Samir Jindel 63333deed6 [vm/cfe] Elaborate for-in statements during async transform
This allows us TFA to analyze the iterator calls and we generate much tighter
code in AOT.

However, due to the increased inlining opportunities, we end up emitting 0.5%
more code. Inlining of the _GrowableList iterator specifically also includes the
concurrent modification check and error handling.

Calls to get:iterator, moveNext and get:current account for 7.12% of all InstanceCall
instructions in Flutter Gallery.

Fixes https://github.com/dart-lang/sdk/issues/39516
Issue https://github.com/dart-lang/sdk/issues/39566
Issue https://github.com/dart-lang/sdk/issues/39565

Change-Id: I8dcc08b7571137e869a16ceea8cc73539eb02a5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126381
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-11-29 16:42:36 +00:00
Johnni Winther a17809ad18 [kernel] Add TypeEnvironment.forInElementType
Adds convenience method for computing the element type of a for-in
iterable.

Change-Id: Idd1bf0a9b80523c49130b2d7f17590dcf86d3e40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126581
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-27 19:18:21 +00:00
Clement Skau d5dbf10672 [SDK] Adds non-eager async stack frame collector.
This is done by collecting all frames on the current stack until an async/async* frame is hit
which has yielded before (i.e. is not in sync-async case).
From there on it finds the closure of the async/async* frame and starts traversing the listeners:
  while (closure != null) {
    yield_index = closure.context[Context::kAsyncJumpVarIndex]
    pc = closure.function.code.pc_descriptors.LookupPcFromYieldIndex(yield_index);
    <emit pc in frame>
    closure = closure.context[Context::kAsyncCompleterVarIndex]._future._resultOrListeners.callback;
  }

Bug: https://github.com/dart-lang/sdk/issues/37668
Change-Id: I97030d22e529bf8a74ecd30a8a2589cfe57ad330
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122644
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-11-26 11:51:27 +00:00
Aske Simon Christensen e84af9b761 [cfe] Disallow annotations on type parameters of function types
Also, do not copy annotations on type parameters of functions into
their inferred types.

See https://github.com/dart-lang/language/issues/656

Change-Id: I1460007645a32ac56a505b23ab3ee8a457c3f994
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123732
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2019-11-25 14:55:55 +00:00
Jens Johansen 4d884229ab [kernel] Add (internal) relink method
Think of this as an internal method. You probably shouldn't call this
method without being told to by the kernel team.

Change-Id: I76d55870ee781646a648e8e253a33a1d497eed81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125963
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-11-25 12:44:25 +00:00
Dmitry Stefantsov 1f382890a7 [cfe] Make inference NNBD-aware
Change-Id: I7a793c87b00c97a7d4b05ba94116215d8f6d2a89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125970
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-11-22 12:09:14 +00:00
Johnni Winther 970c164826 [cfe] Use correct types in transformations and start verifying getStaticType
With this fix Expression.getStaticType no longer throws on any known cases.
Users of getStaticType can therefore avoid enclosing static type computation
in try-catch.

Closes #38597

Change-Id: I52eaacd30256333d7c368e5d14f4e4956bafc96f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121988
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-11-21 22:15:58 +00:00
Dmitry Stefantsov 0b9665fc8b [cfe] Use library's non-nullable modifier when creating new types
It's a part of internal cleanup of pkg/kernel and pkg/front_end.  The
library's status is queried when the new types are created for it in
order to determine the value of the nullability modifier of the type.

Change-Id: Id653c511d17b3811a26b1751876a6e5036cdbed9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125261
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-11-21 16:00:25 +00:00
Dmitry Stefantsov 3ed0ce2419 [cfe] Reuse nullability modifier when creating a copy of a type
It's a part of internal cleanup of pkg/kernel and pkg/front_end.  The
nullability modifier is reused whenever a type object is created as a
(potentially modified) copy of another type object.

Change-Id: I9d09a744281e33814289a4f4dd65c764a7905eff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125260
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-11-21 16:00:25 +00:00
Erik Ernst 6808c563aa Adjusted front end to allow non-function type aliases
This change does not enable much (because the backends do not support
non-function type aliases), but this change makes it possible to work
on this feature in dart2js code, without making the changes to the
front end and the changes to dart2js part of the same cl.

Change-Id: I0d8a27a0e87cf6908f914b2c10d97ef3d02ebec5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125961
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-11-21 15:40:45 +00:00
Johnni Winther acff31ed26 [cfe] Support null-aware index access
Change-Id: I54b58624722845e4b008b90e675516ec274bc2da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125960
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-21 14:36:30 +00:00
Johnni Winther 4c8c44ec78 [cfe] Implement lowering for constructor initialization of late fields
Change-Id: Ia6187c3eac630a2bd4351868aadfaa8771648830
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125821
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-11-21 09:36:35 +00:00
Dmitry Stefantsov f692a2fbb8 [cfe] Eliminate Nullability.legacy in transformers
Nullability.legacy is replaced with an appropriate invocation of a
method on Library to retrieve the appropriate nullability.  Only
transformers in pkg/kernel and pkg/front_end are affected.  The
inference transformers are excluded from the scope of this CL.

Change-Id: I691c4343def913388a1277227b760fd7e1aa194c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125666
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-11-21 09:12:05 +00:00
Johnni Winther 246b23e5be [cfe] Implement late lowering for local variables.
Change-Id: I18f848561f7eca61f662f8083f7ca1451a8a0b3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125605
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-11-20 08:30:18 +00:00
Johnni Winther c2584d8046 [kernel] Align TypeParameterType.hashCode with the equality strategy
Since we use a unification strategy for function type type parameter
equality, we have to assume they can end up being the same. The
implementation of TypeParameterType.hashCode now reflects that.

Closes #39409

Change-Id: I5054b591253fb7d17208ffebdc5236a7100974de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125607
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-19 16:49:59 +00:00
Jens Johansen fae6affeea [CFE] Incremental compiler has experimental invalidation strategy (first checkpoint)
This CL adds an option to the incremental compiler that enables an experiment
invalidation strategy that only rebuilds bodies for changed libraries (if possible).
As far as we know, for valid applications this should work fine, although,
applications with errors in them (or where the changed libraries have errors in them)
might not issue those errors correctly.

Known caveats:

- Doesn't work on dill library builders (aka if you load from dill we
  still have to invalidate transitively).
- Only body-in-brace-changes --- cannot add new private members for
  instance, nor changed fields.
- It doesn't track which bodies has changed so there's room for
  improvement in regards to for instance mixin stuff where we bail
  if a class from an invalidated file is used as a mixin.
- Offsets for methods, for instance, isn't updated
- Any errors issued at the outline stage won't be issued.

Change-Id: I6edf073ec47ea31429479ffe67e2e8b6d2cb80dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124980
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-11-19 13:27:14 +00:00
Dmitry Stefantsov d9d5fbc109 [cfe] Create TypeParameterTypes with default nullabilities
Change-Id: I85be937240ba5cc39840e78f374902c1e36521a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124327
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-11-19 11:22:43 +00:00
Dmitry Stefantsov 1b295ef956 [cfe] Make nullability parameter of SubtypeTester.futureType required
Change-Id: I6be7cda9b976e83e2453dfc1c851efa75eb4fb40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124326
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-11-19 11:22:43 +00:00
Johnni Winther 129565a71d [kernel] Handle property invocation in MethodInvocation.getStaticType
Change-Id: I4a1ecdb9842f4f189be67e5f5d1b99ddb40d41da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125202
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-18 10:15:08 +00:00
Johnni Winther 4b5589e0cb Reland "[cfe] Use StaticTypeContext for getStaticType" and more"
This relands commits
 "[cfe] Use StaticTypeContext for getStaticType"
 45033c6ad9

 "[cfe] Move caching of thisType to CoreTypes"
 fab25cbe0c

 "[vm/bytecode] Notify static type context when entering/leaving library"
 c9f88ae253

Change-Id: I407d6b0e3b3df503cedc9fcb2c834d835cf083f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125343
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-16 05:50:58 +00:00
Johnni Winther 09d75d94e7 [cfe] Avoid use of #isSet# field on non-nullabel late fields
Change-Id: I8dd77ee3eb1401ab29c87d303bdcface1d4d823e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124691
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-11-15 13:29:45 +00:00
Johnni Winther 45996ee170 [cfe] Add late field lowering for static/top-level fields
Change-Id: I16625257251b0badbcdfc1c9504899421db8b83f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124681
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-11-15 13:29:45 +00:00
Johnni Winther ef5fb7d3f4 Revert "[cfe] Use StaticTypeContext for getStaticType" and more
This reverts commits
 "[cfe] Use StaticTypeContext for getStaticType"
 45033c6ad9

 "[cfe] Move caching of thisType to CoreTypes"
 fab25cbe0c

 "[vm/bytecode] Notify static type context when entering/leaving library"
 c9f88ae253

Change-Id: I6171f6a74b97f2f4a77a36c242330fc2db94c82f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125341
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
2019-11-14 22:51:43 +00:00