Commit graph

74157 commits

Author SHA1 Message Date
Jonas Termansen
7a1d6a9942 [benchmark] run_vm_tests with kernel-service.dart.snapshot.
This change tests that run_vm_tests runs correctly when provided with
the kernel service snapshot, which is needed to run benchmarks like
UseDartApi.

Test building the kernel-service.dart.snapshot.

Change-Id: I1cb750a16e32daba2eee46e245cc7d4e7d230165
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151395
Reviewed-by: Alexander Aprelev <aam@google.com>
2020-07-10 13:35:03 +00:00
Dmitry Stefantsov
060d948339 [cfe] Add support for classes to round-trip text serialization
Supplementary changes for handling Classes done in this CL are the
following:

  * handling Supertypes
  * handling Constructors
  * handling remaining kinds of Procedure
  * serializing AsyncMarker the same way as flags
  * eliminating the need to wrap flags into IntLiteral

Change-Id: Id69c6e37f093cf80206f4657b649f79c75484775
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154000
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-07-10 12:49:27 +00:00
Aske Simon Christensen
b6d14a940a [gardening] Import NNBD version of FFI in NNBD thread_pool_test.
Change-Id: Ia44c34915939dff338f50e7b765f47a66a9bbe09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153961
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2020-07-10 12:41:37 +00:00
Alexander Thomas
13fb8c132d Reland "[test] Add paths to chrome and firefox to the environment when present"
This is a reland of 40c79c8ed7

The build recipes now use forward slashes on Windows to pass the path to
the browser executable to test.py.

Original change's description:
> [test] Add paths to chrome and firefox to the environment when present
>
> This adds a CHROME_PATH or FIREFOX_PATH environment variable to the
> test's evnironment which contains a path to the browser's executable.
> This is only set if the --chrome or --firefox argument was passed to
> test.py.
>
> https://github.com/dart-lang/sdk/issues/42417
>
> Change-Id: I711de6ab91b8ffbbe72c7fb1530b68c4189a4b8a
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153209
> Commit-Queue: Alexander Thomas <athom@google.com>
> Reviewed-by: William Hesse <whesse@google.com>

Change-Id: Ib61b8c6424fa7bce525d76d8b94756a215d28c1e
Cq-Include-Trybots: dart/try:dart2js-strong-win-x64-chrome-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153980
Commit-Queue: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2020-07-10 12:35:57 +00:00
Sigurd Meldgaard
66cb8a8ed8 [pub] Cherry pick fix
This contains only the single commit of https://github.com/dart-lang/pub/pull/2556 cherry picked on a branch

Change-Id: I07147955e4bf0e4c5ca077dcaeffd431c991ebb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153962
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2020-07-10 10:38:48 +00:00
Karl Klose
96d839a436 [infra] Remove trailing new-line from auth token file
The result from 'gcloud auth print-access-token' contains a
new-line that cannot be used in the header. To make this use case
easier, remove new-lines, if found.

Change-Id: I44a9cc2bcfe4a8ef06e47a8495e69e116e9a6dfa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153921
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2020-07-10 09:52:38 +00:00
Dmitry Stefantsov
99b693ba88 [cfe] Add support for constructor initializers to text serialization
Change-Id: I1a311978460bee2f554a3bddbaf329698d1d33c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153779
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-07-10 08:32:58 +00:00
Alexander Thomas
d5664c360a [co19] Roll co19 to ca44d7a864e0fb9d214be16818f56a485ab778c1
2020-07-08 sgrekhov@unipro.ru Fixes 797. LibTest\collection\HasNextIterator migrated to null safety
2020-07-08 sgrekhov@unipro.ru Fixes 796. LibTest\collection\IterableMixin migrated to null safety
2020-07-08 sgrekhov@unipro.ru Fixes 795. LibTest\collection\IterableBase migrated to null safety
2020-07-08 sgrekhov@unipro.ru Fixes 794. LibTest\collection\LinkedHashMap migrated to null safety
2020-07-08 sgrekhov@unipro.ru Fixes 792. LibTest\core\Map migrated to null safety
2020-07-08 sgrekhov@unipro.ru Fixes 791. LibTest\collection\Queue migrated to null safety
2020-07-08 sgrekhov@unipro.ru Fixes 789. LibTest\collection\HashMap migrated to null safety
2020-07-07 irina.arkhipets@gmail.com Fixed issue 790: LibTest\convert\Base64Encoder tests adopted to nnbd
2020-07-07 irina.arkhipets@gmail.com Fixed issue 790: LibTest\convert\Base64Codec tests adopted to nnbd
2020-07-07 irina.arkhipets@gmail.com Fixed issue 790: LibTest\convert\AsciiCodec tests adopted to nnbd
2020-07-07 irina.arkhipets@gmail.com Fixed issue 602: Added tests for least and greatest closure with nnbd.
2020-07-07 irina.arkhipets@gmail.com Fixed issue 785: Updated expected results for future flattening tests in nnbd-weak mode.
2020-07-07 sgrekhov@unipro.ru Fixes 788. LibTest\collection\DoubleLinkedQueueEntry migrated to null safety
2020-07-07 sgrekhov@unipro.ru Fixes 787. LibTest\collection\DoubleLinkedQueue migrated to null safety

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

