Commit graph

79741 commits

Author SHA1 Message Date
Tess Strickland
9ad1dfb54e [vm/compiler] Fix Slot::GetTypeArgumentsSlotFor()
It needs to check whether the class the type arguments field is in
has compressed pointers, not whether TypeArguments has compressed
pointers.

Since we need the class to know whether compressed pointers are in
play, remove the version that just takes the offset.

TEST=Existing tests.

Change-Id: Ie6de8e0b2366b86f99a7fda362809dd1e10f99b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199484
Auto-Submit: Tess Strickland <sstrickl@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-05-13 21:09:46 +00:00
Joshua Litt
b8a1cd4850 [dart2js] Cleanup obsolete 'getGlobalFromName' builtin.
Change-Id: Ie2b0f586fedbd183ea98b08fc766d5acf52d9e7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198881
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2021-05-13 20:47:38 +00:00
Kenzie Schmoll
a0de473efd Update UserTag class documentation to point to DevTools instead of Observatory
Change-Id: I3814bc4cf1485d78409bd358fb62df9794c824ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199740
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Kenzie Schmoll <kenzieschmoll@google.com>
2021-05-13 19:19:55 +00:00
Devon Carew
8aed3ae89a [analysis_server] re-enble null safety for the analysis server entrypoint
Change-Id: I13db035c320bd7969bde4b9e4197f2524fbfddd3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-05-13 17:18:15 +00:00
Stephen Adams
5b93e8d44b [dart2js] Remove staticFieldsForReflection
Change-Id: I0ee3ec5528df50e413d861eae495a6440a029602
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199620
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2021-05-13 16:39:45 +00:00
Brian Wilkerson
b42c5c77d4 Cache documentation comments to improve completion performance
I'm not convinced that this is the right way to cache comments, so
feedback is welcome.

Change-Id: I2bd393b80e05c26199020e19daf0eadeb99d8c2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199303
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-05-13 16:31:35 +00:00
Janice Collins
04fb485fd5 Reland "Update dartdoc to 0.43.0."
This is a reland of 076341b89a

Original change's description:
> Update dartdoc to 0.43.0.
>
> Release notes:  https://github.com/dart-lang/dartdoc/releases/tag/v0.43.0
>
> Change-Id: If60b856ef36a629d89534d5cc9a828b0782937ec
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199501
> Reviewed-by: Samuel Rawlins <srawlins@google.com>
> Commit-Queue: Janice Collins <jcollins@google.com>

Change-Id: If5746369b2a1fdc05a6a86ff80cacc279cf802d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199701
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
2021-05-13 16:11:55 +00:00
Tess Strickland
5eb887bfbc [pkg/vm_snapshot_analysis] Fix size check again after 7131d318.
After 7131d318 landed, the instruction size for the modified function
(which removes all but one closure) shrank enough to more than outweigh
the extra nodes that get attributed to it compared to the original.

TEST=pkg/vm_snapshot_analysis/test/instruction_sizes_test

Cq-Include-Trybots: luci.dart.try:pkg-mac-release-try
Change-Id: I05f2dbd6ec2850a66b38c9f70fb67a905208c384
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199660
Auto-Submit: Tess Strickland <sstrickl@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-05-13 14:36:11 +00:00
Alexander Aprelev
b7ecafe495 [infra] Ensure that only git dependencies are pulled/updated via git.
There could be also 'cipd' dependencies which are not compatible with git cloning/checking-out logic

Change-Id: I25243a07e119e73176857e19a83b3e9e632346c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199560
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-05-12 22:31:40 +00:00
Ben Konyi
bd50c47824 [ package:dds ] Prep for 1.8.0 release
Change-Id: I2e6a1ebdd752f3cee2ffa38a99e84e56296da7d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199562
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-05-12 22:31:01 +00:00
Danny Tuppeny
f6c91128be [analyzer] Add an LSP semantic token modifier to escape sequences
Work to support https://github.com/Dart-Code/Dart-Code/issues/3329.

Change-Id: I160c0f350213cd8bfb44319ad39551c84f0007ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199483
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-05-12 21:02:50 +00:00
Riley Porter
eb14bf2472 [ddc] Limit DDC to only skip reifying tearoffs in foreign JS when in the SDK.
Change-Id: I4a671b7064da89d7595e74b22135dc9817523622
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199540
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Riley Porter <rileyporter@google.com>
2021-05-12 20:46:51 +00:00
Michael Thomsen
2f85591b67 Switch to recommended lints
Bug: https://github.com/dart-lang/lints/issues/20
Change-Id: I433a393a9a6755ed9140326a413f8360a4d508bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199482
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2021-05-12 20:07:51 +00:00
Janice Collins
506a7b542d Revert "Update dartdoc to 0.43.0."
This reverts commit 076341b89a.

