Prevent background compiler from adding deferred classes or canonicalizing
new types while classes are being sorted and type hashes are modified.
This should fix issue #34627 and its duplicate #35690.
Change-Id: I3e52602e77ad6b80b58f5292721c01eea22abfb0
Reviewed-on: https://dart-review.googlesource.com/c/90300
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
If the main script is loaded using a CORS request the deferred hunks
will be as well preventing errors from being muted.
Bug: 35594
Change-Id: I3283307b5d9e1d6708a4808e1e3fd7689a672a9b
Reviewed-on: https://dart-review.googlesource.com/c/89141
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
- Improve `element.attributes.remove(name)` to compile to `element.removeAttribute(name)`.
- Improve `element.getNamespacedAttributes(namespace).remove(name)` to compile to
`element.removeAttributeNS(namespace, name)`.
- Add removeAttribute[NS].
- Add hasAttriute[NS].
- Assert attribute names are not null to prevent conversion to "null"/"undefined".
- TODO: Assert values are not null to prevent conversion to "null"/"undefined".
- namespaceURI does not need checking since null and undefined map to 'no namespace'.
Fixes https://github.com/dart-lang/sdk/issues/35655
Change-Id: Ie5bee23c88e8fb92f9d46f29fdf4b7f3175a2aa3
Reviewed-on: https://dart-review.googlesource.com/c/90160
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Terry Lucas <terry@google.com>
Change-Id: I931ab74af0f31a0fc70463bc8e03c960306b7628
Reviewed-on: https://dart-review.googlesource.com/c/90280
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
ARM write barrier goes from
ldrne lr, [thr, #+508]
blxne lr
to
blne <offset>
ARM64 write barrier goes from (similarly X64)
beq +8
ldrx lr, [thr, #1056]
blr lr
to
beq +4
bl <offset>
It reduces RX on arm/arm64 by around 0.9%
Though the write barrier wrappers stub has multiple entrypoints (one for
each available register). Because of this, we modify the relocation
logic to support per-call offsets into the target.
To avoid making the assembler code depend on StubCode/FlowGraphCompiler,
we set a closure, which the assembler can call.
Issue https://github.com/dart-lang/sdk/issues/33274
Change-Id: I9e3d68260cab7ef19ea88f1235c78d6031819d6d
Reviewed-on: https://dart-review.googlesource.com/c/90063
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Change-Id: Ic347890a4146cadb3ad1b6049b562350903505e7
Reviewed-on: https://dart-review.googlesource.com/c/89660
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
Change-Id: Ie3e55422dc891f3ba37df887f5c96751669dd4cc
Reviewed-on: https://dart-review.googlesource.com/c/90224
Commit-Queue: Peter von der Ahé <ahe@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Auto-Submit: Peter von der Ahé <ahe@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
little problems in the spec that we have noted over time.
Fixed a couple of LaTeX mistakes; adjusted FutureOr section
The 'Type FutureOr' section was adjusted in order to avoid duplicate
subtype rules (the ones that we have had in section 'Type FutureOr'
until now are duplicates of rules in \ref{subtypeRules}).
Also changed the name of \basetype to \futureOrBase, because the former
is too generic to be helpful for readers.
Change-Id: I8d83cf1a0af275a930fbbb94cf59a9d758066583
Reviewed-on: https://dart-review.googlesource.com/c/90061
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
These can be represented as an unevaluated static invocation.
Change-Id: Ib827345f1f65a09f1a856eae33366722a2e613d2
Reviewed-on: https://dart-review.googlesource.com/c/90008
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Change-Id: I521ea3f7cf8d02f9e23edc1a9775fbd65bf64e4a
Reviewed-on: https://dart-review.googlesource.com/c/90180
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
Change-Id: I2bfe8ad8d86806e0f5ffa026566cfa234b82154b
Reviewed-on: https://dart-review.googlesource.com/c/90005
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
This reverts commit b10f179608.
Reason for revert: failed service/* tests
Original change's description:
> [vm] Cleanup Dart_Get/Set/HasStickyError API and use isolate's sticky error only as a backup for thread's sticky error
>
> Both thread and isolate have sticky error fields. Dart API was using
> isolate's sticky error, while Dart code was using thread's sticky error.
> There was a one-way move of a thread's sticky error into isolate
> when thread was unscheduled.
>
> This causes a problem as error in the isolate may go unnoticed and
> repeated unscheduling/re-scheduling might end up overwriting the error
> in the isolate (which triggers the assertion).
>
> To solve this problem, this CL:
> * Cleans up Dart API which manipulates isolate's sticky error, so
> isolate's sticky error is never set directly.
> * When sceduling an isolate to a thread, sticky error is moved back from
> isolate (if any).
>
> With this changes, thread's sticky error is always used if thread is running,
> and isolate's sticky error is only used to hold sticky error while
> isolate has no thread.
>
> Fixes https://github.com/dart-lang/sdk/issues/35590
>
> Change-Id: I99b128cac363ca2df75f6e64c083b1ec36c866ce
> Reviewed-on: https://dart-review.googlesource.com/c/89442
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Alexander Markov <alexmarkov@google.com>
TBR=rmacnak@google.com,alexmarkov@google.com,zra@google.com,asiva@google.com
Change-Id: I15874575b6b8ddca618741c59c21d4e692c4dcab
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/90127
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This reverts commit 7e1aa67855 as this
regresses flutter stock_layout_iterations by about ~9% on Moto G4.
Fixes https://github.com/dart-lang/sdk/issues/35694
Change-Id: I3c76ee868c64e4b1ed947bd2d295aa8a07d9d1d0
Reviewed-on: https://dart-review.googlesource.com/c/90140
Commit-Queue: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Auto-Submit: Alexander Aprelev <aam@google.com>
On Fuchsia, the timeline is accessed without involving the service isolate or vm-service.
Change-Id: Ia0d4e1ca252604e8fcef466a31e3d2a8b0912251
Reviewed-on: https://dart-review.googlesource.com/c/90100
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Both thread and isolate have sticky error fields. Dart API was using
isolate's sticky error, while Dart code was using thread's sticky error.
There was a one-way move of a thread's sticky error into isolate
when thread was unscheduled.
This causes a problem as error in the isolate may go unnoticed and
repeated unscheduling/re-scheduling might end up overwriting the error
in the isolate (which triggers the assertion).
To solve this problem, this CL:
* Cleans up Dart API which manipulates isolate's sticky error, so
isolate's sticky error is never set directly.
* When sceduling an isolate to a thread, sticky error is moved back from
isolate (if any).
With this changes, thread's sticky error is always used if thread is running,
and isolate's sticky error is only used to hold sticky error while
isolate has no thread.
Fixes https://github.com/dart-lang/sdk/issues/35590
Change-Id: I99b128cac363ca2df75f6e64c083b1ec36c866ce
Reviewed-on: https://dart-review.googlesource.com/c/89442
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This allows developers to have more fine grained control over socket
options supported by their platforms, particularly when there is not a
nice way to encapsulate differences between IPv4 and IPv6 options (as
with IP_MULTICAST_IF and IPV6_MULTICAST_IF). It also begins the work
of exposing socket level and option values, although keeping it for now
only to a minimum necessary to assist with setting the multicast
interface for datagram sockets.
This CL also marks `multicastInterface` as deprecated.
Bug: https://github.com/dart-lang/sdk/issues/17057
Change-Id: I39b3bf3d32d39de1c777acea4425d6eb2226355d
Reviewed-on: https://dart-review.googlesource.com/c/89164
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Rationale:
Previously, we avoided introducing redefinitions that
introduced the empty non-nullable null type. This situation
arises when we do a null check on an actual null value
(making all subsequent uses effectively dead code). This
is too simple, however, since it still allows hoisting the
uses before the check. This CL gives a better solution
by introducing redefinitions without a constraining type
(which are not removed and avoid the type). In the long
run perhaps the best solution would be to simply remove
all subsequent uses as dead.
https://github.com/dart-lang/sdk/issues/32167https://github.com/dart-lang/sdk/issues/34473https://github.com/dart-lang/sdk/issues/35335
Change-Id: Ib5dd072a9e546f6b91faa52ea08e8c0f6350d7e0
Reviewed-on: https://dart-review.googlesource.com/c/89922
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
Support for 'IfNull' expression.
Support for 'rethrow'.
Tests for definite assignment and assignment expressions.
Change-Id: I053d27ca05e4ccaccc6a9fc7e10a481cd481ab21
Reviewed-on: https://dart-review.googlesource.com/c/90102
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Fix scoping of raw typed data access in dart:io.
Change-Id: I458b36bf655e429cc57e266550ff1ab00f328f45
Reviewed-on: https://dart-review.googlesource.com/c/89943
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Check if the call is typesafe instead of inlining only when type
checks are disabled.
Change-Id: Ie391bd7013941ffd3852fb8e2421e8827f41b6d0
Reviewed-on: https://dart-review.googlesource.com/c/89926
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
The cast is no longer needed due to the class hierarchy changes in
https://dart-review.googlesource.com/c/sdk/+/89923. But we don't want
to remove it yet, because we don't want to unnecessarily make the
analyzer_plugin to depend on the very latest analyzer. So for now we
ignore the hint.
Change-Id: Ic5314181cd78d72e5c9b1d00f38302773f0a789c
Reviewed-on: https://dart-review.googlesource.com/c/90101
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>