In addition, this removes support for seeding the VM isolate snapshot with Instructions and referencing those Instructions in the isolate snapshot. This was leftover from an earlier experiment to share Instructions between a Core-JIT snapshot and App-JIT snapshots. Removing this reclaims the sign bit on Instruction offsets.
Add missing cases to TypeTestingStubFinder::StubNameFromAddresss.
Change-Id: Ie87216b4e284db1dc3eddb12f38ddbe8a841d312
Reviewed-on: https://dart-review.googlesource.com/50620
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
The performance I see is similar to using functions.
R=brianwilkerson@google.com
Change-Id: Ib5f675f07b422bd9e6f28df0f9d7ea8b24669f63
Reviewed-on: https://dart-review.googlesource.com/52881
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Even if we assign to something that wants a different type, we might
chain some property access on it later on, so it is not nice to don't
suggest anything at all. Instead, we should give higher relevance to
compatible types, but keep all the rest with default relevance, as we
did already for everything other than instance creations.
R=brianwilkerson@google.com
Bug: https://github.com/flutter/flutter-intellij/issues/1107
Change-Id: I86c3c5dded4ad4cbbf28a60c0ae2847f07a3373b
Reviewed-on: https://dart-review.googlesource.com/52863
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This CL fixes error message in NoSuchMethodError thrown by null checks
and line numbers in corresponding stack traces (in AOT).
Name of the called function is placed into object pool, and metadata
for null check site is generated in CodeSourceMap.
Size of flutter gallery in release mode:
Before After
RW 2165286 2201642 (+1.68%)
RO 2122192 2168224 (+2.17%)
RX 6871072 6871072 (+0.00%)
Total 11163079 11245467 (+0.74%)
Closes https://github.com/dart-lang/sdk/issues/32863
Change-Id: I5ad1190f2ec9452a669863f7dd114ea5f9092d52
Reviewed-on: https://dart-review.googlesource.com/52703
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Deprecate the entryPoint parameter, but still accept it in place of what
used to be (positionally) compilationUnit.
Detect if we have a compilation unit or not; and in the case we don't,
add a new protection by asserting that it has no parent (its the root of
the dangling tree).
Its more of an implementation detail that completion contributors don't
work well on dangling nodes, so fix it up for clients rather than
expecting them to do it themselves.
Change-Id: I3e454734e5b515f4e536f7229d541ca8c6aed60c
Reviewed-on: https://dart-review.googlesource.com/52645
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
The symbols we previously needed (SyntheticBeginToken and
SyntheticToken) are now exported from the analyzer as of
dc21d3ce9d.
Change-Id: I5d0901c544fed0983d45c1da1dccfd5659a7777c
Reviewed-on: https://dart-review.googlesource.com/52821
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This reverts commit 86ba29265a.
The replacement API (int.tryParse) has only just been introduced and
is not yet avaiable to internal Google users. I plan to un-do the
commit in about a week once the internal SDK has been updated.
Change-Id: Ic9206231861400d42f4814e4a56bde57ba8705a5
Reviewed-on: https://dart-review.googlesource.com/52822
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
* Fix a runtime error when dart_style is itself run in Dart 2.
* Force splitting an empty block as the then body of an if with an else.
* Use the new lowercase Dart 2 constant names.
https://github.com/dart-lang/sdk/issues/32961
Change-Id: I283f28a5e75016528093358a899b7f983ae1445e
Reviewed-on: https://dart-review.googlesource.com/52760
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Based on https://dart-review.googlesource.com/c/sdk/+/52340, but adds
the necessary plumbing through the test system to pass through
negations to strong and preview-dart-2. Also adds support for those
negations to the analyzer.
Change-Id: I9793ff28bb593d25bbb0a2ed8736b5b53e0a62d8
Reviewed-on: https://dart-review.googlesource.com/52461
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Currently, kernel metadata does not support references to nodes which
are not reachable from root Component. This CL adds an error if such
reference exists, instead of silently writing zero offset.
Change-Id: I6de886296bea66bd732f379cc99e0e3693ea79af
Reviewed-on: https://dart-review.googlesource.com/52527
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Most notably this fixes mixins, but a few others issues were discovered
as well. Fixes#32428.
This gets dartdevk closer to producing a valid Dart SDK file
Change-Id: I2973baef279d6b71ed29b97bec758b2d3209c275
Reviewed-on: https://dart-review.googlesource.com/51760
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Fixes#27505
This relands fc775b3e9b with a fix to
VirtualMemory::~VirtualMemory: on Windows the only way to release
virtual address mapping is to invoke VirtualFree(..., MEM_RELEASE) with the
original base pointer returned by VirtualAlloc - that is why we need to call
VirtualFree is size of the reservation is 0: the whole reservation might have
been decommitted by VirtualFree(MEM_DECOMMIT) but it is still present.
Change-Id: I7d1d444693c523b327d44266d5fe70f7a5d8f803
Reviewed-on: https://dart-review.googlesource.com/52642
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
While generating bytecode, avoid flattening of type arguments used for
instance allocations (and thus avoid creating new types when substituting
type parameters). This is a workaround to limitation of kernel metadata
which is unable to serialize references to nodes (such as DartType)
not reachable from root Component.
Change-Id: I52c5e21873d0159d389895dc570a9e7283f2a6ff
Reviewed-on: https://dart-review.googlesource.com/52643
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
It's not generally safe to continue to use the Shadow nodes after they
have had their type inferred, because they give a false picture of the
tree. In this case it led to an assertion failure.
Move the assert to a place in the code where it is true. Use the
correct subexpression for subsequent check insertion. Clear the
parent pointer when Kernel nodes are removed from the tree to try to
catch problems like this.
Fixes https://github.com/dart-lang/sdk/issues/32050
Change-Id: I775747d7a6a5240d63881c8563c83cc84628e3d7
Reviewed-on: https://dart-review.googlesource.com/52525
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
This makes the Flutter repo analysis about 6% faster.
Before: 56.9 57.4 56.9 57.3 56.5 56.9 56.6
After: 53.5 53.0 53.8 54.3 53.5 53.0 53.0
To see the different better, I ran lints 100 and 10 times for each file.
Before: 628 621 109 107 109
After: 338 333 77 75 76
To get these numbers we will need to make corresponding changes to lints,
to implement these interfaces, so that they are used instead or the
current visitors. I have these changes locally, but we would need to
publish analyzer first.
R=brianwilkerson@google.com, pquitslund@google.com
Change-Id: I8b4efe05f815082fe39c33c303bb92b7dac19f65
Reviewed-on: https://dart-review.googlesource.com/52644
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
When we infer that a function's return type is the expected one, we
need to make sure to use the greatest closure of that expectation.
Otherwise, the type UnknownType will leak out of type inference if it
occurs in the expectation.
Fixes https://github.com/dart-lang/sdk/issues/32847
Change-Id: I2ce65c6b38d701073e3071f03b8c3d52442c2f86
Reviewed-on: https://dart-review.googlesource.com/52521
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
This reduces small tagged integers on 64 bit platforms from 63 bits to
31 bits plus one tag bit.
This is a step on the way to compile-time-optional compressed pointers
on 64 bit platforms. See more about this at go/dartvmlearnings
This causes a slowdown for some uses of integers that don't fit in 31
signed bits, but because both x64 and ARM64 have unboxed 64 bit
integers now the performance hit should not be too bad.
This is a reapplication of
https://dart-review.googlesource.com/c/sdk/+/46244
It was reverted due to a compilation error on 32 bit
ARM with DBC.
R=vegorov@google.com
Change-Id: I943de1768519457f0e5a61ef0b4ef204b6a53281
Reviewed-on: https://dart-review.googlesource.com/51321
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>