Reason for revert: For some reason, this broke Golem?

Original change's description:
> Update dartdoc to 0.43.0.
>
> Release notes:  https://github.com/dart-lang/dartdoc/releases/tag/v0.43.0
>
> Change-Id: If60b856ef36a629d89534d5cc9a828b0782937ec
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199501
> Reviewed-by: Samuel Rawlins <srawlins@google.com>
> Commit-Queue: Janice Collins <jcollins@google.com>

TBR=devoncarew@google.com,jcollins@google.com,srawlins@google.com

Change-Id: I74653fdaad44ff3729f85af0844f38818c7095b1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199541
Auto-Submit: Janice Collins <jcollins@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2021-05-12 19:47:02 +00:00
Tess Strickland
a8864b6457 [vm] Use <Class>::ContainsCompressedPointers() when defining Slots.
Instead of specifying FINAL_COMPRESSED and VAR_COMPRESSED, the
macros for defining boxed native slots use the class's
ContainsCompressedPointers() predicate to determine whether a Slot
points to a compressed field.

Also use owner.HasCompressedPointers() when getting a Slot for a
particular Field.

TEST=Refactoring, so just running against the current test suite.

Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-x64c-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-linux-debug-x64-try
Change-Id: I4bf25ffa2dbe89dc9a922305820dc4b752f47d13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198044
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-05-12 19:09:50 +00:00
Janice Collins
076341b89a Update dartdoc to 0.43.0.
Release notes:  https://github.com/dart-lang/dartdoc/releases/tag/v0.43.0

Change-Id: If60b856ef36a629d89534d5cc9a828b0782937ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199501
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
2021-05-12 17:57:41 +00:00
Konstantin Shcheglov
809d84ec1f Update PrefixElementImpl, use covariant.
R=brianwilkerson@google.com

Change-Id: I5ef3edd62dc5a6521d5fc369fcaab1a8df7db351
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-05-12 17:52:20 +00:00
Ryan Macnak
b4c64a1787 [vm, x64] Shorter UnboxInt64Instr with compressed Smis.
TEST=ci
Change-Id: Ib80b9cd80f3656ea6c5f31e0dbc7229632d8783d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198140
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-05-12 17:02:10 +00:00
Tess Strickland
7131d3182c [vm/compiler] Properly treat AllocateClosureInstr as an allocation.
When we switched from allocating closures with AllocateObject to
using AllocateClosure, a couple of places that needed to check for
IsAllocateClosure() were missed. This caused AllocateClosureInstrs to
never have a NotAliased Identity(), which then forced some
AllocateUninitializedContextInstrs to be kept instead of eliminated.

TEST=Checked using benchmarks that saw regressions due to this change.

Change-Id: If63d4cae190453233429b5657cbe177cac265074
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199430
Commit-Queue: Tess Strickland <sstrickl@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Auto-Submit: Tess Strickland <sstrickl@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-05-12 16:34:00 +00:00
Ryan Macnak
3fa5667c1a [vm, arm64] Combine BARRIER_MASK and HEAP_BASE into one register.
BARRIER_MASK requires 8 low bits and HEAP_BASE requires 32 high bits. Combine them into a single register HEAP_BITS, and use ARM's shifted operands to continue accessing the relevant bits in a single instruction.

TEST=ci
Change-Id: I5a4cd43fec2d19615239ec5cec2ac282d17c461c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198100
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2021-05-12 15:41:40 +00:00
Lasse R.H. Nielsen
46b3b6352d Clean up null-aware tests.
Change-Id: I0e932695b00dc8fab34fbbeada5777cb4534150e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162510
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2021-05-12 15:21:10 +00:00
Sam Rawlins
d9ff433081 Remove unnecessary imports in pkg/compiler
In each library where an import is removed, the library uses some elements
provided by the import, BUT there is another import which provides all of the
same elements, and at least one more which the library uses.

In this change, we remove the imports which can be simply removed in favor of
the other already present imports.

See https://github.com/dart-lang/sdk/issues/44569 for more information.

Change-Id: I38a6422e5fc59767fe54eae78a5e24357f1cc030
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199461
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-05-12 15:12:40 +00:00
Jonas Finnemann Jensen
47f88b5ff3 Removed 7zip from Windows distribution of the Dart SDK
Bug: https://github.com/dart-lang/pub/issues/2939
Change-Id: I30148017e33a4d7af99102bd98b99e70d5641478
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199250
Commit-Queue: Jonas Jensen <jonasfj@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2021-05-12 14:50:50 +00:00
Tess Strickland
aa952090fe [pkg/vm_snapshot_analysis] Update expectations in test.
Fixes https://github.com/dart-lang/sdk/issues/45986

