Commit graph

68232 commits

Author SHA1 Message Date
Konstantin Shcheglov a01c3b464e Use TypeParameterElement(s) as free variables in FunctionType.toString().
Types should have never been used here in the first place.
And with nullability we get mismatches where type parameters are used
with a suffix :-(

Change-Id: I93ff61ee9bf32c24cdf3d2aadeb23cbb84b34cfa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124501
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-11-08 17:07:13 +00:00
Alexander Aprelev 9c4c49d9ee [vm/benchmarks] Reduce number of isolate spawn runs from 5 to 3.
This is to reduce load on Android benchmarking hardware.

Change-Id: Ib51b3fbbe2bf66cb0ba17375062a747f37284299
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124600
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2019-11-08 17:04:07 +00:00
Konstantin Shcheglov e3aac9e25d Check more in LegacyTypeAsserter.
Change-Id: Ie90ff509dd4327ef33a1ce7fb81657ff8c2f1412
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-11-08 17:00:07 +00:00
Janice Collins 0957c13054 Check for null before dereferencing constraint text.
Bug: https://github.com/dart-lang/sdk/issues/38839
Change-Id: I63104ec32d871a61f7e5f65e605ea01faf0d2aaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124464
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
Auto-Submit: Janice Collins <jcollins@google.com>
2019-11-08 16:41:08 +00:00
Johnni Winther fd9f79c25d [cfe] Handle deferred explicit extension access
Change-Id: I53e13ac3b4f1bdcd26ccec86814fb4d708c5cceb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124542
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-08 14:19:47 +00:00
Paul Berry 7c78ab75a5 Migration: allow already-migrated libraries to be opted in.
A core assumption of the migration tool is that the code being
migrated may have some dependencies that have already been migrated
(e.g. the SDK itself).  Of course these dependencies will need to be
analyzed as "opted in" libraries so that they can have nullability
annotations.

However, when the migration tool was first being developed, we didn't
yet have a migrated SDK, so the SDK was opted out and we just had to
pretend that it was opted in.

This CL prepares to switch over to a truly opted-in SDK by updating
the AlreadyMigratedCodeDecorator to handle opted-in code.

Change-Id: I797752401f8c7bf7cdf8d26d03d00d3d213a5127
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124466
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-11-08 13:53:17 +00:00
Paul Berry 6317779f9b Simplify TestTypeProvider constructor.
The only optional parameter that was actually used was
nullabilitySuffix, so eliminate the others, and make it a named
parameter for easier future expansion.

Change-Id: Iee05e955a1c996b4e1dd9bbec3db7fd1588ebe04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124001
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-11-08 13:53:17 +00:00
Paul Berry 7e8e66016a Migration: do not use always or never in already-migrated types.
Previously, when the code being migrated referred to a nullable or a
non-nullable type in an already-migrated library, we would use the
`always` or `never` graph node to represent the nullability of the
type.  This was problematic, because it made it difficult for
instrumentation to pinpoint precisely which element in an
already-migrated library was the cause of an expresion being
null-checked, or a type being made non-nullable.

We now create a fresh nullability node for each non-nullable type
coming from already-migrated code, with an edge to `always` or `never`
to ensure that the fresh node has the correct nullability, so that
instrumentation can see precisely which element it came from.

Since the migration tool doesn't traverse the ASTs of already-migrated
code, we can't report an AST node that caused such an edge, so an
`element` getter has been added EdgeOriginInfo to allow us to report
the element that caused the edge.

As before, types associated with already-migrated code are reported to
instrumentation via InstrumentationListener.externalDecoratedType.  As
a new enhancement, bounds of generic parameters in already-migrated
code are reported to instrumentation via
InstrumentationListener.externalDecoratedTypeParameterBound.

Change-Id: Ided4e96e2920f8d9062688f5a6fda29b9b71dd12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124000
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2019-11-08 13:53:17 +00:00
Dmitry Stefantsov e4a60912a7 [cfe] Use library's NNBD opt-in status while serializing supertypes
Change-Id: Id1ab5fd9a36b4aadb213febb0e1ae2eba968244d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124331
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-11-08 10:24:36 +00:00
Jens Johansen ee2efe8e58 [CFE] Add more incremental compiler tests, prepare for better invalidation strategy
Change-Id: I94a61b1fa9bab466a7fc09d873fc75dea6b3aeb1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124324
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-11-08 09:55:26 +00:00
Jens Johansen 5eaccc20ba [CFE] Incremental test suite now has expect files
Change-Id: I704b87d56686cb282898511fb95d6b47ee9a1c9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124323
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-11-08 09:47:36 +00:00
Karl Klose ec0d042955 [infra] Support multiple named configurations in test infrastructure
This change allows to run test.dart and pkg/test_runner with multiple arguments
for the -n option to run tests for multiple configurations with one invocation.

Change-Id: If62e0bfc364460fa415c7f700f7e449b0de56987
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122395
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2019-11-08 08:06:36 +00:00
Stephen Adams b334ea8320 [dart2js] new-rti: experiment - fault in '$is' test
Change-Id: Ie6d17e3439fb67fe79e9dec4dc7cb5437d1f6915
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121766
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-11-08 06:00:06 +00:00
Konstantin Shcheglov 7a45228584 Use ElementsTypesMixin in TypeSystem tests.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: If7195af4f5e90e6acce60912f1c66c5cf956865c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124462
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-11-08 04:00:06 +00:00
Alexander Markov ec519c3d16 [vm/aot] Disable bytecode in AOT compilation pipeline
This is needed for the next D27 release.

Change-Id: I199ac701cb140dc84bb723d232c1b408088b1fe2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124469
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-11-08 03:18:36 +00:00
Liam Appelbe f4780a6450 [vm] Late modifier for non-static final fields.
Bug: https://github.com/dart-lang/sdk/issues/38841
Change-Id: Ib2b3189b20bd056b6378fa5d7a6166acef9a5c67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124465
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-11-07 23:50:57 +00:00
Ryan Macnak 23770fcc6c [vm, gc] Increase HeapPage size to 512k; increase max heap size to 32GB.
Change-Id: I0d5649d37a73caea39d3f703f429a4af7b4c29c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113950
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-11-07 22:45:47 +00:00
Mike Fairhurst e68ca9b652 [analyzer] move crash reporting to server because telemetry isn't pulished
Change-Id: I8fb293632267e7991c578076a43bfbd277fc1ee1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124461
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-11-07 22:19:07 +00:00
Paul Berry 395373a90c Further improvement to ID testing error output.
We now print the error code as well as the message, which makes it
easier to locate the analyzer code related to the error.

Change-Id: I9e18744ce8e58efe6a5ecb7e7a98035777982836
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124381
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-11-07 22:06:17 +00:00
Paul Berry cdde5418e1 Rework null-shorting logic to improve robustness, add public API.
The proper behavior of null-shorting relies on proper pairing between
FlowAnalysis.nullAwareAccess_rightBegin (called upon reaching a `?.`
during resolution) and FlowAnalysis.nullAwareAccess_end (called upon
reaching the termiation of null-shorting during resolution).
Previously, we ensured that invariant by the following mechanism: when
visiting an expression that might terminate null-shorting, we would
walk backward through the expression to try to figure out how many
outstanding `?.`s it contains, and call
FlowAnalysis.nullAwareAccess_end an appropriate number of times.  This
was fragile because we had to guarantee that the backward walk would
find exactly the correct set of `?.`s for which null-shorting was
open.

With this change, we ensure proper pairing between
FlowAnalysis.nullAwareAccess_rightBegin and
FlowAnalysis.nullAwareAccess_end by keeping a stack of the expressions
that should terminate null-shorting once we finish visiting them.

Additionally, we add an accessor to the API called
`nullShortingTermination`, allowing a client to ask when the null
shorting introduced by a `?.` will terminate.

Change-Id: I8ec99e6bad7605d50ef3a6bc6c11634ece5043a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-11-07 22:06:17 +00:00
Mayank Patke 9cf7d7f1f4 [dart2js] New RTI: Improve handling of top types during is-test
specialization.

This change also adds plumbing so that we can access the kernel logic
for instantiation-to-bounds. This allows us to emit the `instanceof`
is-test specialization when all type arguments are at bounds.

Change-Id: I73cdcaeb1984d31761ddb9a5765e5bd0f29d06ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124206
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2019-11-07 21:57:17 +00:00
Konstantin Shcheglov 1ab6ba98d3 Test GLB and LUB symmetry for FunctionType(s).
https://github.com/dart-lang/sdk/issues/26126 was fixed,
so we can do this properly now.

R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I938df344a96470f461f8d7f4cf530bc0b290453c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124460
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-11-07 21:51:17 +00:00
Konstantin Shcheglov cb0e5c5a3e Set operator== parameter type to dynamic if directly from Object.
See https://github.com/dart-lang/language/issues/569

See https://github.com/dart-lang/sdk/issues/38339

Change-Id: I8d42135985aa4d55ffcc65cdf849572736cb9198
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124284
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-11-07 20:07:29 +00:00
Konstantin Shcheglov 548d078115 Sort named parameters in FunctionTypeImpl, fix equality.
Change-Id: I90fdf768f291161a598bb5a6c072ac8fd31f73c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124382
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-11-07 19:20:59 +00:00
Kallen Tu 54d7b0307b Refactor type_inference_engine and take type parameter variance into account for contra. checks.
This change will optimize code generation for contravariant checks on
variantly sound type parameters. We avoid emitting `_check()`s.

This will also add the change to ensure that reified types of torn off
methods are correct.

Change-Id: Ic7a4aa8f92b5e3489f7cd590070772358ef2c84b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124108
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-11-07 18:43:19 +00:00
Kallen Tu 78fac5afc1 Added additional language tests for sound variant classes extending legacy classes.
Change-Id: I214a8869dba527671b52c275d2302155382ba45f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124140
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2019-11-07 17:49:38 +00:00
Paul Berry 1d646866ac Sort declarations in pkg/analyzer/lib/dart/ast/ast.dart
Change-Id: I04c120716dd663004636b357b18602a37b29b243
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124340
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-11-07 16:24:47 +00:00
Samir Jindel 43329adf84 [vm/aot] Remove uses of blobs from tests and scripts.
Change-Id: I03ccdba1f45ddb1b6774557d55b8fd47f87c7dd3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121842
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-11-07 14:06:07 +00:00
Samir Jindel e85184eb72 [vm/aot] Put all non-writable segments together to work around bug in Jelly Bean.
Fixes https://github.com/flutter/flutter/issues/43259

Change-Id: I8c9041baf34bd07bf203469d0ebfbb2e6379ee08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123733
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-11-07 14:01:07 +00:00
Jens Johansen 8a1c328852 [CFE] Don't save and reset Library.isExternal for modular incremental compilation
Change-Id: I4fb1a7eb66717c856ee6eeb9ee5e06408931bd94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123728
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-11-07 13:37:17 +00:00
Dmitry Stefantsov b4554c1215 [cfe] Make nullability a required parameter for types
Change-Id: Id787291294cafb15cf4ecad4a9db9da4c6066638
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124135
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Auto-Submit: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-11-07 13:24:47 +00:00
Dmitry Stefantsov 6d7cfa2a72 [cfe] Verify nullabilities correspond to opted-in status of the library
Most types in opted-out libraries should be legacy (with few exceptions,
such as Null or dynamic).  All types in opted-in libraries should not be
legacy.

Change-Id: Ib595eeae0e76cdbf53ffd92313d429d8381f9786
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124320
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-11-07 12:21:46 +00:00
Jens Johansen ea9242c0ca [CFE] Refactor InferenceVisitors defaultExpression switch
Remove the switch; create a acceptInference implemented by all the
InternalExpressions instead.

Change-Id: Ib58362fee88e5dde8f1331b51e9eece209936f6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124321
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-11-07 12:02:46 +00:00
Aske Simon Christensen c504476dc4 [CFE] Extend verifier to check constants.
Add a flag to the verifier that tells it to assume that full constant
evaluation has been performed. It will then complain about anything
that should not be there after constant evaluation.

Also fix two bugs exposed by the new checks:
- The constant transformer did not visit annotations on type parameters
  in function nodes.
- The InstanceCreation constructor did not set the parent pointers of
  its children.

Change-Id: Ieef865a51892918e524da973b0cbaf52ed467181
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123400
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-11-07 09:53:26 +00:00
Kallen Tu 126297befd [analyzer] Add variance modifier values to the AST.
Change-Id: Ic8b4291941d7b11672783a5e11a741c90fb12394
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123548
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2019-11-07 01:33:53 +00:00
Alexander Markov b0cb4125e2 [vm,frontend-server] Add checks for invalid combination of options to kernel compilers
Add checks that --aot cannot be used with the following options:
--no-link-platform (front-end server, gen_kernel and Fuchsia kernel compiler).
--split-output-by-packages (front-end server, gen_kernel and Fuchsia kernel compiler).
--incremental (front-end server).
--import-dill (front-end server).

Change-Id: I0a38ab8b3a31ec497d1dc05ace0c254455879504
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123820
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-11-07 00:45:33 +00:00
Konstantin Shcheglov 3dacbae99e Use 'isRequiredNamed' for FunctionType subtyping.
Change-Id: I3d8ca70be7f782e1574535e463f9049ddd0e28a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124285
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-11-07 00:17:53 +00:00
Alan Knight 752bbce46f Copy dart:html files to sdk_nnbd automatically and opt out
Change-Id: I78ab534da123afb12a31681b47ba1f2fb9567992
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124202
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Alan Knight <alanknight@google.com>
2019-11-06 23:59:33 +00:00
Ryan Macnak d3d19f3ca5 [vm, gc] Fix a case of dropping safepoint interrupts.
Consider the interleaving:
  Mutator: read stack limit (generated code)
  Mutator: read safepoint requested (RUNTIME_ENTRY)
    Helper: set safepoint requested
    Helper: set stack limit (ScheduleInterrupts)
  Mutator: clear stack limit  (GetAndClearInterrupts)

Bug: https://github.com/dart-lang/sdk/issues/39246
Change-Id: I5640c65eee514bb8f58779a472530cfe05d368a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124280
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-11-06 23:43:53 +00:00
Liam Appelbe 2ae9b6f653 [vm] Handle late fields with no initializer.
Bug: https://github.com/dart-lang/sdk/issues/38841
Change-Id: I23526e7e8cc5928c22c53414dd201c07199b9610
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124210
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-11-06 23:39:22 +00:00
Nate Bosch fe977a4326 Rename kernel compilers methods starting with _get
https://dart.dev/guides/language/effective-dart/design#avoid-starting-a-method-name-with-get

Most are name the same without the "get" since a method named as a noun
is idiomatic in Dart. For translating between difference representations of a
location rename as "toSourceLocation".

Change-Id: I727b28da05e2c4aea054d14edd82be3e21d406d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124283
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
2019-11-06 23:34:33 +00:00
pq d76b2ccc16 rename tests
Follow-up from: https://dart-review.googlesource.com/c/sdk/+/124260/2/pkg/analyzer/test/src/diagnostics/deprecated_member_use_test.dart#521

Change-Id: Iaa714754eed38bf9f5a32e147f4506a00a2cc8a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124281
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-11-06 23:17:43 +00:00
Nate Bosch 0d5e633428 Fully parenthesize a boolean expression
Change-Id: I1f518627bdf9cb85d2bb99a7476c1be7fc0e5908
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124282
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-11-06 23:02:55 +00:00
Régis Crelier 4b9638aaa1 [VM/nnbd] Use a single byte in snapshot to write flags and nullability of types.
This saves one byte per Type and per TypeParameter objects in the snapshot.

Change-Id: Ie5241c992a5c5cc6b3d7a211f20e7a0ddbd00b72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124300
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2019-11-06 22:44:33 +00:00
Nicholas Shahan f6efefc09c [dartdevc] Move the custom type test logic to patch files
This unblocks changing this logic for NNBD since they are now forked.

The custom logic for FutureOr has been problematic to represent in the patch
files. They need to be callable from the class but they can't be static methods
in Dart because they reference the generic type argument. It is a design quirk
of the runtime representation that the type argument is captured in the wrapping
closure and in scope that allows the existing implementation to work.

In a future change I will thread an NNBD flag through the compiler to emit
different logic for the FutureOr type tests when running with NNBD.


Change-Id: I9463e3cd375f8098592ea84e956e833952f41bb3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123921
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-11-06 22:09:31 +00:00
Paul Berry 1994c5c323 Improve error reporting in ID tests
Change-Id: I3a1da7cef955cdef62d4fea3a98f5949309695be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124240
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-11-06 21:57:41 +00:00
pq e93bf30171 fix deprecated messages for implicit getters/setters
Fixes: https://github.com/dart-lang/sdk/issues/39267

Change-Id: Iad0f22f4da8239a0d802d7b3d951afb42a5c8965
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-11-06 21:43:51 +00:00
Brian Wilkerson b647e327aa Fix an assertion to support migration of part files
I'm not sure where the test for this should go. I found it while
migrating vector_math.dart.

Change-Id: I0c1c5ba91375b2a36540f4c270cef6dc9558a745
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124103
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-11-06 20:18:31 +00:00
Mike Fairhurst 335b85fea1 [nnbd_migration] for tool/trial_migration, accept interest argument.
Change-Id: I1a92d2afd0483bbb156b8b9d82817fde36b821c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124204
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-11-06 19:25:19 +00:00
Konstantin Shcheglov 3e3a926690 Fix spread and Set/Map literal disambiguation when NNBD.
Fixes https://github.com/dart-lang/sdk/issues/39120
Fixes https://github.com/dart-lang/sdk/issues/39117
Fixes https://github.com/dart-lang/sdk/issues/39115

Change-Id: Ice9c525b2584940b66e9afe2c593bd41852026c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124207
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-11-06 19:20:44 +00:00