This reverts commit 729099cc5b.
Reason for revert: Causing crashes in google3 after roll (b/270314587).
Original change's description:
> [ VM ] Update embedding API to perform Platform initialization
>
> Platform::Init (now Platform::InitOnce) was only being called directly
> from the CL embedder and could not be invoked via any path in the embedding
> API. Platform::InitOnce is now invoked in both dart::bin::BootstrapDartIo and
> dart::embedder::InitOnce.
>
> Fixes https://github.com/dart-lang/sdk/issues/37586
>
> Change-Id: I594908895c19e3058f707f920e265e79ca4cecd7
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117591
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Zach Anderson <zra@google.com>
TBR=bkonyi@google.com,zra@google.com,kpozin@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I23253631e13d703e9e5384f9ec4ff6b79ef4ef21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118643
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
With the experiment flag on, will properly parse the `in`/`out`/`inout`
keywords. Without it, will issue an error regarding the flag. First CL
for parsing, syntax support, no AST work yet.
Keywords only parse correctly for classes and mixins.
See test `variance_disabled_syntax_test.dart`.
Change-Id: I37d765804fa0752512abf52fa44456a173087ef0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117929
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Also switch some CQ bots using blobs to ELF. Once all embedders have migrated, we will remove blobs
support entirely.
Change-Id: Ie5e8c1187ad6c1af362b5715daafd3641bc8cc0e
Cq-Include-Trybots:luci.dart.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-bare-linux-release-simarm-try,vm-kernel-precomp-mac-debug-simarm_x64-try,vm-kernel-precomp-mac-release-simarm64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-precomp-android-release-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116620
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
As discussed by email, this adds the prefer_final_* lints to pkg/vm.
Adding the lints is a practical step forward, even though we do not enforce them with a presubmit check at this time.
Next steps including cleaning up lint violations and adding a presubmit check.
Change-Id: I50c421ad06114b1ae4a5da422b375fd28d7150d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118542
Reviewed-by: Johnni Winther <johnniwinther@google.com>
With something like
x2() {
y(z, {z}) {}
}
in a part, we create an error on the 2nd 'z'.
That error message gets the file uri of the body builder which is correct.
The context gets (for the 1st 'z') gets the file uri of the
FormalParameterBuilder which in turn got it from the "parent" which is the
library which is the "main library", i.e. not the "part library".
This causes - in the face of parts - one of two things:
1) It will point into the wrong file and the error message will be bad.
2) It tries to point into the wrong file, but the wrong file is not big
enough, and we thus get a crash.
This CL fixes it so the FormalParameterBuilder has the right uri.
Fixes https://github.com/dart-lang/sdk/issues/38523.
Bug: 38523
Change-Id: I303dbec2934ae930b8f2f2c9f63a4aa00db3a89c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118448
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Because we cache dills, it gives problems when loading the same library
from two different dills and starts "ping-ponging" between them.
See http://dartbug.com/38496 for details.
This solves the problem by removing any old dill from the cache,
that overlaps with what we're loading in now.
Bug: 38496
Change-Id: I61c2b3694d1d0d8fd5e9b62c4a03b6ac03ae4308
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118386
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Previously the errors were reported using the synthesized name, like
`Extension|method` instead of `method`.
+ Report errors on invalid uses of explicit extension application as
an expression or lvalue.
Change-Id: I6d85430be4ab3966ee94131b37aa365265c07eac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118383
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Currently Dart SDK has 2 platform dill files:
* vm_platform_strong.dill is used when compiling Dart sources (in kernel
service and various kernel compilers).
* vm_platform_strong_stripped.dill is used to build core snapshot,
so its contents is used for execution in the VM.
Before this change, if Dart SDK is built with bytecode, then both
vm_platform_strong.dill and vm_platform_strong_stripped.dill contain
bytecode and AST.
This change removes bytecode from vm_platform_strong.dill, and removes
AST from vm_platform_strong_stripped.dill.
Sizes:
Dart SDK is built without bytecode:
5861400 out/ReleaseX64/vm_platform_strong.dill
2819336 out/ReleaseX64/vm_platform_strong_stripped.dill
32105720 out/ReleaseX64/dart-sdk/bin/dart
Dart SDK is built with bytecode, before this change:
11146480 out/ReleaseX64/vm_platform_strong.dill
4846488 out/ReleaseX64/vm_platform_strong_stripped.dill
34219256 out/ReleaseX64/dart-sdk/bin/dart
Dart SDK is built with bytecode, after this change:
5861400 out/ReleaseX64/vm_platform_strong.dill
2027224 out/ReleaseX64/vm_platform_strong_stripped.dill
28382456 out/ReleaseX64/dart-sdk/bin/dart
Change-Id: Ia7c61a9bce1c95edfd3b2810a67c0964fb37377f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118371
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Mostly fixes unresolved references but fixes some other small issues as well
Bug: https://github.com/dart-lang/sdk/issues/37880
Change-Id: I5747c3c90d66d23859e021fc6bd07cc7cd9700d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103741
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
This reverts commit 43cacafb51.
Patchset 1 is the original CL. Compare PS 1 to 4 to see additional fix.
It undoes an optimization that assumes private fields
are not overridden in the SDK. This patterns happens in dart:ui
and would be difficult to enforce now that flutter web also adds to
the SDK. As a result, all private SDK fields are virtualized, adding 0.7% to the size of
dart_sdk.js.
Fixes https://github.com/dart-lang/sdk/issues/38455
Change-Id: If969dddcb7143316ac8c771df1ed83def21412b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118362
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>