TEST=pkg/vm_snapshot_analysis/test/instruction_sizes_test
Cq-Include-Trybots: luci.dart.try:pkg-mac-release-try
Change-Id: I0ab4ffb04349208007f01ff989a26efd297ec64b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199427
Auto-Submit: Tess Strickland <sstrickl@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2021-05-12 14:31:50 +00:00
Martin Kustermann
b0ac3711f2 [vm/concurrency] Add "iso-stress-linux" builder running isolate stress test configurations
Issue https://github.com/dart-lang/sdk/issues/36097

TEST=runtime/tests/concurrency/run_stress_test_shards.dart

Change-Id: I7c76260161e7257f0ff77d6fc221d019156f98a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199248
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-05-12 14:09:35 +00:00
Mayank Patke
2d62f325a2 [dart2js] Add a flag to omit names for late cells.
Change-Id: I67125e35b5339697b97738dd0c5540fe7a773510
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199300
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-05-12 14:02:10 +00:00
Mayank Patke
9db722c8a1 [dart2js] Remove variable cells from late lowering when exiting scope.
Change-Id: I2ca89d14349d5779a878e10499d3e23bba2778d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196346
Reviewed-by: Stephen Adams <sra@google.com>
2021-05-12 14:02:10 +00:00
Jens Johansen
dce296cc36 [VM] Fix nullptr check in DFE
TEST=all tests running from file and none (to my knowledge) testing
the failure case as that's going to be a weird timing issue.

Change-Id: I997515587e86b324880fdd9fe11e86343e8bb973
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199423
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2021-05-12 14:01:30 +00:00
Lasse R.H. Nielsen
a5e18113f3 Remove references to triple-shift and generic-metadata experiments.
TEST= removed flags from test. No behavior should change.

Change-Id: I401bfb68c082d1bd405a118d5eca6a47a807945f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199241
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2021-05-12 13:35:00 +00:00
Alexander Thomas
14b8faf09c [release] Add release date for 2.13.0
Change-Id: I3d53bb328bc4b17695cfa9f004b0349b21a1aa30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199424
Reviewed-by: William Hesse <whesse@google.com>
2021-05-12 11:23:13 +00:00
Alexander Aprelev
c395e5fe54 [vm/ssl] Reenable client certificate tests.
Fixes https://github.com/dart-lang/sdk/issues/26057

Change-Id: I172f7b8221f34d2bd16df324d96ad7a6ec88d54d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199301
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2021-05-12 10:01:30 +00:00
Daco Harkes
3b9bd26f3e [vm/ffi] Union transform fix offsets
TEST=tests/ffi/regress_45988_test.dart

Closes: https://github.com/dart-lang/sdk/issues/45988

Change-Id: Ie8bf76bb2cc1781a4b59e508d0e5f2ada85d22a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199422
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-05-12 09:50:00 +00:00
Martin Kustermann
535b53659b [vm/compiler] Remove dangerous FlowGraphCompiler::GenerateRuntimeCall
Doing any runtime call inside an `<XXX>Instr::EmitNativeCode()` is dangerous
because doing so almost always would require adjusting the lazy-deopt
environment to ensure the continuation in unoptimized code would have
the right stack state when returning from a runtime call.

=> Going to runtime should almost always happen via a stub call.

To discourage using runtime calls inside `EmitNativeCode()` functions we
remove the `FlowGraphCompiler::GenerateRuntimeCall()` helper method.

The remaining runtime calls used in `EmitNativeCode()`s fall into three
categories:

  * StackOverFlowInstr: In this particular case the deopt environment
    wouldn't need to be modified.
  * leaf runtime calls: Those do not need any metadata (neither deopt
    nor stackmaps) - since leaf runtime entries cannot safepoint
  * unopt-only runtime calls: Those do not need any metadata (neither
    deopt nor stackmaps) - since all slots in unoptimized frames are
    GC-able and unoptimized frames cannot be lazy-deoptimized.

We add assertions for the latter to cases with a comment to make it
clear.

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

TEST=Only adds assertions.

Change-Id: Idb8badfbe65fff55585959338129405c71908d25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199042
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-05-12 09:14:50 +00:00
Martin Kustermann
64cf9574e2 [vm] Use AbstractType instead of Type when disassembling exception handler types
Issue https://github.com/dart-lang/sdk/issues/45982