Change-Id: I14d3ff4856296c66a403e1c1a9d767deb0af3f80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153604
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-07-10 07:58:49 +00:00
Dmitry Stefantsov
145d4585e7 [cfe] Add support for Fields to round-trip text serialization
The flags on the fields are serialized as lists of flag names,
allowing for any combination of the flags in any order.  Similar
technique is used in this CL to serialize the flags on Procedures and
VariableDeclarations.  This is in the contrast with the previous
approach for those nodes, when the flags were the part of the
serialized name of the node (such as "static-method" for static
Procedures or "final" for final VariableDeclarations).

Change-Id: I02eb5ac92f6273542f08f269aee8e6519d3085e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153766
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-07-10 07:23:08 +00:00
Dmitry Stefantsov
f75a982361 [cfe] Complete support for statements in text serialization.
This CL adds round-trip serialization support for FunctionDeclarations
and the remining kinds of VariableDeclarations, completing the support
for statements.  Additionally, the CL fixes a variable scope issue in
Catch clauses, namely that the exception and the stack trace variables
should be visible in the body.

Change-Id: I3843d491b85a65c4953d6fc10a59ecbde5017029
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153611
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-07-10 07:23:08 +00:00
Johnni Winther
27446b463e [cfe] Update test expectation for language/unsorted/flatten_test/12
+ use the inferred return type in error reporting when no return type is
declared. This turned up in this particular case where we report an
error between the returned value and the inferred return type.

Closes #42546

Change-Id: I48da24047f2e92ca91a514dfcb43c2ba6f65ee46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153610
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-07-10 07:01:18 +00:00
Stephen Adams
cf7a63afe6 [dart2js] inlining heuristics for generative constructor factory
Account for the size of the a generative constructor factory.

The factory evaluates all the initializers up the inheritance/mixin chain,
allocates the object, and then calls all the constructors down the
inheritance chain. All this is missed by the old code looking at the
immediate constructor body, sometimes causing extremely large
constructors to be inlined.

Change-Id: I8803b0f4b4155dec0f7878fd5527c1dd507b9c80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153560
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-07-10 01:40:08 +00:00
Paul Berry
9f8aaf65c7 Issue an error if a prefix in a type name is shadowed by a local variable.
See #42620.

Change-Id: Ifd18c939082935390df0c2aa0bd724cf6f76c27c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153705
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-07-09 23:09:18 +00:00
Paul Berry
fe9596bac3 Add language tests for flow analysis conservative de-promotion scope.
These tests verify the scope over which a variable can become
de-promoted due conservative modeling of demotion.  The conservative
model of demotion is used for loops, closures, switch statements, and
try blocks.

The implementation of flow analysis already passes these tests.  I
will shortly be making a spec clarification that brings the spec in
line with the implementation.

Change-Id: I22a5584a808169fa228c2972c25844c432916c06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152920
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2020-07-09 22:45:38 +00:00
Konstantin Shcheglov
0a5e69ae6f Fix for no inputs in build mode.
R=brianwilkerson@google.com

Bug: https://buganizer.corp.google.com/issues/160854685
Change-Id: I9dd7f6e6c8293432c39d2d0cdd28bcd06880bf8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-09 22:14:48 +00:00
Konstantin Shcheglov
dfdc7e45c5 Report PRIVATE_SETTER.
Change-Id: I823582328b4b9cc63ac734e9ea1c9354175a6e18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153880
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-09 21:51:50 +00:00
Jonas Termansen
b0b957fe3f Roll benchmarks-internal 0b09b169b02f..78e4b5975ab4
78e4b5975ab4a8ccc15dea6595ba5295941f6ae4 https://dart-internal-review.googlesource.com/c/benchmarks-internal/+/2060

