Web platforms do not support dart:isolate--`dartdevc` already treats it
as false, but this fix is needed if using `--kernel` and conditional
imports (which are handled by the front_end rather than dev_compiler).
Change-Id: I479a4846c6073f986a4ce7a0739ed0a25b1bd35b
Reviewed-on: https://dart-review.googlesource.com/c/86085
Auto-Submit: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This change extends/fixes the exiting "pattern recognition" which tries
to recognize the pattern
v2 <- LoadClassIdInstr(v1)
BranchIf v2 == IntegerConstant(cid)
Furthermore we start inlining the recognized `ClassID.getID` method very
early in the pipeline. This allows the VM to recognize the above
pattern and insert redefinitions before the actual inlining pass.
Furthermore we special-case two very hot methods in utf8 decoding by
manually having two loops, one of which is guarded by a class-id check
against the _Uint8ArrayView class, which is most common. (In the future
we would like to unify the typed data layouts so we no longer need to
use `ClassId.getID`, thereby also allowing non core library code to use
this).
This improves dart-aot by
* 31%+ for a protobuf decoding benchmark we care about
Issue https://github.com/dart-lang/sdk/issues/31954
Change-Id: I7181bbf096aabe303634fd3b2bff9cc96d69719c
Reviewed-on: https://dart-review.googlesource.com/c/85443
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Fixes#35273
Previous wording made it seem like the behavior was the same as
`identical`.
Change-Id: Ib7fdb183a26a4e2b3c849dd72cb515aa1652028d
Reviewed-on: https://dart-review.googlesource.com/c/85465
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
This reverts commit d7cf6959bb.
Reason for revert: This causes crashes on the vm-obfuscate builder at https://ci.chromium.org/p/dart/builders/luci.dart.ci.sandbox/vm-kernel-precomp-obfuscate-linux-release-x64
like
FAILED: dartkp-dart_precompiled release_x64 corelib_2/linked_hash_map_test
Expected: Pass
Actual: Crash
Unexpected compile error.
--- Command "vm_compile_to_kernel" (took 11.000189s):
DART_CONFIGURATION=ReleaseX64 /b/s/w/ir/cache/builder/sdk/pkg/vm/tool/gen_kernel --aot --platform=out/ReleaseX64/vm_platform_strong.dill -o /b/s/w/ir/cache/builder/sdk/out/ReleaseX64/generated_compilations/dartkp/tests_corelib_2_linked_hash_map_test/out.dill /b/s/w/ir/cache/builder/sdk/tests/corelib_2/linked_hash_map_test.dart --packages=/b/s/w/ir/cache/builder/sdk/.packages -Ddart.developer.causal_async_stacks=true
exit code:
0
--- Command "precompiler" (took 583ms):
DART_CONFIGURATION=ReleaseX64 out/ReleaseX64/gen_snapshot --snapshot-kind=app-aot-assembly --assembly=/b/s/w/ir/cache/builder/sdk/out/ReleaseX64/generated_compilations/dartkp/tests_corelib_2_linked_hash_map_test/out.S --obfuscate --sync-async --ignore-unrecognized-flags --packages=/b/s/w/ir/cache/builder/sdk/.packages /b/s/w/ir/cache/builder/sdk/out/ReleaseX64/generated_compilations/dartkp/tests_corelib_2_linked_hash_map_test/out.dill
exit code:
-6
stderr:
Warning: This VM has been configured to obfuscate symbol information which violates the Dart standard.
See dartbug.com/30524 for more information.
===== CRASH =====
version=2.2.0-edge.83712405657ff736033380cb24b0bd5a62fc3692 (Tue Nov 27 16:56:07 2018 +0000) on "linux_x64"
si_signo=Segmentation fault(11), si_code=1, si_addr=0xd1400050e5f
Dumping native stack trace for thread 2b71
[0x000056001fc426c7] Unknown symbol
[0x000056001fc426c7] Unknown symbol
[0x000056001fe5763d] Unknown symbol
[0x000056001fe4c99c] Unknown symbol
[0x000056001fe6166a] Unknown symbol
[0x000056001fe59c0c] Unknown symbol
Original change's description:
> [VM] Inline ClassID.getID() eagerly, extend pattern matching logic to recognize it, use it to special case ascii decoding
>
> This change extends/fixes the exiting "pattern recognition" which tries
> to recognize the pattern
>
> v2 <- LoadClassIdInstr(v1)
> BranchIf v2 == IntegerConstant(cid)
>
> Furthermore we start inlining the recognized `ClassID.getID` method very
> early in the pipeline. This allows the VM to recognize the above
> pattern and insert redefinitions before the actual inlining pass.
>
> Furthermore we special-case two very hot methods in utf8 decoding by
> manually having two loops, one of which is guarded by a class-id check
> against the _Uint8ArrayView class, which is most common. (In the future
> we would like to unify the typed data layouts so we no longer need to
> use `ClassId.getID`, thereby also allowing non core library code to use
> this).
>
> This improves dart-aot by
> * 31%+ for a protobuf decoding benchmark we care about
>
>
> Issue https://github.com/dart-lang/sdk/issues/31954
>
> Change-Id: Ia567b92b7e76ff28eda1726deaafda32732ed8f5
> Reviewed-on: https://dart-review.googlesource.com/c/85281
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
> Reviewed-by: Jenny Messerly <jmesserly@google.com>
> Commit-Queue: Martin Kustermann <kustermann@google.com>
TBR=vegorov@google.com,kustermann@google.com,jmesserly@google.com,johnniwinther@google.com,sra@google.com
Change-Id: I912b0768c32cbb00297ce48db29dbdbea44c14fa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/85441
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
This change extends/fixes the exiting "pattern recognition" which tries
to recognize the pattern
v2 <- LoadClassIdInstr(v1)
BranchIf v2 == IntegerConstant(cid)
Furthermore we start inlining the recognized `ClassID.getID` method very
early in the pipeline. This allows the VM to recognize the above
pattern and insert redefinitions before the actual inlining pass.
Furthermore we special-case two very hot methods in utf8 decoding by
manually having two loops, one of which is guarded by a class-id check
against the _Uint8ArrayView class, which is most common. (In the future
we would like to unify the typed data layouts so we no longer need to
use `ClassId.getID`, thereby also allowing non core library code to use
this).
This improves dart-aot by
* 31%+ for a protobuf decoding benchmark we care about
Issue https://github.com/dart-lang/sdk/issues/31954
Change-Id: Ia567b92b7e76ff28eda1726deaafda32732ed8f5
Reviewed-on: https://dart-review.googlesource.com/c/85281
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
In Dart 2.0 types are enforced at signature boundaries, so most of the
type checks on arguments are serving no other purpose other than
disalllowing `null`. Make that explicit in these checks.
Unnecessary checks were discovered by searching for "if (\w+ is" and
filtering down to the checks that match exactly against a type argument.
Checks in any files related to "js" or "dart2js" are left alone.
In a few places there will be a user visible behavior change where
ArgumentErrors will reference "not null" instead of "not a String" etc.
Client code should not be relying on these details and the new messages
should be more clear.
Updated checks take a few forms:
- ArgumentError.checkNotNull
- Changing `value is SomeType` to `value != null` where it's combined
with other conditions.
- Where non-null values are already guaranteed or allowed, drop the
check.
Other changes:
- Use single line short circuit returns or throws where possible.
- In some places change an ArgumentError to a RangeError for
consistency.
- Some minor formatting changes with the latest dartfmt.
Change-Id: I761dd5cc325ccdbf6506d6db8cfa9246218c1f98
Reviewed-on: https://dart-review.googlesource.com/c/81501
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
This:
- exposes the feature as an experiment flag
- cleans up the code to prevent issues with strong-mode checks
- provides only a single implementation, but lets users use a hook to tailor the feature to their needs.
Change-Id: I3bf277b76b7503235c35bfbf83356c953405ff6f
Reviewed-on: https://dart-review.googlesource.com/c/84880
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Change-Id: Ic0bd821b3966c9ec2e92052ed2046b01e5fdd1cb
Reviewed-on: https://dart-review.googlesource.com/c/84124
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
And make tweaks to Uri and StreamController equality
Change-Id: I63f85f67209442684e50b7c2e0011531893f294e
Reviewed-on: https://dart-review.googlesource.com/c/82781
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
This was an idea that never manifested.
This has thus been unused code for more than a year.
Change-Id: Ib7c373a988a220e515d873d7a9e815cecfab178c
Reviewed-on: https://dart-review.googlesource.com/c/82225
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
The current DateTime class takes DateTime objects as arguments,
and then tries to access private members.
That does not work if someone else implements the DateTime interface.
Fixes#34962
BUG= http://dartbug.com/34962
Change-Id: I7191fe42f5b6efc1c7da5ed8e22b892b18f872f7
Reviewed-on: https://dart-review.googlesource.com/c/81828
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
These are guarateed by the type system now.
Change-Id: I6d68a0284761805ae14f8c26d68469018c2a0e1d
Reviewed-on: https://dart-review.googlesource.com/c/81186
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
the VM exits before the Observatory server has a chance to
start listening.
Bug: 34839
Change-Id: I2a5dfe69a197fe054dd041af3ea4e07da736b226
Reviewed-on: https://dart-review.googlesource.com/c/81381
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Fixed a number of standard lints
Change-Id: I36e535c6dc91f3c7407c66a8089c38e0463bee83
Reviewed-on: https://dart-review.googlesource.com/c/81700
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
In the places where other utilities like `RangeError.checkNotNegative`
are used it reads nicer to call through a similar signature than to
follow a conditional with the utility.
Change-Id: Idd89b2934020fb55e57a22c39773fd7879d1c28f
Reviewed-on: https://dart-review.googlesource.com/c/81287
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Also mention it in the `external const factory Symbol` constructor.
This only relevant for constant expressions that may be used as
switch case expressions or constant map keys.
See #32557.
Bug: http://dartbug.com/32557
Change-Id: Ie82799f3f0d39c21c10765338a7dfeb74a582add
Reviewed-on: https://dart-review.googlesource.com/c/81242
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Going through the closure seems to add 100+ms to the connect flow.
Change-Id: I3ba413a333a403628cb9d8320c91448c3ac7072c
Reviewed-on: https://dart-review.googlesource.com/c/80524
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
mDNS queries (and many other local queries) should be allowed to set
their TTL to 255. This patch enables that on all platforms.
On macOS in particular, a system service reserves the mDNS port. The
socket option SO_REUSEPORT is required in addition to SO_REUSEADDR to
successfully bind there; the flag is also supported on Linux, so this
patch allows it to be used there as well (but prints an error message if
it's used on any other platform).
I could use some guidance as to tests for this - is it support availble
for running tests only on specific platforms?
Bug: https://github.com/dart-lang/sdk/issues/34799 and
Change-Id: I29b620d8ec04343f356a8171bae3d385ddfa9564
https://github.com/dart-lang/sdk/issues/34782
Reviewed-on: https://dart-review.googlesource.com/c/80082
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Fixed a typo or 2. Ran the entire file through a basic spell check and it's good now
Closes#34773https://github.com/dart-lang/sdk/pull/34773
GitOrigin-RevId: ccde23a5880ec5904d838e5c2bc2a747c5d3ebb6
Change-Id: I154bd90376a4ea4b7a8d736382b19a44fc41e5b0
Reviewed-on: https://dart-review.googlesource.com/c/79500
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
`dartdevc --kernel` is now equivalent to the old `dartdevk` command.
This will make migration easier, as it's now just a flag to enable
CFE/Kernel. `dartdevk` is now deprecated, but it can be supported for
a while as it just calls `dartdevc --kernel`.
Change-Id: Ib8d09f74556740a3af11c753f80cd87bd4a09044
Reviewed-on: https://dart-review.googlesource.com/76566
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Also accept `#` in fragment.
Fix bug in parsing URI where first character of path needs escaping.
The characters are escaped, but parsing doesn't fail, like it previously
did on misplaced general delimiters in those places
Fixes#34451.
Bug: https://dartbug.com/34451
Change-Id: I99aa39bd2909661802ad9d1bb5dada94d579141b
Reviewed-on: https://dart-review.googlesource.com/74780
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Since dart2js is now strong-mode-only and ignores the --strong flag, I don't see the point in having 'strong' in the platform name.
Removed:
dart2js_platform
dart2js_server_platform
renamed:
dart2js_platform_strong --> dart2js_platform
dart2js_server_platform_strong --> dart2js_server_platform
Change-Id: If74ef31a17acc15a23a5338e5f53e820fc66b0dd
Reviewed-on: https://dart-review.googlesource.com/71425
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Closes#5612
Similar to `hashCode` and `operator ==`, add an explicit declaration of
the method to attach a doc comment and give extra context beyond the
`Comparable` interface doc comment.
I checked the implementation in `runtime/lib/string_patch.dart` to
validate that it is acting on code units and does not check case.
Change-Id: I85bc94b954a507756132f86cc8299232c73a25cf
Reviewed-on: https://dart-review.googlesource.com/73284
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Previous implementation didn't include subtypes of the specified type.
For instance `JS('Rectangle', ...)` should have triggered the inclusion
of `_DomRect` but the use of this-type in the subtype test,
`_DomRect <: Rectangle<T>`, prohibited this.
This fix is to use the raw type instead of the this-type. The subtype test
will therefore be `_DomRect <: Rectangle<dynamic>` which correctly
includes `_DomRect`.
The change has the effect that `JS('List', ...)` now actually includes subtypes of
`List`. For this reason uses of `List` have been updated to use `JSArray` or
explicitly use `returns:...` to avoid unintended inclusion of native lists such
as the native typed arrays.
Change-Id: I06ab55d9bf694829596875d9c3a0a6c954d396b7
Reviewed-on: https://dart-review.googlesource.com/73903
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
This allows `async` and `async*` functions to be typed without importing `dart:async`.
All other async types still need to be imported, including `FutureOr` and `Zone`,
but pure `async`/`await` based code can be written with no imports.
Fixes#26162.
Bug: http://dartbug.com/26162
Change-Id: Iaf36631ef5b3251a688e495a9d238b2f8787f14c
Reviewed-on: https://dart-review.googlesource.com/71480
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Closes#32808
One could reasonably think that `addError` is a useful API on `stderr`,
but in this case it will only cause an unhandled async error and exit
the VM.
Change-Id: Ia9e14ab53faec19aed91a1a5acc0709807204de8
Reviewed-on: https://dart-review.googlesource.com/71921
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
- Use "emits error" instead of "contains error".
- Always use "this stream" for isntance members and "the stream" for
constructors.
- Some minor rewording for clarity.
Change-Id: Ia2b0430810603ab2a137a99b2cfa3d3096523d19
Reviewed-on: https://dart-review.googlesource.com/72068
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
For some time now, this file has had the same contents as strong.sum.
There's no point in keeping it around.
Change-Id: I793a41ca6cb1c47c68357f549d299fa95b96c4c5
Reviewed-on: https://dart-review.googlesource.com/71701
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Closes#28074
I used some wording from the discussion. I kept he title line as is
since I think the "inclusive/exclusive" distinction is how most readers
think of it, and the more precise language can be kept in the details.
Change-Id: I4de2ffc77dbc8168efcacb94a168c1a2428a5293
Reviewed-on: https://dart-review.googlesource.com/71390
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
See comments at https://dart-review.googlesource.com/c/sdk/+/26620/
- Drop `_CastQueueMixin` and implement directly at usage. There is no
need for a mixin since it does not need to be used for `CastListQueue`.
- Drop placeholder comment for `CastListMixin` since `ListQueue` was
never updated to implement `List`.
Change-Id: I23c5e342ae174e6fbb0381190f11ce86abb64d0b
Reviewed-on: https://dart-review.googlesource.com/71422
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Fixes#27739
The doc already has guidelines on things like listening to and pausing
the stream but did not mention whether or how error events should be
considered. Since a Transformer may choose to do anything with errors
metion that explicitly and encourage the behavior to be documented.
Change-Id: I77e98c0967ae0041f5e959282369aa294aa9b18a
Reviewed-on: https://dart-review.googlesource.com/71383
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
The Dart String class is not particularly safe when dealing with
Unicode, particularly for non-Latin scripts or Emoji. This
documentation change attempts to raise awareness of the pitfalls of
the current Strings class.
Change-Id: I8a6c15b6ad654f73a1d33513863cae8bfe475b16
Reviewed-on: https://dart-review.googlesource.com/71500
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Fixes#30187
Include description of behavior around when the Future completes and how
errors are handled. Include detail of ordering - since the default
`Set` implementation is `LinkedHashSet` where insertion order matters.
Change-Id: I4695c131bcab4527b153f57f90bffe61c818d187
Reviewed-on: https://dart-review.googlesource.com/71381
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Fixes#27756
Call out more explicitly in the `pause` doc that `resume` and
`resumeSignal` are interchangeable, and in both docs that a `resume`
call is safe on a subscription which is not paused.
Also reformat to remove single newline in between sentences and to 80
character lines.
Change-Id: I1efd05639400f2cb5266e686adb99c3c721fabe7
Reviewed-on: https://dart-review.googlesource.com/71380
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
- Switch the kernel isolate to run in Dart2 mode
- Refactor build rules so bootstrapping of the front end happens
with a prebuilt dart sdk
- Refactor application snapshot build rules so the kernel application
snapshot rule does not get into a cyclic dependency during the
bootstrap stage
Change-Id: Iccca3233f6cb8d6b307b4cf1ca3262f293f794a6
Reviewed-on: https://dart-review.googlesource.com/70841
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Closes#34155
This updates the annotation to reflet how it is being used in practice
anyway.
Change-Id: I3bed65e8b0d93f0361d98a93957164a345082933
Reviewed-on: https://dart-review.googlesource.com/70200
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
This reverts commit 499761f0da.
Reason for revert: crashes when building SDK, red bots, broken Flutter 3xHEAD bot
Original change's description:
> [VM/SDK] Switch kernel isolate to run in Dart 2 mode
>
> - Switch the kernel isolate to run in Dart2 mode
> - Refactor build rules so bootstrapping of the front end happens
> with a prebuilt dart sdk
> - Refactor application snapshot build rules so the kernel application
> snapshot rule does not get into a cyclic dependency during the
> bootstrap stage
>
> Change-Id: I067c5f1165fb93811dcc8e390a8bf381db721e5b
> Reviewed-on: https://dart-review.googlesource.com/70461
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>
TBR=rmacnak@google.com,asiva@google.com
Change-Id: Ibf6d526fb5132b766f063fcf873cde661ae895d7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/70516
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
- Switch the kernel isolate to run in Dart2 mode
- Refactor build rules so bootstrapping of the front end happens
with a prebuilt dart sdk
- Refactor application snapshot build rules so the kernel application
snapshot rule does not get into a cyclic dependency during the
bootstrap stage
Change-Id: I067c5f1165fb93811dcc8e390a8bf381db721e5b
Reviewed-on: https://dart-review.googlesource.com/70461
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Will be removed in Dart 3.
Change-Id: I0bf8b01f23bab5a7871f0562562b7ad98887394f
Reviewed-on: https://dart-review.googlesource.com/69462
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
I believe this was code only used via dart:mirrors
Soon we might want to rename JSInvocationMirror to just JsInvocation (so it's
clear that it is only used for nsm)
Change-Id: I0e0f836b18e6f290311c7173cfafedfcccab5c6f
Reviewed-on: https://dart-review.googlesource.com/69246
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Retries following `HttpClient.authenticate` does not include the
original request payload, this is an issue as POST, PUT, PATCH
request can be retried through this mechanism. This patch advices
of the issue and suggests using `HttpClient.AddCredentials` directly
or setting the `'authorization'` header manually.
Closes https://github.com/dart-lang/sdk/issues/28012
---
It is possible that we should use even stronger language. It is not immediately obvious
to me when the `HttpClient.authenticate` property is useful. But retrying POST, PUT, PATCH
requests without sending the body again is problematic.
Perhaps we should print a warning when requests with a payload a retries. Or maybe even
deprecate the `HttpClient.authenticate` property. I'm new here so please educate me on
the useful use-cases.
Change-Id: Iaddba39c2fbb08fd31dda77bf19b9856bfa947f3
Reviewed-on: https://dart-review.googlesource.com/69161
Reviewed-by: Martin Kustermann <kustermann@google.com>
Servers sometimes send headers with cookie values that are encapsulated in double-quotes. Dart should validate values surrounded with double-quotes instead of throwing a FormatException.
This addresses Issue #33327 directly. I applied the solution to this problem that was [solved in Go's code base](https://github.com/golang/go/blob/master/src/net/http/cookie.go#L369).
Closes#33765https://github.com/dart-lang/sdk/pull/33765
GitOrigin-RevId: 99672dd07d1f938b1bae063f2e9d99d4c141f684
Change-Id: Ie95a064611b1aa15aea93f5c8d801ecfc7d996c4
Reviewed-on: https://dart-review.googlesource.com/63920
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
Similar to how dart2js keeps its own target in package compiler.
This allows VmTarget to use package vm specific transformations and metadata.
Change-Id: I41dd2ae241b828224fb2c9a51e6ad5073b6fdea8
Reviewed-on: https://dart-review.googlesource.com/69160
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
If the name is not provided the implementation can invent something
that conflicts with Dart 'Object'.
Change-Id: I3d15ab5d2c5b57d4bc3757fb5693ef56c452e0b0
Reviewed-on: https://dart-review.googlesource.com/68800
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
This reverts commit 08f59e5de3.
There are no changes to take 3 except fixing merge conflicts.
Change-Id: I45d5a16274c80f469827c19f4e4f4ca724e85a67
Cq-Include-Trybots: luci.dart.try:vm-kernel-win-release-x64-try,vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/68363
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Supports mixed minified and unminified names (like `List` and `num` below).
Example:
TypeError: Closure 'minified:b3': type '() => minified:o<minified:k<num>>' is not a subtype of type 'List<minified:o<minified:k<num>>>'
Change-Id: I1fc67f189170eb9b9c8614b1e3d33128adc49787
Reviewed-on: https://dart-review.googlesource.com/67303
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
getInterceptor now always goes via HInterceptor, ensuring the back end
knows to generate the unspecialized interceptor. We no longer generate
the unspecialized interceptor as *shadowing* the js_runtime
definition. In small programs where interceptors are not used except
via js_runtime.getInterceptor, the program would fail on the value
returned by the dummy body, since it was not shadowed.
This gets rid of the two definitions of getInterceptor (issue 9180).
Change-Id: Ibfa73f26d7d432273d5e755e2165ab6c2d48ad4f
Reviewed-on: https://dart-review.googlesource.com/68002
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
which was blocking the Dart SDK roll.
Revert "Take 3 for "[vm/kernel/precomp] Remove procedures from entry points files.""
This reverts commit 567109df7f.
Revert "[vm/precomp] Extend @pragma entry-points to classes."
This reverts commit 232698047c.
Change-Id: Ib63d1afb8a1c978be7ddf282af0e7d5547111cc3
Reviewed-on: https://dart-review.googlesource.com/67300
Reviewed-by: Alexander Markov <alexmarkov@google.com>
These files are mentioned in libraries.dart under lib/_internal, and
tools may not work if they don't exist.
Change-Id: Idf7d4590b02a4f50dd1cb605d2e91e1c14399726
Reviewed-on: https://dart-review.googlesource.com/67041
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
I've updated the transformer test. The Windows build error appears to have been spurious.
Take 2 is in patchset 1.
Cq-Include-Trybots: luci.dart.try:vm-kernel-win-release-x64-try,vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try
Change-Id: I6ef8f70aaf4664e0411e776463e88c2a1068dbcc
Reviewed-on: https://dart-review.googlesource.com/65902
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
This will allow any embedder to use a C++ API to talk to the vm-service.
Usecase is e.g. trigger a hot-reload without speaking websocket.
Change-Id: Ia54e5a73a0f0a4899e3e6d60694af0b394efb993
Reviewed-on: https://dart-review.googlesource.com/66384
Reviewed-by: Ryan Macnak <rmacnak@google.com>
This reverts commit b59583edea.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Reland "[VM/SDK]"
>
> This is a reland of b4146411d0
>
> Original change's description:
> > [VM/SDK]
> >
> > - Switch the kernel isolate to run in Dart2 mode
> > - Refactor build rules so bootstrapping of the front end happens
> > with a prebuilt dart sdk
> > - Refactor application snapshot build rules so the kernel application
> > snapshot rule does not get into a cyclic dependency during the
> > bootstrap stage
> >
> > Change-Id: Id16b2859e0b299b2d689971d03a247cb94d0aa26
> > Reviewed-on: https://dart-review.googlesource.com/61660
> > Commit-Queue: Siva Annamalai <asiva@google.com>
> > Reviewed-by: Zach Anderson <zra@google.com>
>
> Change-Id: I2a3fa8ed4f331cf3de89ddff5cf8e478809dae39
> Reviewed-on: https://dart-review.googlesource.com/65841
> Reviewed-by: Siva Annamalai <asiva@google.com>
TBR=zra@google.com,asiva@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I6077236481bec9089ead881c902036b0817114fc
Reviewed-on: https://dart-review.googlesource.com/66240
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
This reverts commit a437b4b469.
Reason for revert: Build on Windows appears broken.
Original change's description:
> Re-land "[vm/kernel/precomp] Remove procedures from entry points files."
>
> The original revision is in Patchset 1.
>
> Due to idiosyncrasies of the legacy VM parser, we need to put the @pragma definition
> on both the original and patched definition. Hopefully we can remove these extra definitions
> once Dart 1 AOT is fully obsolete.
>
> Cq-Include-Trybots: luci.dart.try: vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try
> Change-Id: I2515dee2bbf14cece5e75450b1951d45f1250959
> Reviewed-on: https://dart-review.googlesource.com/65545
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
> Reviewed-by: Alexander Markov <alexmarkov@google.com>
> Commit-Queue: Samir Jindel <sjindel@google.com>
TBR=lrn@google.com,alexmarkov@google.com,sjindel@google.com
Change-Id: I783dcd6f00d1f31907d90651ffbf80a6af1fb98d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: luci.dart.try: vm-kernel-optcounter-threshold-linux-release-x64-try, vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/65960
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
The original revision is in Patchset 1.
Due to idiosyncrasies of the legacy VM parser, we need to put the @pragma definition
on both the original and patched definition. Hopefully we can remove these extra definitions
once Dart 1 AOT is fully obsolete.
Cq-Include-Trybots: luci.dart.try: vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try
Change-Id: I2515dee2bbf14cece5e75450b1951d45f1250959
Reviewed-on: https://dart-review.googlesource.com/65545
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
This is a reland of b4146411d0
Original change's description:
> [VM/SDK]
>
> - Switch the kernel isolate to run in Dart2 mode
> - Refactor build rules so bootstrapping of the front end happens
> with a prebuilt dart sdk
> - Refactor application snapshot build rules so the kernel application
> snapshot rule does not get into a cyclic dependency during the
> bootstrap stage
>
> Change-Id: Id16b2859e0b299b2d689971d03a247cb94d0aa26
> Reviewed-on: https://dart-review.googlesource.com/61660
> Commit-Queue: Siva Annamalai <asiva@google.com>
> Reviewed-by: Zach Anderson <zra@google.com>
Change-Id: I2a3fa8ed4f331cf3de89ddff5cf8e478809dae39
Reviewed-on: https://dart-review.googlesource.com/65841
Reviewed-by: Siva Annamalai <asiva@google.com>
This reverts commit b4146411d0.
Reason for revert: Seems to have build issues on certain bots
Original change's description:
> [VM/SDK]
>
> - Switch the kernel isolate to run in Dart2 mode
> - Refactor build rules so bootstrapping of the front end happens
> with a prebuilt dart sdk
> - Refactor application snapshot build rules so the kernel application
> snapshot rule does not get into a cyclic dependency during the
> bootstrap stage
>
> Change-Id: Id16b2859e0b299b2d689971d03a247cb94d0aa26
> Reviewed-on: https://dart-review.googlesource.com/61660
> Commit-Queue: Siva Annamalai <asiva@google.com>
> Reviewed-by: Zach Anderson <zra@google.com>
TBR=zra@google.com,asiva@google.com
Change-Id: I4fc5b81e0a102bde4e8b4f737af3825e9728be3b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/65840
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
- Switch the kernel isolate to run in Dart2 mode
- Refactor build rules so bootstrapping of the front end happens
with a prebuilt dart sdk
- Refactor application snapshot build rules so the kernel application
snapshot rule does not get into a cyclic dependency during the
bootstrap stage
Change-Id: Id16b2859e0b299b2d689971d03a247cb94d0aa26
Reviewed-on: https://dart-review.googlesource.com/61660
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
The real solution requires more work, so this is to buy us some time.
Change-Id: I033a77d05c0ca7658475d1fe59760ce4e5919f7e
Reviewed-on: https://dart-review.googlesource.com/65541
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Fix the `lib_2/async/future_test` test which was otherwise failing everywhere.
Updated status files.
Change-Id: I4e277dd7d47692b92b3303bfdd7cfbde120a8f87
Reviewed-on: https://dart-review.googlesource.com/65080
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This is a reland of https://dart-review.googlesource.com/c/sdk/+/62484
with the following changes:
- _NativeSocket.connect now drops references to pending sockets on
an error or successful connection.
- eventhandlers are updated to ignore unset Dart ports on a close
command.
- Test updated to account for new SocketException.
This is the second part of https://dart-review.googlesource.com/c/sdk/+/62484
This CL adds a startConnect method to Socket types that returns
a ConnectionTask object that can be cancelled. Cancelling
a ConnectionTask closes any sockets that were opened for the
connection attempt that are not yet connected to the host.
This allows a closing HttpClient to close sockets for pending
requests whose sockets weren't fully connected yet.
related https://github.com/flutter/flutter/issues/18617
Change-Id: I47fe3564e41197d622079aad4bb644bbdfe0bfe8
Reviewed-on: https://dart-review.googlesource.com/63040
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
TBR=alanknight@google.com
Change-Id: Iea06485fc54cdbcb30f1cc1bf7a10f97335e242a
Reviewed-on: https://dart-review.googlesource.com/63442
Reviewed-by: Alan Knight <alanknight@google.com>
Reviewed-by: Terry Lucas <terry@google.com>
Commit-Queue: Terry Lucas <terry@google.com>
A test is failing in safari and I plan to suppress it shortly, meanwhile, we are adding a better error message to help us debug it. We are likely going to revert this change shortly.
TBR=sra@google.com
Change-Id: I0d6fc8699c411054e5da73d59b33800879757482
Reviewed-on: https://dart-review.googlesource.com/63301
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
This reverts commit eb3becea2c.
Reason for revert: test failures on the bots.
Original change's description:
> [dart:io] Adds Socket.startConnect
>
> This is the second part of https://dart-review.googlesource.com/c/sdk/+/62484
>
> This CL adds a startConnect method to Socket types that returns
> a ConnectionTask object that can be cancelled. Cancelling
> a ConnectionTask closes any sockets that were opened for the
> connection attempt that are not yet connected to the host.
>
> This allows a closing HttpClient to close sockets for pending
> requests whose sockets weren't fully connected yet.
>
> related https://github.com/flutter/flutter/issues/18617
>
> Change-Id: I59c761b06e070d555fc514614079930b69c129dd
> Reviewed-on: https://dart-review.googlesource.com/62780
> Commit-Queue: Zach Anderson <zra@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
TBR=rmacnak@google.com,zra@google.com,asiva@google.com
Change-Id: I890d0de7fcde65fec55bfa9bad077c1a3dd13a74
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/62980
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
This is the second part of https://dart-review.googlesource.com/c/sdk/+/62484
This CL adds a startConnect method to Socket types that returns
a ConnectionTask object that can be cancelled. Cancelling
a ConnectionTask closes any sockets that were opened for the
connection attempt that are not yet connected to the host.
This allows a closing HttpClient to close sockets for pending
requests whose sockets weren't fully connected yet.
related https://github.com/flutter/flutter/issues/18617
Change-Id: I59c761b06e070d555fc514614079930b69c129dd
Reviewed-on: https://dart-review.googlesource.com/62780
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Needed for next Dart roll into Fuchsia.
Change-Id: Ibc86852f392d1c5b23498f01d2d0b30455036aa5
Reviewed-on: https://dart-review.googlesource.com/62702
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
This is the first part of a two part change for fixing a file
descriptor leak when using HttpClient with a flaky network connection.
There are two ways to use HttpClient. The first way is to allocate
and close an HttpClient for each request. The second way is to allocate
an HttpClient and use it to make several requests. This change
addresses leaks that can happen when using it the second way. A
subsequent change will address leaks that can happen when using it
the first way.
This change adds a field connectionTimeout to HttpClient. Users of
HttpClient can set this field to indicate the `timeout` parameter
that should be passed to calls to {SecureSocket,Socket}.connect() for
new http connections. If the field is not set, the OS default is
used.
related https://github.com/flutter/flutter/issues/18617
Change-Id: I26ae2fce7d28273923d1af697c93d987e3e4a38a
Reviewed-on: https://dart-review.googlesource.com/62484
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Change-Id: I3c6fe9d27aad387a55f9a003d94faa6a9a72f227
Reviewed-on: https://dart-review.googlesource.com/44741
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
A change made it check for a unary function type before a binary, so `(o, [stack])=>...` would not get a stack trace.
Fixes#33589
Bug: http://dartbug.com/33589
Change-Id: I69793eb74501c1f7fe07b6c90115b2f90f4d95df
Reviewed-on: https://dart-review.googlesource.com/61936
Reviewed-by: Florian Loitsch <floitsch@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
- Fixes requestFullscreen to call operation webkitRequestFullscreen not requestFullscreen its only available when RuntimeEnabled=FullscreenUnprefixed.
Fixes#21919R=vsm@google.com
Change-Id: Ib4c4140350d3cef096954e67010f922df9f2310a
Reviewed-on: https://dart-review.googlesource.com/60702
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Closes#33187
Brings in the latest version of pub. There is still an issue with
invaliding old snapshots, but this version works better than the current
synced version.
Change-Id: I5c98b0277ea769baa83c3fee7ebfff2034ba9920
Reviewed-on: https://dart-review.googlesource.com/61983
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Fixes https://github.com/dart-lang/pub/issues/1931
Pub color output depends on the name of the entrypoint it is running
from, when the entrypoint went from "pub" to "pub2" it confused this
check and we stopped getting colors.
Since the Dart 1 version of the snapshot has a short remaining lifespan
we can switch it to the other name and let "pub" mean Dart 2 and
continue to behave like it used to.
Change-Id: I1851a4c908ffe2222ab5fe6802f4b81a63d7f9f1
Reviewed-on: https://dart-review.googlesource.com/61641
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
* Don't use the word "sets" on a final (no setter) member.
* Use "its" not "it's"
* Use modern dartdoc syntax
* Use markdown unordered list for `compressionDefault`.
* Use one-sentence first paragraphs.
Bug: https://github.com/dart-lang/sdk/issues/29438
Change-Id: I008c1bd0f32c7760dd64fc45fe4dd99e44498d10
Reviewed-on: https://dart-review.googlesource.com/61482
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
- make Dart2 the default option for the command line VM
- add option --no-preview-dart-2 as a fallback option to run dart1
- change test scripts to use the executable dart for testing dart2 mode instead of
pkg/vm/tool/dart2
- adjust numerous build and test configurations
Change-Id: Id813fa5b71a89c7ec9335d3f6e83cfc9f35f86e7
Reviewed-on: https://dart-review.googlesource.com/58240
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Also update the `int` class documentation.
Change-Id: I2de6c62aa9642c18134effa8187a12902d5f2259
Reviewed-on: https://dart-review.googlesource.com/58204
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
- Removed obsolete Dartium/_blink code.
R=kevmoo@google.com
Change-Id: I81a6f0d5bfe33592ff8ae9c85db9266e898c2861
Reviewed-on: https://dart-review.googlesource.com/60380
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
- Associate the JS class SpeechSyntesisVoice with the correct Dart class (DDC).
- Top-level querySelectorAll wasn't generic.
- Handle "static" for attributes in the IDLs.
Fixes#33147Fixes#33178Fixes#31886Fixes#20585R=vsm@google.com
Change-Id: Ic75a2bfc66670b72342269be259408b610547dab
Reviewed-on: https://dart-review.googlesource.com/59240
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Change-Id: Ib2d7738c84cd1258dcad46e8e2c8da8105efea60
Reviewed-on: https://dart-review.googlesource.com/59100
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
+ use the 'any' type to avoid failing on bounds with type variables, which we currently don't support.
Change-Id: I57d74d17fa9eee598bd86c8e76790778438cddfd
Reviewed-on: https://dart-review.googlesource.com/59540
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
The `@pragma` annotation on `vmservice_io.main` is modified to only mark it as a
root on non-product builds. Since the annotation is evaluated in the constant
transformation, we need to thread a flag through `gen_kernel.dart` indicating
whether the Kernel produced should target a product precompiler.
# Test Plan
Tested locally on Flutter. Unfortunately it's not possible to test the scenario where
`vmservice_io` is not included, since we don't have any "product" bots. Soon the
flag will be introduced into Flutter, and we will have some coverage from there.
Change-Id: I39f12343038fa221aafe5a55241bff4b8d14ec19
Reviewed-on: https://dart-review.googlesource.com/57501
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Rewrite _checkLength to avoid weaknesses in type inference.
Change-Id: I1a254d021ff966fa51da7f8258c5cba7b3b10336
Reviewed-on: https://dart-review.googlesource.com/58542
Reviewed-by: Emily Fortuna <efortuna@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
If there is registered expression compiler, VM debugger uses it to compile expressions. Otherwise, it will fallback to use kernel service compiler.
This is needed to support Flutter use case where compiler is running on developer's host machine, not on the device where VM is running.
Bug: dartbug.com/31981
Change-Id: I8bdfc8ab45a57c306169abe189f1e24e1b0bcf40
Reviewed-on: https://dart-review.googlesource.com/57520
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
- Add test for JavaScriptFunction type tests
- Make toString() for JavaScriptFunction more explicit.
Change-Id: I60042b909709c822c924336fd4973f35dc7f779a
Reviewed-on: https://dart-review.googlesource.com/58062
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Renames the target to dartdevk_sdk (to match dartdevc_sdk), and switches
dartdevk_sdk and dartdevc_test_pkg to use prebuilt_dart_action.
Change-Id: Ib31c85c46743a005bb95cf888055a4d093ffe07f
Reviewed-on: https://dart-review.googlesource.com/57481
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
- Forward only kImportTag requests to DFE. This restores the current handling of a kScriptTag request when loading the kernel isolate in the simulators.
- Mark dynamic_load_test as failing in the reload stress tests (reload fails to preserve library identity).
Change-Id: Ibe6f0a3505b99736a38d566abf3b2151505d7a7e
Reviewed-on: https://dart-review.googlesource.com/56706
Reviewed-by: Siva Annamalai <asiva@google.com>
This reverts commit ad4cfa0260.
Reason for revert: Assertion failures on DBC
Original change's description:
> [mirrors] Add IsolateMirror.loadUri.
>
> This allows a programmer to dynamically load code into an isolate. The closest existing API is Isolate.spawnUri, but communication with the dynamically loaded code in that case is limited to asynchronous message passing of JSON-like objects.
>
> Change-Id: Icb23e9dacfb0035622c119f11d4e0f892ba2ccd1
> Reviewed-on: https://dart-review.googlesource.com/45363
> Reviewed-by: Zach Anderson <zra@google.com>
TBR=rmacnak@google.com,zra@google.com,asiva@google.com,kmillikin@google.com
Change-Id: I80669188b9f40b3b527e8e268ade0d0d514a8753
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/56640
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This allows a programmer to dynamically load code into an isolate. The closest existing API is Isolate.spawnUri, but communication with the dynamically loaded code in that case is limited to asynchronous message passing of JSON-like objects.
Change-Id: Icb23e9dacfb0035622c119f11d4e0f892ba2ccd1
Reviewed-on: https://dart-review.googlesource.com/45363
Reviewed-by: Zach Anderson <zra@google.com>
APIs in the newer Chrome IDLs support more JS style promises. The Dart web libraries now hookup those promises and return a Dart Future.
Additionally, a new type maplike is exposed in the IDL this is exposed too.
Change-Id: I44175877eb95f4d910586d42c0139fb182483f82
Reviewed-on: https://dart-review.googlesource.com/49800
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Stephen Adams <sra@google.com>