TEST=Existing test suite.

Change-Id: I87b2d41ff123a871bc1c736ca2b3c442b12aa824
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199246
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2021-05-12 08:18:08 +00:00
Martin Kustermann
bdcb07c85f [vm/concurrency] Speed up debug runs of isolate tests
Running isolates tests in debug mode is currently very slow due to heap
verification and related code on isolate startup & shutdown.

This CL limits those verifications to only run on the first isolate of
an isolate group.

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

TEST=Existing test suite.

Change-Id: I1f329bca9e4c1d56ab60f36ffa8b9cc037b818f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199249
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-05-12 07:55:38 +00:00
Tess Strickland
c0f6b37d17 [vm] Store compression info during GC visit macros.
-----

Adds a few type traits for operating on (Compressed)ObjectPtr types:

* is_compressed_ptr<T>::value is true for compressed pointer types and
  false for uncompressed pointer types.
* is_uncompressed_ptr<T>::value is false for compressed pointer types
  and true for uncompressed pointer types.
* base_ptr_type<T>::type is ObjectPtr for uncompressed pointer types and
  CompressedObjectPtr for compressed pointer types.

Note: If DART_COMPRESSED_POINTERS is not enabled, all pointers are
uncompressed and the above traits function accordingly. That means
that is_compressed_ptr<T>::value is always false,
is_uncompressed_ptr<T>::value is true for all object pointers, and
base_ptr_type<T>::type is ObjectPtr for all object pointers, even if
they contain Compressed in the name.

-----

The following changes have been made to the VISIT_* macros:

* VISIT_NOTHING: no change.
* VISIT_FROM: takes only a field name now, and retrieves the type of
  the field to determine which base pointer type to use for from().
  Note that VISIT_FROM must now come _after_ the declaration of the
  field, since it retrieves the type from the declaration.
* VISIT_TO: takes only a field name now, and retrieves the type of the
  field to determine which base pointer type to use for to().
* (removed) VISIT_TO_LENGTH: Instead, VISIT_TO creates a to() method
  that takes an optional length argument (defaults to 0).
* (new) VISIT_FROM_PAYLOAD_START: takes the object pointer type of the
  payload elements and creates a from() that returns the beginning
  element of the payload. Note that a payload element must be a single
  object ptr to use this macro.
* (new) VISIT_TO_PAYLOAD_END: takes the object pointer type of the
  payload elements and creates a to() which takes a non-optional length
  argument and returns the last element of the payload.  Note that a
  payload element must be a single object ptr to use this macro.

If one of the {COMPRESSED_,}VARIABLE_POINTER_FIELDS macros are used,
then VISIT_TO_PAYLOAD_END should not be, as those macros already
include a use of it.

-----

In addition, each Untagged<Class> class now has a static constexpr bool
field kContainsCompressedPointers. This field is false for
UntaggedObject, and for other Untagged<Class> classes, it is either
inherited from the parent class or set during VISIT_FROM and the new
VISIT_FROM_PAYLOAD_START macro.

VISIT_TO and the new VISIT_TO_PAYLOAD_END macro double-check at compile
time that the type retrieved or provided is a compressed type if
kContainsCompressedPointers is true, and uncompressed if false.

If the elements of a payload are not object pointers, but rather
a composite object that contains object pointers, then
VISIT_FROM_PAYLOAD_START/VISIT_TO_PAYLOAD_END cannot be used. Instead,
use DEFINE_COMPRESSED_POINTERS(type), where type is the type of one of
the object pointers in the composite object, to appropriately define
kContainsCompressedPointers.

Note that this field will always be false when DART_COMPRESSED_POINTERS
is not defined.

-----

For classes, a static constexpr ContainsCompressedPointers() predicate
is created, based on the associated untagged class's field.

For instances of Class, there is an instance predicate
Class::HasCompressedPointers() that returns whether instances of a given
class object contain compressed pointers.

Change all calls to InitializeObject and Object::Allocate to pass in
the result of the appropriate predicate.