R=regis@google.com

Change-Id: Ibf36cb48d9cdd566069ffec93fd14c90a9f0bff6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153920
Auto-Submit: Jonas Termansen <sortie@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2020-07-09 21:48:04 +00:00
Vyacheslav Egorov
7e5ac71ff3 [vm/aot] Drop Library::dependencies_ early.
Even though this field is never written into snapshot dropping it
eagerly allows to compact away a lot of entries in the symbols
table, which are otherwise retained.

On the large internal application this gives the following improvement:

Breakdown by object type:
+--------------------------+--------------+---------+
| Type                     | Size (Bytes) | Percent |
+--------------------------+--------------+---------+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| ArtificialRoot           |           -7 |   0.01% |
| OneByteString            |        -1603 |   1.26% |
| Array                    |        -3206 |   2.51% |
| (RO) _OneByteString      |      -122688 |  96.22% |
+--------------------------+--------------+---------+

Total: -127504 bytes
       -0.39% of old size
Change-Id: Ib6993e3036ff6b36515a17ee7f60175e1188c8fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153768
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2020-07-09 21:43:44 +00:00
Ryan Macnak
48c2181179 [build] Automatically rebuild sdk_hash when the Git commit changes.
Compare the dependencies of version.cc.

Bug: https://github.com/dart-lang/sdk/issues/42633
Change-Id: I3ad50736fa73cbba2c2a5a582cbf1c76e49c35f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153860
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2020-07-09 21:12:15 +00:00
Jacob MacDonald
e780b31f73 prep package:js for null safety release
Change-Id: Ie4ce3d83d4dfc60ff5728152e9b391a84c50e6b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153824
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2020-07-09 19:29:03 +00:00
Nicholas Shahan
d045c137db [test] Fix expected type in error message
We missed the nullable type in the expected strings during the
migration.

Change-Id: Ie354e89a0ba0ca1a74caaffcc41c72655c280f04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153704
Auto-Submit: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-07-09 19:09:32 +00:00
Konstantin Shcheglov
39c94735a3 Report MIXINS_SUPER_CLASS.
Bug: https://github.com/dart-lang/sdk/issues/42256
Change-Id: I49c70d5a172062fed4d8663d95701ba855effda6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153823
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-09 19:05:52 +00:00
Martin Kustermann
d215ab6d73 [vm] Assign top-level classes cids outside 16-bit range
Right now we assign class ids to top-level classes, abstract classes as
well as concrete classes. All of them have allocated from a 16-bit pool
of ids. The VM FATAL()s once it hits that limit.

Customers who run very large programs (significant amount of generated
code) on the Dart VM have started to hit this 16-bit class limit.

Concrete classes can have instances in the heap. Our current heap layout
only allows 16-bit class ids to be encoded in the header word. To avoid
increasing the size of heap objects or shrinking the size of the identity
hash code to 16-bit we keep class ids in object headers to be 16-bit.

Abstract classes cannot have instances in the heap. Though their class
ids are encoded in type objects. Furthermore we sort classes in
AOT/AppJIT mode to perform fast class-id range checks. To avoid impacting
this optimization we treat abstract classes the same way as concrete
classes.

Top-level classes cannot have instances in the heap. Their class ids are
only used in the runtime code, for example for hot-reload as well as
part of the service protocol.

=> We can allocate class ids outside the 16-bit range for top-level
classes, thereby freeing a significant amount of space in the 16-bit
range.

This CL does exactly that: We change classid_t to be int32_t. The
ClassLayout::id_ can now be assigned ids outside 16-bit range for
top-level classes. To do this we keep dart classes and top level classes
as separate arrays in the ClassTable.

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

See also b/160229360

Change-Id: I6710a644e7b0ab2d4f4c792bef8e1f91cb117421
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153607
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-07-09 18:33:32 +00:00
Christian Altamirano
4f66bb07e2 [dart2js] Added a powerset flag for new experiment
This experiment will use a powerset abstract value domain in the inferrer


Change-Id: I216ff9c24d1e7292688426ae7bcb52b15aa2714e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153720
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Christian Altamirano <coam@google.com>
2020-07-09 18:01:02 +00:00
Lasse Reichstein Holst Nielsen
5580f89d2c Add test for new numeric operator typing rules.
Change-Id: I8e3c478c129e633421625967ff4ac41c9b565fb2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153200
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2020-07-09 17:41:52 +00:00
Brian Wilkerson
73e9554779 Update meta to correspond to the published 1.2.2
Change-Id: I9dcbd9237d25948eb62e3ba68403436c64c70845
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153822
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2020-07-09 17:38:32 +00:00
Jonas Termansen
c84c1cb832 [benchmark] Don't pass --sound-null-safety to dart_precompiled_runtime2.
The autodetection was fixed in bbc8aedada,
so the workaround of passing --sound-null-safety to the AOT runtime is
no longer needed.

This change tests that the autodetection does in fact work.

Bug: https://github.com/dart-lang/sdk/issues/42421
Change-Id: Ibbe9665905e817a28964b698e6c437897c9dc6ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153771
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-07-09 17:21:52 +00:00
Jaime Wren
9a4e2b1514 Add an additional completion metric into completion_metrics.dart: 'use old vs new relevance rank comparison'
Change-Id: I21eb1447dd6c833870158717031a01d7e8f253c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153485
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-09 17:19:02 +00:00
Danny Tuppeny
c4a2efd6e7 Switch all generated LSP classes to use named constructor arguments
Change-Id: I111b58fa5d04314247d5f92650491cdeef6bd4a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153841
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
2020-07-09 17:18:07 +00:00
Danny Tuppeny
6db0396c83 Regenerate code from v3.15 LSP spec
Commit v3.15 of LSP spec + regen generated code

Change-Id: Ic0823063791900f347e1ff1f2242a6e4e6ed8ca6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153778
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-09 17:18:07 +00:00
Danny Tuppeny
d86fa966a9 Tweaks to be able to parse v3.15 spec
Change-Id: Ifdb8696246b6893b743754dab5344d5939550a10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153776
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-09 17:18:07 +00:00
Alexander Markov
0162e7c1f8 [vm] Enable fingerprints checking of recognized methods
Fixes https://github.com/dart-lang/sdk/issues/36376

Change-Id: I470b95a1f854ef6e3798422508a89bc61f71cd0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153740
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-07-09 17:10:57 +00:00
Nicholas Shahan
2280e77f52 [ddc] Fix copy paste error in ddb script
Change-Id: I17e8c72369a5b9331dcceaa29343f6596e7440b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153821
Auto-Submit: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2020-07-09 17:10:04 +00:00
Jonas Termansen
a8200e2b1b Roll benchmarks-internal 81f0ebd1fd65..0b09b169b02f
0b09b169b02f8bc78bbb2486abaeb87b68ded660 https://dart-internal-review.googlesource.com/c/benchmarks-internal/+/2040

R=regis@google.com

Change-Id: Ic2dbfd4c60808fcad4d258133792ffc254d997fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153840
Auto-Submit: Jonas Termansen <sortie@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2020-07-09 17:02:52 +00:00
Jonas Termansen
18081c7486 [infra] Add package:vector_math to DEPS.
Change-Id: I22f7038fb5bb4ca8d48f9151001ea44c0992dca8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153772
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2020-07-09 17:02:02 +00:00
Jacob MacDonald
6dcd45f2b3 update nullsafety release version
Change-Id: I0620fa89b971f363766cf4fa3e1f0ad33193ab28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153820
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2020-07-09 16:39:12 +00:00
Konstantin Shcheglov
6d65549349 Include all files of the library into ExceptionResult.
R=brianwilkerson@google.com

Change-Id: I53fc35470ab841e602917af78a37f9b1c0e419b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153708
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-09 15:52:51 +00:00
Paul Berry
c71d40f70b Migration: allow clients to use CommandLineOptions.
Previously this class was marked `@visibleForTesting`, but we need
clients to be able to create instances of this class in order to drive
the migration process.

Change-Id: Ibb8a4cda342942dcb15e6fd7625387d246b41f84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153800
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-07-09 15:21:52 +00:00
Daco Harkes
5f68b0bba6 [test/ffi] Test struct workaround for external fields
Make sure the individual getter/setter workaround for structs in NNBD
works. That way structs can be migrated without having to opt in to
the proposed --enable-experiment=external-abstract-variables for
external fields.

Note that this requires dart:ffi users to migrate twice for NNBD, once
to the workaround, and later a cleanup to external fields.