TEST=Refactoring, so current tests on CI, especially on x64c trybots.

Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-x64c-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-linux-debug-x64-try
Change-Id: Ifb61f72885bd8b951167becbccf8ec3337a922b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196931
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2021-05-12 07:36:58 +00:00
Konstantin Shcheglov
47e2acd130 Stop using linked nodes for Export/ImportElementImpl.
Change-Id: I45dd3e413dc1d1e611885293cdebdfb40bf35f7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199367
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-05-12 06:16:48 +00:00
Konstantin Shcheglov
6f4a6360a0 Issue 45983. Don't catch and ignore exceptions during parsing.
Bug: https://github.com/dart-lang/sdk/issues/45983
Change-Id: Ib1caeb96d03e9cd3000f0005077fa6a7dbdff621
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199369
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-05-12 06:11:18 +00:00
Konstantin Shcheglov
62d0d5ff4d Deprecate AnalysisDriver default constructor.
Change-Id: I9b87cc720b5e3731499302737fcaedcb229f6199
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199371
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-05-12 05:35:58 +00:00
pq
9f27edfab1 time lint registry (for benchmarking)
Change-Id: I92acdd06bac04ce9879cb971a2c98c27749aa4a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199372
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-05-12 04:33:58 +00:00
Ryan Macnak
a22d5b98fd Reapply "[build] Track glob dependencies via depfiles, instead of always re-executing scripts at GN time."
Use a relative path for the depfile's target to match Ninja's expectation; otherwise it thinks the target is always dirty.

TEST=build twice
Bug: https://github.com/flutter/flutter/issues/81074
Change-Id: I4cae7ab55f79b5206521c7090502c0769d2b5277
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198443
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-05-12 00:27:28 +00:00
Ryan Macnak
634cccccc6 [vm, gc] Verify remembered cards when verifying the store buffer.
TEST=ci
Change-Id: I004a55902c65d89915ea79c141270a2c2670e53c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199363
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-05-11 23:56:08 +00:00
Konstantin Shcheglov
3a3b3e480b Remove support for FileContentOverlay from ContextBuilder.
Change-Id: I23b9481ac6a841675e401579ff60bfb383865f8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199361
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-05-11 23:17:08 +00:00
Vyacheslav Egorov
20526d4368 [vm/aot] Scan deferred pools for code entries
When generating snapshot with loading units trace
deferred pools for code objects as well - otherwise
we might miss code references from one deferred
unit to another unit (e.g. if the only remaining
reference to some code object in the root unit is
actually from a deferred unit).

Fixes a bunch of issues with deferred libraries (Crash -> Pass):

- language_2/deferred/split_constants_canonicalization_test/1
- vm/dart_2/deferred_isolate_test
- vm/dart_2/deferred_loading_and_weak_serialization_references_test/0
- vm/dart_2/deferred_loading_and_weak_serialization_references_test/1
- vm/dart_2/deferred_loading_call_modes_test/2

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

TEST=ci

Fixed: 45917
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-release-simarm-try
Change-Id: Iccd3efcab6a5396d4b6f70968d9176ff18d7147c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198405
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2021-05-11 23:08:18 +00:00
Sigmund Cherem
460887d814 [web] Replace DDC's expando implementation
DDC now uses WeakMaps, just like dart2js. This ensures that expandos
will also continue to work properly after a hot restart.

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

Change-Id: I89799b4da9cb7827500a14dcdc2aff7c5e6afa03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199222
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2021-05-11 22:14:28 +00:00
Sigmund Cherem
3a0c27b74c [ddc] Add a regression test for issue #45874
Expandos collide after a hot restart. This currently fails because
the DDC implementation uses a static field (_keyCounter) to compute a
unique name for each expando. After a hot-restart the counter gets reset
and keys get reused accidentally.

A hacky fix would be to ensure this field is not reset after restarts,
but a more robust fix would be to use a weak map implementation like
dart2js does.

Change-Id: I991874aabf836be66cbd44de07dd38e681415ae7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199221
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2021-05-11 22:14:28 +00:00
Sigmund Cherem
7a18ef405e [web] Cleanup dart2js implementation of expandos.
This removes the feature detection of WeakMaps and no longer uses a raw
field to implement an expando. This is because WeakMaps are supported in
all browsers we currently support, and are also supported in IE11.

Change-Id: Ia0bc8261a3eb3dd4fad8cba5d0a2abecd1d3ecc0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199220
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-05-11 22:14:28 +00:00
Regis Crelier
fe12e366b0 [vm/runtime] Support tracing of subtype checks in runtime.
TEST=for debugging only

Change-Id: I9780e0374750b044613a654043342925eb904a17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199362
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2021-05-11 21:48:34 +00:00
Konstantin Shcheglov
9049b0a3de Remove support for serializing some AST nodes.
Change-Id: I1f49400967e86fa4ddd09a67fc9e3c8bdac214ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199360
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-05-11 21:44:14 +00:00
Sam Rawlins
507fe6216a Remove unnecessary imports in front_end
Change-Id: Iad1c41ae9ef2b379a0bed3899fef8cef118727c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199223
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-05-11 21:15:24 +00:00