Change-Id: I2a9020ff7df3ebf08e04f71183f9297d87acb1b1
Cq-Include-Trybots:dart/try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,vm-precomp-ffi-qemu-linux-release-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153777
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2020-07-09 15:09:21 +00:00
Jens Johansen
01ac35b844 [parser] Allow '..' as something following a nullable type
Fixes https://github.com/dart-lang/sdk/issues/42621

Change-Id: I56fd9475ffb3821592a6917949e858c6e48bdf20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153773
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-07-09 15:03:17 +00:00
Jens Johansen
c8b5a9b9d3 [VM] Add more information when seeing disagreeing sources in a dill
Hopefully this extra information will help debugging an issue such as
https://github.com/flutter/flutter/issues/60794

Change-Id: I426a9ab50a88f49ded47012a8f0aa280ea7e5ae2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153212
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-07-09 14:55:33 +00:00
Jens Johansen
e8d3389eb5 [VM] Expression compilation when loaded from dill (part 2)
Previous version
(landed via https://dart-review.googlesource.com/c/sdk/+/135683)
only worked if the dill was loaded via
Dart_LoadScriptFromKernel where script_kernel_size was set,
and when the platform dill could be loaded from a file called the right
thing.

This CL makes it work for Dart_LoadLibraryFromKernel too and allows
the VM to send the platform along (explicitly or implicitly) and only
tries to load the platform from a file with the right name if no
platform is given in any of the inputs.

This should fix http://b/148776866

Change-Id: I62317400a932b7dcd9e126a5a88907d507f9d658
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153609
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-07-09 14:55:11 +00:00
Erik Ernst
efb1143943 Fix typos in CL 148324
CL 148324 'For external/abstract fields: add tests and update Dart.g'
contained a couple of typos, this CL corrects them.

Change-Id: I6ee9b769c8b23e299b13cbb5d4ba38cbfec7656f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153145
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-07-09 14:00:02 +00:00
William Hesse
9321c49984 [infra] Update checked-in SDKs to 2.9.0-21.0.dev
Change-Id: I368e52a4b00759b5b7069c2802fdde91a28b2653
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153775
Reviewed-by: Karl Klose <karlklose@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2020-07-09 13:52:51 +00:00
Karl Klose
7940835945 [infra] Support reading builder status from staging database
Change-Id: Ic8397c68d441bb256a6165834f7550f0f4a490c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153774
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2020-07-09 13:14:02 +00:00
Jens Johansen
3199847b35 [CFE] Don't issue bogus NNBD Strong error as package sets a language version
Before this CL, if one compiled a script as strong nnbd (with nnbd
enabled), where the script was marked as as a version where nnbd is enabled,
but where the script lived in a package with a version that was too low
one would get an error.
The reason is that the language version is set twice:
First when the library is created (but the file isn't read yet). This sets
the version from the package. Here an error was issued.
The second time is when the file is read and the file-version-marker is
parsed (e.g. @dart = 2.9).

The error should only be given if - once the final verison has been set
(i.e. after parsing the file) - the version is "wrong".

To make matters worse the (bogus) error given even points to the files
first position which can make it seem like it specificly points to the
@dart annotation and says it's wrong.

This CL fixes the error so it's only issued when it should be.
It does not fix pointing semi-weirdly.

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

Bug: 42323
Change-Id: Id84ca06b2e4eca5912e65798ed2d86f8c89d71a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153769
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-07-09 12:42:11 +00:00
linzj
9ae7fd25d1 Fix disassembler fails to mention sign extend for loads on arm64.
Last fix reverted, should not mess up with the format option.
Should only deal with load operations.

R=kustermann@google.com

Change-Id: Ib9037fc32445e899ab92a8110f29f51f482520e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153641
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-07-09 11:25:31 +00:00
David Morgan
e5086f9eac Support google3 DEBUG/NDEBUG handling.
Change-Id: I04beeb6c24969610255d52a1816e444e57dfe51f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153616
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2020-07-09 09:51:31 +00:00
Vyacheslav Egorov
5d47c5f278 [vm_snapshot_analysis] Improve compare command
Add breakdown by node type when this information is available.

Change-Id: If2d477d0720aff69e3a168b9520fc3c2ccd153c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153767
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-07-09 09:43:32 +00:00
Johnni Winther
e253d07ed3 [cfe] Add --no-deps option to compile_platform script
This allows for disabling the generation of .d deps file when compiling
the platform dill files.

Change-Id: I37774f0dbdae7863fc1cf53b1c5e0d29c6bbdf2c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153765
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-07-09 09:24:11 +00:00