if NativeSocket.read() has not specified `len`, I will expect caller wants all bytes(this is not documented, correct me if I'm wrong).
Check the available bytes after read(), if there are leftover, issue another read(). This will eventually drain the pipe.
Bug: https://github.com/dart-lang/sdk/issues/40589
Change-Id: I3b0be9ef8258defd1f71f85b3154702401e0f31c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136322
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
We don't intend to migrate unittest to NNBD, so the remaining tests
that use it need to be migrated off. This takes care of the couple of
tests in standalone/ and standalone_2/ that used it.
The tests should behave the same as they did before. I verified by
making the tests fail in various ways after the migration and ensuring
that the tests failed as expected.
Change-Id: I938229cabad1d78a42a030970f2003edd36572f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136060
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
This CL:
* Moves [Heap]/[SharedClassTable] from [Isolate] to [IsolateGroup], which
will make all isolates in the group use the same heap. The GC will use
the shared class table for object size information.
* Adds support for entering/leaving an isolate group as a helper thread
(e.g. via [Thread::EnterIsolateGroupAsHelper]). The current active
isolate group can be accessed via TLS `IsolateGroup::Current()` or
`Thread::isolate_group_`. When entering as a helper thread there will be
no current isolate.
* Changes the GC to use the above mechanism and ensures GC works without
a currently active isolate. The GC will use information purely available via
[IsolateGroup]. The GC will iterate all isolates within an isolate
group e.g. for scanning roots.
* Makes spawning of new isolates start in their own isolate group.
Once the isolate is fully functional it's heap will be merged into
the original isolate group
* Moves ApiState, containing persistent and weak persistent handles,
from [Isolate] to [IsolateGroup], plus adds appropriate locking.
Issue https://github.com/dart-lang/sdk/issues/36097
Change-Id: Ia8e1d8aa78750e8400864200f4825395a182c004
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126646
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
When deduplicating instructions, multiple Code objects may end up
mapping to the same set of program counters, which affects decoding a
stack trace using PC addresses. Since the DWARF stack traces test
depends on the stack trace decoding a certain way, pick a test as a
canary for issues with instruction deduplication that _doesn't_ depend
on how the stack trace will decode.
In previous experience, the underlying test used is unimportant,
so we build off the existing hello world code. If we have an error
due to code inadvertently assuming non-deduplicated instructions,
this error tends to manifest in the VM failing to start up no matter
what code should eventually run.
Fixes https://github.com/dart-lang/sdk/issues/40635
Change-Id: Ife9048740b91dc98b50c8fe4b9ff3dc052dd0a62
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-release-simarm_x64-try,vm-kernel-precomp-mac-release-simarm64-try,vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136122
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This is a breaking change. https://github.com/dart-lang/sdk/issues/40483
The Process class will now throw a StateError if the process is detached
upon accessing the exitCode getter. It now also throws when not
connected to the child process's stdio upon accessing the stdin, stdout,
and stderr getters. Previously these getters would all return null.
The getters in question are meaningless for detached processes and there
is no reason to use them in that case. To provide a better experience
when Dart becomes null-safe, these getters are changed to throw and
never return null, which avoids all legitimate uses of the getters from
needing a null check that will never fail.
The NNBD migration required making subtle changes to some dart:io
semantics in order to provide a better API. This change backports one of
these semantic changes to the unmigrated SDK so any issues can be
discovered now instead of blocking the future SDK unfork.
Change-Id: I776e0dc8bcd517d70332c60dd8ab88db17746aa5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134329
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
This is a breaking change. Request: https://github.com/dart-lang/sdk/issues/33501
HttpHeaders use lowercase by default for all headers, since it is supposed to be case insensitive. Some servers incorrectly treat case as significant, however, and expect headers with capitalization or in uppercase. The current implementation forces headers to be lower cases when adding values. Users cannot even manually modify the headers.
This change removes this restriction here so that users can modify the headers to whatever form they want. The new behavior is backwards compatible except if class was implemented. All headers inside http.dart are written as lower cases, adding values to HttpHeaders is still receiving lower cases input.
The other cl (https://dart-review.googlesource.com/c/http_multi_server/+/121411) migrates multi_headers.dart to be compatible with this change.
Bug: https://github.com/dart-lang/sdk/issues/33501
Change-Id: Ieb9f4061b27ed3bbc6d82e6a408c77d11abb037b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135357
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
This is a reland of af4a3112c4
Original change's description:
> Reland "fix hanging of write on Windows"
>
> This is a reland of eb075dcc21
>
> Original change's description:
> > fix hanging of write on Windows
> >
> > When using File::Write(), Var size in int64_t is casted to DWORD(unsigned long). When Var size is out of DWORD range, casted value will be zero. Before calling into File::Write() on Windows, validate the size.
> >
> > Bug: https://github.com/dart-lang/sdk/issues/40339
> > Change-Id: I36fade62dfa3025f418405cb3e45c286dd6b7db1
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134440
> > Reviewed-by: Zach Anderson <zra@google.com>
> > Commit-Queue: Zichang Guo <zichangguo@google.com>
>
> Bug: https://github.com/dart-lang/sdk/issues/40339
> Change-Id: I5a07c58709c62b996a55a76272636602dc80e20d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134783
> Commit-Queue: Zichang Guo <zichangguo@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
Bug: https://github.com/dart-lang/sdk/issues/40339
Change-Id: I78e4bd993271cdeac9db5a1d005ae5be0f2891c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135340
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
This reverts commit af4a3112c4 as it broke asan linux bot.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Reland "fix hanging of write on Windows"
>
> This is a reland of eb075dcc21
>
> Original change's description:
> > fix hanging of write on Windows
> >
> > When using File::Write(), Var size in int64_t is casted to DWORD(unsigned long). When Var size is out of DWORD range, casted value will be zero. Before calling into File::Write() on Windows, validate the size.
> >
> > Bug: https://github.com/dart-lang/sdk/issues/40339
> > Change-Id: I36fade62dfa3025f418405cb3e45c286dd6b7db1
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134440
> > Reviewed-by: Zach Anderson <zra@google.com>
> > Commit-Queue: Zichang Guo <zichangguo@google.com>
>
> Bug: https://github.com/dart-lang/sdk/issues/40339
> Change-Id: I5a07c58709c62b996a55a76272636602dc80e20d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134783
> Commit-Queue: Zichang Guo <zichangguo@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
TBR=zra@google.com,asiva@google.com,zichangguo@google.com
Change-Id: I5f53e42c56859a46e9fe40e1a1e7fba541e5378e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/40339
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135260
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
This is a reland of eb075dcc21
Original change's description:
> fix hanging of write on Windows
>
> When using File::Write(), Var size in int64_t is casted to DWORD(unsigned long). When Var size is out of DWORD range, casted value will be zero. Before calling into File::Write() on Windows, validate the size.
>
> Bug: https://github.com/dart-lang/sdk/issues/40339
> Change-Id: I36fade62dfa3025f418405cb3e45c286dd6b7db1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134440
> Reviewed-by: Zach Anderson <zra@google.com>
> Commit-Queue: Zichang Guo <zichangguo@google.com>
Bug: https://github.com/dart-lang/sdk/issues/40339
Change-Id: I5a07c58709c62b996a55a76272636602dc80e20d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134783
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Now, when writing an AOT snapshot in bare instructions mode, only
the actual instructions in the RawInstructions payload are serialized
instead of the entire RawInstructions object.
Since there are no longer RawInstructions objects in these AOT
snapshots, we also change how Code objects are serialized. Instead
of just containing a reference to the RawInstructions object, we
serialize two pieces of information: where the instructions
payload for this Code object begins and whether there was a single
entry for the instructions payload. (To save space, the single
entry bit is serialized as the low order bit of the unchecked
offset, which was already being serialized).
While we also need the length of the instructions payload, we
approximate it for all but the last Code object by subtracting
the next Code object's payload start from this Code object's
payload start. For the last Code object, we assume it extends
to the end of the instructions image.
Changes on flutter gallery in release mode:
armv7: instructions size -2.70%, total size -1.73%
armv8: instructions size -6.04%, total size -3.63%
Fixes https://github.com/dart-lang/sdk/issues/38451.
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-simarm_x64-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-mac-release-simarm64-try,vm-kernel-precomp-win-release-x64-try
Change-Id: Ia0a5c4e5e47c956776dc62503da38ec55a143c04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134325
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This reverts commit eb075dcc21.
Reason for revert: Out of memory on IA32 and On MacOS, invalid path argument on MacOS.
Original change's description:
> fix hanging of write on Windows
>
> When using File::Write(), Var size in int64_t is casted to DWORD(unsigned long). When Var size is out of DWORD range, casted value will be zero. Before calling into File::Write() on Windows, validate the size.
>
> Bug: https://github.com/dart-lang/sdk/issues/40339
> Change-Id: I36fade62dfa3025f418405cb3e45c286dd6b7db1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134440
> Reviewed-by: Zach Anderson <zra@google.com>
> Commit-Queue: Zichang Guo <zichangguo@google.com>
TBR=zra@google.com,asiva@google.com,zichangguo@google.com
Change-Id: I9d515912ad99f523c6d19fac0c8fbbb23a897986
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/40339
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134768
Reviewed-by: Zichang Guo <zichangguo@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
When using File::Write(), Var size in int64_t is casted to DWORD(unsigned long). When Var size is out of DWORD range, casted value will be zero. Before calling into File::Write() on Windows, validate the size.
Bug: https://github.com/dart-lang/sdk/issues/40339
Change-Id: I36fade62dfa3025f418405cb3e45c286dd6b7db1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134440
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
This reverts commit 4cd6243d77.
Reason for revert: Breaks anything using the bazel_worker package (which is used for modular compilation with build_runner). https://travis-ci.org/dart-lang/build/jobs/645748778
Original change's description:
> [dart:io] Backport semantic changes from the dart:io NNBD migration.
>
> The NNBD migration required making subtle changes to some dart:io
> semantics in order to provide a better API. This change backports these
> semantic changes to the unmigrated SDK so any issues can be discovered
> now instead of blocking the future SDK unfork.
>
> The Process class will now throw a StateError if the process is detached
> upon accessing the stdin, stdout, stderr, and exitCode getters.
>
> The Socket class will now throw a SocketException if the socket has been
> destroyed or upgraded to a secure socket upon setting or getting socket
> options.
>
> Change-Id: I956fd07e713e51ebd479ebbfe4790d8d2fdf0744
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133989
> Commit-Queue: Jonas Termansen <sortie@google.com>
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
TBR=sortie@google.com,lrn@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I744662fcd14ca232bf44a584bb6f3974d48da69a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134361
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
The NNBD migration required making subtle changes to some dart:io
semantics in order to provide a better API. This change backports these
semantic changes to the unmigrated SDK so any issues can be discovered
now instead of blocking the future SDK unfork.
The Process class will now throw a StateError if the process is detached
upon accessing the stdin, stdout, stderr, and exitCode getters.
The Socket class will now throw a SocketException if the socket has been
destroyed or upgraded to a secure socket upon setting or getting socket
options.
Change-Id: I956fd07e713e51ebd479ebbfe4790d8d2fdf0744
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133989
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
This reverts commit b2b7337ad4.
Reason for revert: flutter build broke!!
Original change's description:
> [dart:io] Stop forcing lower case on HttpHeaders
>
> This is a breaking change. Request: https://github.com/dart-lang/sdk/issues/33501
>
> HttpHeaders use lowercase by default for all headers, since it is supposed to be case insensitive. Some servers incorrectly treat case as significant, however, and expect headers with capitalization or in uppercase. The current implementation forces headers to be lower cases when adding values. Users cannot even manually modify the headers.
>
> This change removes this restriction here so that users can modify the headers to whatever form they want. The new behavior is backwards compatible except if class was implemented. All headers inside http.dart are written as lower cases, adding values to HttpHeaders is still receiving lower cases input.
>
> The other cl (https://dart-review.googlesource.com/c/http_multi_server/+/121411) migrates multi_headers.dart to be compatible with this change.
>
> Bug: https://github.com/dart-lang/sdk/issues/33501
> Change-Id: I6f7f2ef907b229773c283140c07f2de4cd500981
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119100
> Commit-Queue: Zichang Guo <zichangguo@google.com>
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
TBR=whesse@google.com,sortie@google.com,lrn@google.com,zichangguo@google.com
Change-Id: I4d4299393ad6549b250053df8823e726855e2baf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/33501
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134102
Reviewed-by: Zichang Guo <zichangguo@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
This is a breaking change. Request: https://github.com/dart-lang/sdk/issues/33501
HttpHeaders use lowercase by default for all headers, since it is supposed to be case insensitive. Some servers incorrectly treat case as significant, however, and expect headers with capitalization or in uppercase. The current implementation forces headers to be lower cases when adding values. Users cannot even manually modify the headers.
This change removes this restriction here so that users can modify the headers to whatever form they want. The new behavior is backwards compatible except if class was implemented. All headers inside http.dart are written as lower cases, adding values to HttpHeaders is still receiving lower cases input.
The other cl (https://dart-review.googlesource.com/c/http_multi_server/+/121411) migrates multi_headers.dart to be compatible with this change.
Bug: https://github.com/dart-lang/sdk/issues/33501
Change-Id: I6f7f2ef907b229773c283140c07f2de4cd500981
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119100
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
* Some cleanups on http parser.
* When parsing body of the http response/request, errors should not go to _controller, where it is paused. This leads to hanging.
* Fix another bug: (byte < 0x30 && 0x39 < byte)
Bug: https://github.com/dart-lang/sdk/issues/40132
Change-Id: Iaf3fb6a409c92889f50b86220a2c6c2318012c47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132964
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
Running all existing tests with/without lazy async stacks ensures that
the existing functionality for --lazy-async-stacks does not regress.
There are still a few smaller things to be done in the debugger for lazy
async stacks.
This CL also ensures:
* The inner closure, i.e. AsyncClosure/AsyncGenClosure, is not
inlined if FLAG_lazy_async_stacks is on.
* Fixes a crash in dartkb mode, when the function of the Bytecode
object is null.
* Does a simple integration of the lazy async stacks in debugger.cc -
to ensure a stack is returned via vm-service.
Issue https://github.com/dart-lang/sdk/issues/37668
Change-Id: Ibc1e887a457e2c456ae65d9ed5fa92434f122a32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131825
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
We only check the expected stack starting from the call to
foo in main, so we no longer depend on what is captured in
the stacktrace for how main is invoked.
Also removes the old status lines for this test, which are no
longer applicable, and cleans up the documentation a little.
Fixes https://github.com/dart-lang/sdk/issues/39766.
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try
Change-Id: I66746f5a5169bce425bfd1f01a6a912b062e99c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128737
Reviewed-by: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
Note that when generating unstripped ELF snapshots with --obfuscate,
this means DWARF sections in the resulting snapshot will leak
otherwise obfuscated information. To avoid this, use both --strip
to strip the generated snapshot and --save-debugging-info=<...> to
save the unobfuscated DWARF information to a separate file.
Fixes https://github.com/dart-lang/sdk/issues/35563.
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-precomp-mac-release-simarm64-try,vm-kernel-precomp-win-release-x64-try
Change-Id: I545a737bd58fcd99c329386a552bd8951acf38b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128732
Reviewed-by: Martin Kustermann <kustermann@google.com>
Removes an unnecessary change to the names of type testing stubs that
allowed name collisions to happen.
Old commit message:
The flag can be used when creating AOT snapshots. The resulting file can be
used with package:vm/dwarf/convert.dart to convert DWARF-based stack traces
to stack traces with function, file, and line number information.
Currently the saved file will be an ELF file with DWARF debugging information,
but this is subject to change in the future. To avoid being affected by any
changes in format, read the DWARF information from the file using
Dwarf.fromFile() in package:vm/dwarf/dwarf.dart.
Also adds --dwarf-stack-traces to the VM global flag list, so its value at
compilation will be read out of snapshots by the precompiled runtime.
Fixes https://github.com/dart-lang/sdk/issues/39512, which was due to
a missing compiler::target:: prefix for Instructions::HeaderSize() in
BlobImageWriter::WriteText().
Exposes the information suggested in
https://github.com/dart-lang/sdk/issues/39490 so that package:vm/dwarf
can appropriately convert absolute PC addresses to the correct virtual
address for a given DWARF line number program.
Bug: https://github.com/dart-lang/sdk/issues/35851
Change-Id: I6723449dceb0b89c054a1f1e70e7acd7749baf14
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-precomp-mac-release-simarm64-try,vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128730
Reviewed-by: Martin Kustermann <kustermann@google.com>
REASON: the first commit in the chain contains a change that breaks internal
Flutter roll due to duplicated symbols for type testing stubs in assembly
snapshots.
Revert "[vm/compiler] Add --save-debugging-info flag to gen_snapshot."
This reverts commit c2b6c2e1db.
Revert "[vm] De-obfuscate function and file names in DWARF sections."
This reverts commit 4b8fd3c412.
Revert "[vm] Add docs for DWARF stack traces and related tools/libraries."
This reverts commit 5543e5ceb8.
Revert "[vm] Weaken dwarf_stack_trace expected stack trace."
This reverts commit 5824d3ed53.
Change-Id: I95ecd16fe493f61ae761dabfdd91a6ec0c2f0ca3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128776
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Unfortunately individual tests cannot be skipped via /0 since they are
not proper multitests.
Change-Id: Ib8ff7ec2bb52f716c70ebbfb9358278509809d52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128550
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
We only check the expected stack starting from the call to
foo in main, so we no longer depend on what is captured in
the stacktrace for how main is invoked.
Also removes the old status lines for this test, which are no
longer applicable, and cleans up the documentation a little.
Fixes https://github.com/dart-lang/sdk/issues/39766.
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try
Change-Id: I61f0465dcd55d090c49db9c6af503ae9c0df6313
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128401
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Note that when generating unstripped ELF snapshots with --obfuscate,
this means DWARF sections in the resulting snapshot will leak
otherwise obfuscated information. To avoid this, use both --strip
to strip the generated snapshot and --save-debugging-info=<...> to
save the unobfuscated DWARF information to a separate file.
Fixes https://github.com/dart-lang/sdk/issues/35563.
Change-Id: I8795e2a5623ad5fc5362257007f677e622a7700b
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-precomp-mac-release-simarm_x64-try,vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127166
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
The flag can be used when creating AOT snapshots. The resulting file can be
used with package:vm/dwarf/convert.dart to convert DWARF-based stack traces
to stack traces with function, file, and line number information.
Currently the saved file will be an ELF file with DWARF debugging information,
but this is subject to change in the future. To avoid being affected by any
changes in format, read the DWARF information from the file using
Dwarf.fromFile() in package:vm/dwarf/dwarf.dart.
Also adds --dwarf-stack-traces to the VM global flag list, so its value at
compilation will be read out of snapshots by the precompiled runtime.
Fixes https://github.com/dart-lang/sdk/issues/39512, which was due to
a missing compiler::target:: prefix for Instructions::HeaderSize() in
BlobImageWriter::WriteText().
Exposes the information suggested in
https://github.com/dart-lang/sdk/issues/39490 so that package:vm/dwarf
can appropriately convert absolute PC addresses to the correct virtual
address for a given DWARF line number program.
Bug: https://github.com/dart-lang/sdk/issues/35851
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-precomp-mac-release-simarm_x64-try,vm-kernel-precomp-win-release-x64-try
Change-Id: I80d900fd9e5f1e2399ad3f2fd25c85131a7ea43c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121857
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Also fixes the low and high PC information in the DWARF output of
inlining nodes.
Bug: https://github.com/dart-lang/sdk/issues/35851
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-mac-release-x64-try,vm-kernel-precomp-mac-release-simarm_x64-try,vm-kernel-precomp-win-release-x64-try
Change-Id: I11c3577bdc5c12abdc88aa799c1aae3f505294df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123734
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
I am trying to migrate all of the negative tests to something more
precise. As far as I can tell, this test stopped being useful with Dart
2.0. Now that all compilation errors are reported eagerly, the file
simply doesn't run at all. It's now just another test of an unresolved
identifier.
(This is a good example of *why* I want to get rid of negative tests.
This test silently went from a desired runtime failure to a compile-time
failure.)
Change-Id: Iec3cdd32a15612c0760119e92d618e3a5ba1f5ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125555
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Setting the `enableTimelineLogging` property of `HttpClient` to true results in
timeline events being created for HTTP connections and HTTP requests.
Timeline events contain general connection information, including:
- Request type
- Status code
- Request / response headers
- Cookies
- Non-sensitive proxy information
- Relevent error messages for failed connections
Change-Id: Ibe16a312ab5398c9ae886ea07bea5ca70b63e440
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123540
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
This is practically a copy of the change in
https://dart-review.googlesource.com/c/sdk/+/118040 but applied to the non-nnbd
sdk.
Even though there is no intent to run the non-nnbd sdk with the non-nullable
experiment, we need to add this annotation because of how we
intend to gradually start testing NNBD. The libraries.json under
sdk_nnbd is allowed to point to libraries under the non-nnbd sdk in order to
temporarily build without errors until all patch files are migrated and all CFE
issues are addressed.
Change-Id: I53c1123a8d86c10695832a8a0ad35adb7b4d92fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125181
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Walk through http headers class. Since http header uses case-insensitive headers, noFolding() implicitly assumes field name is lower-cases. It is used to compare to lower-cases field name. Validate the field name before it is stored and also add a test case for noFolding().
Change-Id: I58f8a0ed0d366281e1e7a8c60fd46ff81c8ee796
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121773
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
Crashes come from assertion in ReturnTokens() and new_mask() in Eventhandler.
Another issue is when multiple serversockets bind to the same address, Socket will be reused to all Dart_Ports. But Socket didn't keep track of corresponding Dart Port.
When one of isolates is killed, finalizer wakes up and close most recent Dart Port that sends data.
After this cl, Socket may not be reused by different Dart Sockets. All Dart socket will has its own Socket object. But Sockets can have same fd.
This will guarantee finalizer will close right Dart Port.
Bug: https://github.com/dart-lang/sdk/issues/36106
Change-Id: Ib4620ada5f120ffda719052297009280c73b4315
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122490
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This test already has several GCs under the default growth policy, so the verifier runs enough with this flag omitted.
Also, re-enable the background compiler in this test.
Change-Id: I5b874984f45766be76d5ab429df84c2f64bf7e17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123330
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Shared snapshots have been disused by Fuchsia deduping.
Reused instruction has been disused by Flutter code push.
Change-Id: Ia4cb570935c233a9365d521ca04a477c5550ef83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122421
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Change-Id: I8aa918b4065eaa9ae8e4501c6a77328659784f9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114848
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Alexander Thomas <athom@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>
Dart 2 shipped a year ago, so we're pretty well past a "preview". :)
Change-Id: I6c5d21ae4181e4228cc1fc49b6344cdb8fc43794
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115544
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Change-Id: I421fca89e748474a585f052532b86ef3ddbed4ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113681
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
This reverts commit c010458732.
Reason for revert: We believed that the Crash marker had no effect in the -kernel status files, but some of these crashes were vm crashes, so they were suppressing upload of core dumps. These uploads are failing on Windows builders.
Original change's description:
> [infra] Remove non-essential test expectations from kernel status files
>
> Change-Id: I959b7847e93c221d77c94bd25f95e913a25e91cd
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113685
> Reviewed-by: Jens Johansen <jensj@google.com>
> Commit-Queue: Karl Klose <karlklose@google.com>
TBR=karlklose@google.com,jensj@google.com
Change-Id: I57978d9253a5889c58444fce3ce6c30b79ab4040
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113691
Reviewed-by: William Hesse <whesse@google.com>
path may contain spaces. When it is passed into CreatProcessW, it will interpret in several ways. Escape path for CreateProcessW to remove ambiguity. Make sure [path] won't be escaped again.
Bug:https://github.com/dart-lang/sdk/issues/37751
Change-Id: I70914c7c2e17aad660126662ab0e83eebe348892
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112934
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Once DirectoryWatcherHandle is created, it immediately send IssueRead() request to start monitoring the changes in the dicectory. But when changes are comming too fast, the following dart side stream has not been listened. The stream will hang forever.
Bug: https://github.com/dart-lang/sdk/issues/37233
Change-Id: I6100e62331009c2922d84c970d911867370eaeab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111342
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
This change introduces two new pragmas:
* `@pragma('vm:never-inline')`
* `@pragma('vm:prefer-inline')`
These replaces the old way of specifying AlwaysInline or NeverInline
annotations when the (now removed) --enable-inlining-annotations flag
was used.
Bug: https://github.com/dart-lang/sdk/issues/36571
Change-Id: Iee152c1d67abde8d58c58fa967449d36e77c8c93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110440
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
http_close_test was given a test exception in issue 28380.
This CL adds Expects to check for the expected number of error
on both server and client in testClientCloseWhileSendingRequest.
It also moves the server.close() into the server error handler
to make sure we don't flakily close the server before all requests
are fully sent and received in both ends.
This should get rid of:
HttpException: Connection closed while receiving data, uri = /
#0 _HttpIncoming.listen [...]
The modified test has been unflaky across a few hundred test runs
locally.
A few lints were also fixed in the process such as 'unnecessary new'.
Bug: https://github.com/dart-lang/sdk/issues/28380
Change-Id: I3470f70f7965c34f73da71489511e1cb2d1b7e42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109964
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
The library tag handler needs to be available during set up of child isolate, during kernel loading for the isolate(due to usage of native extensions).
Setting up library tag handler in initialize_isolate callback is too late for that.
Change-Id: Ie152d2c699ce3318e90325e693b6c66d30267d7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110160
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
This reverts commit 629f38cf87.
Reason for revert: This CL seems to depend on constant_update_2018 flag being turned on by default. The CL that turns on constant_update_2018 has been reverted, so this CL is also being reverted.
Original change's description:
> [vm/compiler] Implement new inlining pragmas.
>
> This change introduces two new pragmas:
>
> * `@pragma('vm:never-inline')`
> * `@pragma('vm:prefer-inline')`
>
> These replaces the old way of specifying AlwaysInline or NeverInline
> annotations when the (now removed) --enable-inlining-annotations flag
> was used.
>
> Bug: https://github.com/dart-lang/sdk/issues/36571
> Change-Id: I2495c72819d94e43cefc837d4eb454b7b3d4140c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99148
> Commit-Queue: Teagan Strickland <sstrickl@google.com>
> Reviewed-by: Samir Jindel <sjindel@google.com>
TBR=sjindel@google.com,sstrickl@google.com
Change-Id: Idc8e8344adb026a308af20c8b0d0224edb891d9c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/36571
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109320
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
This change introduces two new pragmas:
* `@pragma('vm:never-inline')`
* `@pragma('vm:prefer-inline')`
These replaces the old way of specifying AlwaysInline or NeverInline
annotations when the (now removed) --enable-inlining-annotations flag
was used.
Bug: https://github.com/dart-lang/sdk/issues/36571
Change-Id: I2495c72819d94e43cefc837d4eb454b7b3d4140c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99148
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
Previously, core snapshot was generated from AST
(because --enable-interpreter/--use-bytecode-compiler was not specified
when building core snapshot).
As the result, CL
https://dart.googlesource.com/sdk/+/da8cb470cc94830a98d49532e8d5d1a5b3d80f8b
which declared libraries in bytecode also removed bytecode entirely from
core snapshot in Dart SDK.
This CL enables bytecode by default if --bytecode argument is
specified for gn.py. This enables JIT compiler from bytecode
(interpreter is still disabled by default but can be enabled
using --enable-interpreter). Core snapshot and other
snapshots now have bytecode.
This change revealed a bunch of bugs which are fixed in this CL:
* _Closure fields were treated as unboxing candidates which triggered
assertion in LoadFieldTOS in interpreter.
* Several places should load class declarations if they are not loaded yet.
* Canonicalization of TypeRef objects which are not fully initialized
may cause duplicate entries in the hash table of canonical
TypeArguments. This triggers assertions when hash table is rehashed.
The solution is to avoid canonicalization of non-root recursive types
and recursive type arguments. Also, TypeRef::Canonicalize and
TypeRef::Hash are reverted to assert and work only if type was set.
* Native wrapper classes are eagerly stamped as type-finalized
which caused assertion failures when reading their class declarations
from bytecode.
* When building flow graph for FFI trampolines kernel offset of library
(which is now declared in bytecode) was queried. Added special case
to Function::KernelDataProgramOffset().
* In interpreter-only mode with simulator (e.g. SIMARM64) if simulator
is not called before code is interrupted with stack overflow check,
simulator returns get_sp() = 0, which was treated as stack overflow.
* test standalone_2/io/platform_resolved_executable_test.dart
spawns sub-process but it didn't pass VM options.
Change-Id: I81bc4f1a4c6725cfa246a435ebe5d8abe43abc67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107199
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Towards #37318
- appJit has been replaced by appJitk and is no longer.
- precompiled has been replaced by dartkp and is no longer used.
- For the precompiled runtime, default to dartkp.
- Remove status file references to these compiler options and normalize
status files.
Change-Id: I48728db13dc84737092a92314e2f474a9309f4d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106942
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Also, standalone_2/causal_async_stack_test is updated to actually
test --causal_async_stacks after Dart 2 sync-async.
Change-Id: I28a7a281963828707461652f19494ff54bdd21c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106760
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
This makes it an actual Pub package like most other code inside the SDK
repo. The main goal is to make it easier to write tests for the test
runner itself.
This change:
- Moves all of the code from tools/testing/dart/ over to
pkg/test_runner. Most of it ends up under test_runner/lib/src.
- Move tools/testing/dart/main.dart to
pkg/test_runner/bin/test_runner.dart.
- Move standalone_2/io/test_runner_test.dart to
pkg/test_runner/test/test_runner_test.dart. I don't think it currently
works, but it wasn't being run in its old location either.
- Add test_runner to the analysis-server bot. This ensures the
test_runner package is static error clean.
- Remove standalone_2/io/test_runner_analyze_test.dart which used to
attempt to do the above and is no longer needed.
- Update test.py to look for the test runner at its new location.
- Add test_runner to the repo .packages file and remove the weird
test_dart pseudo-package. (I think this fixes #35279.)
- Remove status file entries for the removed standalone_2 tests.
There are no code changes to the test runner itself aside from fixing
up import paths.
Change-Id: I3d05d50d222b291848fa5a30de2846e803bc81e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105821
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Prior to this change, connection errors such as "Connection refused"
etc, are caught either by some error condition being detected by
the eventhandler thread and that error condition being propagated
to the Dart thread, or by the first read or write after a
"successful" connection failing with an error.
However, posix documentation for non-blocking sockets recommends
either checking getsockopt(SO_ERROR), or calling connect() a
second time following the first write event on a socket after
the first connect call returns EINPROGRESS.
On Fuchsia, this check is mandatory because errors like
"Connection refused" are neither signaled on the socket's
underlying OS handle, nor indicated by error returns from
read() and write().
This change adds the check, which is optional on other platforms,
but mandatory on Fuchsia, to the Dart socket connection loop
after the first write signal is asserted.
Change-Id: I8aeea4665913f79e8138bdd830676ae43066a959
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104263
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
Commit a9ad427 introduced a bug that assumed the cookie value was at least
one character, but the cookie value can also be empty.
RFC 6265 5.2 does not specify any special behavior for double quotes and as
such they should be considered part of the value. This change stops
stripping those double quotes and instead preserves them.
The io/http_cookie_test test was skipped because it was considered flaky.
This change dusts it off and tests the new behavior.
This change adds the exact offsets and source to the FormatExceptions to
help the caller understand why a malformed cookie was rejected.
Fixes https://github.com/dart-lang/sdk/issues/33327
Fixes https://github.com/dart-lang/sdk/issues/35804
Change-Id: I3479ba48be5763c485bd3ca5b5d2d86d283df971
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/91221
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: William Hesse <whesse@google.com>
* Remove all `&& $strong` clauses.
* Delete all sections that include a `&& !$strong` clause.
Change-Id: Idd32cf5623793e3f98e3e998025bac079d88e2f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102223
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Code collection interacts badly with
- warming up compiled code
- retaining pre-compiled code
- code coverage
- hot reload (deopting to an old version of a function)
Change-Id: Id269a6c3281e577d4f600f0c158af9e62f6b49ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99722
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
When tests are executed on certain configurations like dartkb or simarm,
the test script is first compiled into a dill file, so the VM command
line for running a test looks like
dart .../generated_compilations/dartkb/foo_test/out.dill
Certain tests have the logic to replace '_test.dart' in Platform.script
with '_test_body.dart' and execute the resulting script.
However, as out.dill does not contain '_test.dart', the script remains
the same after replacement. As a result, test was infinitely re-executing
itself, overloading bots and not making any progress.
Change-Id: I7257d3553a7f0a0de2f6d8218a9eb5c8981af17d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98685
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
The change was already reverted and I accidentally relanded this.
Change-Id: I62ff3367db7aaaf3a470727fdb587830a23fe53c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98566
Reviewed-by: Martin Kustermann <kustermann@google.com>
This is a reland of 49c94d3600
It appears that the major regressions were introduced not by the typed data unification
changes but rather by 3fd124db1f "[vm] Repair the resolver abstraction." which got
reverted in e979895efb "Revert "[vm] Repair the resolver abstraction."
Original change's description:
> Temporary revert of two changes which potentially caused performance regressions in Flutter.
>
> Revert "[vm] Re-number class ids for internal/external typed data and typed data views"
>
> This reverts commit a062221b76.
>
> Revert "[vm] Unify internal/external/view typed data into new RawTypedDataBase class"
>
> This reverts commit 94362f1af0.
>
> Change-Id: I7189c976aa86cdcf0a3802631bff754baf3ca2cc
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98521
> Reviewed-by: Ben Konyi <bkonyi@google.com>
Change-Id: I758775ccc426a02bce538d07ea04d9c67e8933d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98562
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Auto-Submit: Martin Kustermann <kustermann@google.com>
This reverts commit 49c94d3600.
Reason for revert: Relanding
Original change's description:
> Temporary revert of two changes which potentially caused performance regressions in Flutter.
>
> Revert "[vm] Re-number class ids for internal/external typed data and typed data views"
>
> This reverts commit a062221b76.
>
> Revert "[vm] Unify internal/external/view typed data into new RawTypedDataBase class"
>
> This reverts commit 94362f1af0.
>
> Change-Id: I7189c976aa86cdcf0a3802631bff754baf3ca2cc
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98521
> Reviewed-by: Ben Konyi <bkonyi@google.com>
TBR=bkonyi@google.com,asiva@google.com
Change-Id: I5c5be67fcec05434283153cb2592ba41afd1f41f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98505
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Revert "[vm] Re-number class ids for internal/external typed data and typed data views"
This reverts commit a062221b76.
Revert "[vm] Unify internal/external/view typed data into new RawTypedDataBase class"
This reverts commit 94362f1af0.
Change-Id: I7189c976aa86cdcf0a3802631bff754baf3ca2cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98521
Reviewed-by: Ben Konyi <bkonyi@google.com>
This moves the length field as well as an inner pointer to the start of
the data into the RawTypedDataBase class. The inner pointer is updated
on allocation, scavenges and old space compactions.
To avoid writing more assembly the typed data view factory constructors
will be generated using IL, which will update the inner pointer. This
required adding new IR instructions and changing the existing
UnboxedIntConverter instruction.
This is the foundation work to de-virtualize calls on the public typed
data types, e.g. Uint8List.
Issue https://github.com/dart-lang/sdk/issues/35154
Cq-Include-Trybots: luci.dart.try:vm-canary-linux-debug-try, vm-dartkb-linux-debug-x64-try, vm-dartkb-linux-release-x64-try, vm-kernel-asan-linux-release-x64-try, vm-kernel-checked-linux-release-x64-try, vm-kernel-linux-debug-ia32-try, vm-kernel-linux-debug-simdbc64-try, vm-kernel-linux-debug-x64-try, vm-kernel-linux-product-x64-try, vm-kernel-linux-release-ia32-try, vm-kernel-linux-release-simarm-try, vm-kernel-linux-release-simarm64-try, vm-kernel-linux-release-simdbc64-try, vm-kernel-linux-release-x64-try, vm-kernel-optcounter-threshold-linux-release-ia32-try, vm-kernel-optcounter-threshold-linux-release-x64-try, vm-kernel-precomp-android-release-arm-try, vm-kernel-precomp-bare-linux-release-simarm-try, vm-kernel-precomp-bare-linux-release-simarm64-try, vm-kernel-precomp-bare-linux-release-x64-try, vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-product-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-obfuscate-linux-release-x64-try, vm-kernel-precomp-win-release-simarm64-try, vm-kernel-precomp-win-release-x64-try, vm-kernel-reload-linux-debug-x64-try, vm-kernel-reload-linux-release-x64-try, vm-kernel-reload-rollback-linux-debug-x64-try, vm-kernel-reload-rollback-linux-release-x64-try, vm-kernel-win-debug-ia32-try, vm-kernel-win-debug-x64-try, vm-kernel-win-product-x64-try, vm-kernel-win-release-ia32-try, vm-kernel-win-release-x64-try
Change-Id: I1aab0dd93fa0f06a05299ab4cb019cf898b9e1ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97960
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
This change replaces kernel AST declarations of fields and functions
with bytecode declarations.
Size of dilp files is reduced by 11-12%.
Startup latency:
Time to the first full frame: 1.945s -> 1.687s
FinalizeClass: 554ms -> 277ms
FinishClassLoading: 296ms -> 156ms
There are following regressions in bytecode mode, which will be fixed
in future:
* dart:mirrors are not supported yet (implementation of mirrors relies
on reading kernel AST in certain cases).
As the result, lib_2/mirrors/* tests fail.
* native extensions are not supported yet (annotations on libraries
and classes in AST are cleaned up as they could reference members
which are now removed from AST).
As the result, standalone_2/entrypoints_verification_test test fails.
* language_2/spread_collections/const_error_test/* tests fail
due to https://github.com/dart-lang/sdk/issues/36286.
Change-Id: I5130f401fd7b84038b136136e7ccc1a6e51b6cea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97561
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
* Move FFI tests into a separate test suite.
They never belonged in standalone_2/ since they are not only available in
the standalone VM. Also, we want to have a separate status file.
* Add new "SharedObjects" option to test files to copy needed shared objects
to the Android device for testing.
* Add support to compiler/runtime_configuration.dart for testing JIT-mode on Android.
* Add new configurations and builders to test_matrix.json to test JIT-mode on Android.
* Clean up status file entries for FFI (we didn't need to special-case stress & subtype tests).
Change-Id: Ifb32ef7051754f477d00ecd7a0f9b19ca8a66eae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97334
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
When testing runs with certain set of VM options and tests launch
new Dart processes, VM options should be also forwarded to child
processes.
Change-Id: I7207fe87672cd61fd50d7ac77ef1da67744af183
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97169
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Most importantly, we move resolution of symbols in function_test to the toplevel
so the same function object is re-used on each invocation. This makes it possible to
tests repeated invocations with the optimization counter enabled.
Also added some comments and new tests.
Change-Id: I3772a1f15d1ad9924c8583112ddf3b1349fb6c09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96083
Reviewed-by: Daco Harkes <dacoharkes@google.com>
This reverts commit 7f812dea1a.
Reason for revert: Flutter build is broken on Golem.
Original change's description:
> [vm/ffi] Support Windows 64 bit
>
> Enables dart:ffi on Windows 64 bit.
>
> Note that function_stress_test.dart fails in two different ways, these are known bugs. https://github.com/dart-lang/sdk/issues/36138
>
> Closes: https://github.com/dart-lang/sdk/issues/35771
> Change-Id: I73012123f2bd90b737fdc1c87c9a9630c20d5660
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95647
> Commit-Queue: Daco Harkes <dacoharkes@google.com>
> Reviewed-by: Samir Jindel <sjindel@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
TBR=kustermann@google.com,sjindel@google.com,dacoharkes@google.com
Change-Id: I5be4538e3c99632a852e4dfb856248eb437fb3ea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96683
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
We will only run the tests on supported configurations. Issues are open
to expand coverage.
This reverts commit 1d3a0d5129.
Change-Id: I28d90f36a97914dc0cb04c39046cb4bdafe1740b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95023
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
This reverts commit b186a270e4.
Revert "[vm] Fix windows build after "[vm/ffi] Stress tests for FFI functions.""
This reverts commit 3dcc0c69a1.
Revert "[vm] Update status file for standalone_2/ffi/function_stress_test"
This reverts commit 9d609426b2.
Revert "[gardening] Skip ffi/negative_function_test on asan bot"
This reverts commit 223f407af5.
Reasons for revert:
1) timeouts on app-kernel-linux-debug-x64 bot when it
tries to deflake new tests.
2) crash dump archiving fails on vm-kernel-asan-linux-release-x64
when trying to archive crash dumps from these tests.
Issue: https://github.com/dart-lang/sdk/issues/36033
Issue: https://github.com/dart-lang/sdk/issues/36034
Change-Id: Ifa338fb96b490e8137a8aa6a4a62f4a6f9e6ea83
Reviewed-on: https://dart-review.googlesource.com/c/94963
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
This newly added test causes crash dump archiving to fail on
vm-kernel-asan-linux-release-x64 bot. This causes bot to fail
although the test failure was approved.
The test was added in b186a270e4.
Issue: https://github.com/dart-lang/sdk/issues/36033
Issue: https://github.com/dart-lang/sdk/issues/36034
Change-Id: I9ac201124db239d9c4bcce176c54e66cfdf1b54e
Reviewed-on: https://dart-review.googlesource.com/c/94961
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
This is a re-land of "[vm/extensions] Fix Loader::ReloadNativeExtensions(...)."
The native extension test was failing in hot-reload: this has been fixed.
Change-Id: Ic18da8cfbc6a3dba8aac09d654dce616487a67d7
Reviewed-on: https://dart-review.googlesource.com/c/92800
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Samir Jindel <sjindel@google.com>
Prototype for `dart:ffi` on Linux/MacOS x64 in JIT mode.
`dart:ffi` is experimental and its API is likely to change in the future.
Progress and design decisions are tracked in https://github.com/dart-lang/sdk/projects/13
issue: https://github.com/dart-lang/sdk/issues/34452
Change-Id: Ifa4566388e42c8757f154741d11e303465ef305d
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-mac-release-simarm64-try, vm-kernel-precomp-win-release-x64-try, vm-kernel-mac-debug-x64-try, vm-kernel-asan-linux-release-x64
Reviewed-on: https://dart-review.googlesource.com/c/80124
Reviewed-by: Samir Jindel <sjindel@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Two fixes:
- Make entrypoints_verification_test work on configurations where CFE compilation
is separate from execution.
- Add missing entry-point annotation for Windows.
The original revision is in patchset 1.
Change-Id: I6c4b52b1bae7bc730546dad6a3e31d8625f850b1
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-mac-release-simarm64-try, vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/90942
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Based off of these original changes:
https://codereview.chromium.org/2857393003
This is a breaking change and will require an annoucement stating such
before landing.
Fixes#29554.
Change-Id: Ibb56fd49648edc6b9fd567240a3bebb05a14234d
Reviewed-on: https://dart-review.googlesource.com/c/90120
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Support for the flutter runtime (sky_shell) was added to the Dart
test framework in the hope that one could run the flutter engine
through the Dart test suite. We never got around to running these
tests on the build bots, the sky_shell executable has been deprecated
and there are plans in the flutter engine team to have their own
unit test frame work.
See Issue https://github.com/flutter/flutter/issues/9115 for more
details.
Change-Id: I6ee9e8c919721dccecf4202ab0778939aeb79174
Reviewed-on: https://dart-review.googlesource.com/c/91103
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
This reverts commit 0203243381.
Reason for revert: breaking several bots
Original change's description:
> [vm] Prevent access to non-annotated members through native API.
>
> We will issue warnings and throw an API error when the native API is used to access members which were not appropriately
> annotated as entry-points, if the flag "--verify-entry-points" is passed.
>
> Also, fixes Class::Invoke against fields (isn't allowed through native API but
> could be allowed with mirrors, and is inconsistent with Library::Invoke behavior).
>
> I've checked locally that this would have caught the bug in
> "Wrap the user entrypoint function in a zone with native exception callback. (#7512)".
>
> Change-Id: I617c71e1965457c956c97761359765bb9bb18c1c
> 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-mac-release-simarm64-try, vm-kernel-precomp-win-release-x64-try
> Reviewed-on: https://dart-review.googlesource.com/c/90060
> Commit-Queue: Samir Jindel <sjindel@google.com>
> Reviewed-by: Alexander Markov <alexmarkov@google.com>
TBR=alexmarkov@google.com,sjindel@google.com
Change-Id: I554b389780e4ba652183c044b040b0c524beb5c2
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-mac-release-simarm64-try, vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/90841
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
We will issue warnings and throw an API error when the native API is used to access members which were not appropriately
annotated as entry-points, if the flag "--verify-entry-points" is passed.
Also, fixes Class::Invoke against fields (isn't allowed through native API but
could be allowed with mirrors, and is inconsistent with Library::Invoke behavior).
I've checked locally that this would have caught the bug in
"Wrap the user entrypoint function in a zone with native exception callback. (#7512)".
Change-Id: I617c71e1965457c956c97761359765bb9bb18c1c
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-mac-release-simarm64-try, vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/90060
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: 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>
This will make the new bare instructions bot green. (The test is not passing
the right flag to sub-processes)
Change-Id: I00bbc30e157d742e4eadfee3ba2cd4bd38f4ebee
Reviewed-on: https://dart-review.googlesource.com/c/87585
Reviewed-by: Martin Kustermann <kustermann@google.com>
This is the final CL which adds a new --use-bare-instructions flag to
the VM.
If this flag is set during AOT compilation, we will:
* Build one global object pool (abbr: GOP) which all code objects
share. This gop will be stored in the object store. The PP register
is populated in the enter dart stub and it is restored when
returning from native calls.
* Gets rid of the CODE_REG/PP slots from the dart frames. Instead the
compiled code uses the global object pool, which is always in PP.
* Starts emitting pc-relative calls for calls between two dart
functions or when invoking a stub.
Limitation: We only emit pc-relative calls between two code objects
in the same isolate (this is because the image writer is writing
instruction objects for vm-isolate/main-isolate seperately)
* We do compile-time relocation of those static calls after the
precompiler has finished its work, but before writing the snapshot.
This patches all the instruction objects with pc-relative calls to
have the right .text distance.
* We emit a sorted list of code objects in ObjectStore::reverse_code_table,
which will be used by the AOT runtime to go back from PC to Code
objects (where all metadata, e.g. stack maps, catch entry moves, pc
descriptors are available).
Issue https://github.com/dart-lang/sdk/issues/33274
Change-Id: I6c5dd2b1571e3a889b27e804a24c2986c71e03b6
Reviewed-on: https://dart-review.googlesource.com/c/85769
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Rewrite the test to use async/await and fix Dart 2 typing issues in it.
Change-Id: If071ffbf05443d66220897d30835d9499e248d3c
Reviewed-on: https://dart-review.googlesource.com/c/86927
Auto-Submit: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
This test checks that we should not be able to connect to server
listening on IPv4 via IPv6 and vice versa.
However by chance some other test might start listening on the same
port as this test is using, just using different protocol. In this
case the test will fail.
To make this test more robust we add a check which verifies that
server did not actually see the connection from the client with a
matching port (we compare client's port to remotePort that server saw).
After these changes we only should fail this test if we indeed managed
to connect to the loopback server using a mismatching protocol.
Fixes https://github.com/dart-lang/sdk/issues/30700
Change-Id: Ib4f3d0346030dcffaac44ff5dd4050939984b1fc
Reviewed-on: https://dart-review.googlesource.com/c/85389
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
I added these when we were maintaining the .status files with a script at the
time strong-mode was being implemented in the CFE. The comments are no longer
relevant.
TBR=paulberry@google.com
Change-Id: I3d37da32cd611731e3e0d91a5aa751fa550cc179
Reviewed-on: https://dart-review.googlesource.com/c/85408
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Locally it passes in 10s but on Mac bots they take 40s or more and sometimes
timeout.
Change-Id: I0a531aebe46d6526a1f3c2ee598c72f22fc5e25f
Reviewed-on: https://dart-review.googlesource.com/c/85342
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
If interpreter is enabled and a function has bytecode, then its entry
point should be set to 'interpreter call' instead of 'lazy compile'
when clearing code.
Fixes https://github.com/dart-lang/sdk/issues/35128
Change-Id: Ie714ac9c4d1ffef181512c5785c374e9de22ab95
Reviewed-on: https://dart-review.googlesource.com/c/84180
Commit-Queue: Régis Crelier <regis@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
call for setsockopt on Windows machines.
collapse if block
move raw_datagram_socket_test to standalone_2
update test, check for success
fix windows
Fix bug in TTL logic for IPv6
Change-Id: I7940e2e1a3c355ebef752f951464e5ade96d2153
Reviewed-on: https://dart-review.googlesource.com/c/83360
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
This reverts commit ffe2116c27.
Reason for revert: Windows test failures on the bots.
Original change's description:
> Fix bug in TTL logic for IPv6
>
> This was introduced by my previous CL - there is existing logic to set
> the TTL for multicast that works for IPv4 and IPv6, this patch ensures
> the correct call is made.
>
> Change-Id: I8db7325ca79eb38c9de6d6e431231ed2ec1b0f47
> Reviewed-on: https://dart-review.googlesource.com/c/82023
> Reviewed-by: Zach Anderson <zra@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Zach Anderson <zra@google.com>
TBR=zra@google.com,asiva@google.com,dnfield@google.com
Change-Id: I06abb9f1aac638ab31541d66b55a3f5a29b0e5a9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/82885
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
This was introduced by my previous CL - there is existing logic to set
the TTL for multicast that works for IPv4 and IPv6, this patch ensures
the correct call is made.
Change-Id: I8db7325ca79eb38c9de6d6e431231ed2ec1b0f47
Reviewed-on: https://dart-review.googlesource.com/c/82023
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
It was giving the child 4 to 34 seconds to finish, which might not
be enough in some of our configurations (e.g. SIMDBC), where
we include Dart to Kernel compilation time into the test.
We increase the slack to 60 seconds.
Change-Id: I3ea5a78debd60d1bcbbff9924f3671487fbd93f3
Reviewed-on: https://dart-review.googlesource.com/c/81820
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Auto-Submit: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
One of the subtests were not awaiting the future.
Change-Id: Ia9a43d2ba14412c3f95fd8693cc547500ce787b2
Reviewed-on: https://dart-review.googlesource.com/c/81602
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
Auto-Submit: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
This fixes remaining tests that started failing after Crashpad integration
because they spawn Dart processes in different working directories and
those processes can't find Crashpad hanlder unless we use absolute path.
Revert "[gardening] Temporary mark two standalone_2 io tests as failing"
Change-Id: I2951396a02bbec56c30e7a40b0ba34722928f9a1
Reviewed-on: https://dart-review.googlesource.com/c/81600
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
Auto-Submit: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
They started failing after Crashpad was enabled on Windows and require
additional investigation.
To make bots cycle green we for now mark them as failing.
TBR=kustermann@google.com
Change-Id: I53dd86ce9bc30390202ee428657ea12f038cbc6f
Reviewed-on: https://dart-review.googlesource.com/c/81419
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Two of the tests can fail with RuntimeError because a SocketException is thrown.
(SocketException: OS Error: Operation timed out, errno = 60, address = localhost, port = 50108)
Change-Id: Ib3f5e63b30dd11b663d9969d5bd32daa4ef93603
Reviewed-on: https://dart-review.googlesource.com/c/80447
Auto-Submit: Samir Jindel <sjindel@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
This deletes:
tests/co19
tests/corelib
tests/html
tests/isolate
tests/language
tests/lib
It does not delete tests/standalone because apparently there are tests
in there that are not in standalone_2. (I assume they were added after
the test migration. I don't know why they were added there.)
I have tried to remove references to the old tests from various scripts
and tools but may have missed some. (As you can imagine, grepping for
"lib" does not have the best signal-to-noise ratio.)
"It was a pleasure to burn. It was a special pleasure to see things
eaten, to see things blackened and changed. With the brass nozzle in his
fists, with this great python spitting its venomous kerosene upon the
world, the blood pounded in his head, and his hands were the hands of
some amazing conductor playing all the symphonies of blazing and burning
to bring down the tatters and charcoal ruins of history."
- Ray Bradbury, Fahrenheit 451
Change-Id: If3db4a50e7a5ee25aff8058b1483e2ce8e68424e
Reviewed-on: https://dart-review.googlesource.com/c/75420
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Terry Lucas <terry@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Also, enable dropping ASTs from kernel files when testing in dartkb mode.
Change-Id: Iec82f1b76e3b8a9eb692de325d7645d8f271e03e
Reviewed-on: https://dart-review.googlesource.com/c/79087
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
In certain cases interpreter was calling runtime while keeping
direct references to Dart objects across call. Runtime call may trigger
GC which moves objects, making direct references stale.
The fix is to reload all direct references to Dart objects after
each runtime call.
Change-Id: Icca3d203047eea317eb5389fd91b33f9c1a98a6c
Reviewed-on: https://dart-review.googlesource.com/c/78868
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
If these intrinsics are called from interpreter and return garbage,
the interpreter might crash in Interpreter::InvokeCompiled while
inspecting the result.
Also, this CL contains a fix for the slow path of Int64 box
allocation in the interpreter.
Change-Id: I27143d38ed39fdc234520c57e85bff066cc8cde3
Reviewed-on: https://dart-review.googlesource.com/c/78187
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Several tests crashed sporadically as bytecode Code object was not
properly scanned by GC.
Change-Id: I4810c46552a9f1990f1304f7c502b3408df8ed88
Reviewed-on: https://dart-review.googlesource.com/c/78141
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Change-Id: I99881b9136a62ffb9eff184347532c807096b488
Reviewed-on: https://dart-review.googlesource.com/c/77943
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
- Remove all code that generates the corelib and dart:io library sources into C++ arrays and link them into dart_bootstrap
- Remove the executable dart_bootstrap and all uses of it
- Remove bootstrap_nolib.cc and builtin_nocore.cc
- Remove the Dart 1 code in core lib bootstrap path
Change-Id: Ifd33496204285a08b42fe09e39428e7a92b416b6
Reviewed-on: https://dart-review.googlesource.com/c/77241
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Make sure we compare what we read from stderr against what we sent to stdin.
Change-Id: If01aef803511f862eb3bb404af512067c04a5dc7
Reviewed-on: https://dart-review.googlesource.com/76743
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
- option --no-preview-dart-2 will now result in an error
- change aot-assembly build rule to generate AOT snapshot using Dart 2
- generate coresnapshot using Dart 2 (this snapshot is not used yet, next CL which switch the isolate create code to use this snapshot)
- by pass all Dart1 test runs in the status file
- change the default compiler setting in test.py to use dartk
- have test.py not pick up any configuration for --no-preview-dart-2
Change-Id: Ia136943ebfd0fed0c52683b330745b3e2c7a7ce6
Reviewed-on: https://dart-review.googlesource.com/75820
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
If a field is initialized with null (either explicitly or implicitly),
field store can be omitted in bytecode. In such case, bytecode should
still convey the information about this initialization to VM for
field guards to work correctly.
Change-Id: I1fd45b858c3c521b97fa5dbffe0e15b1ea75d92f
Reviewed-on: https://dart-review.googlesource.com/76060
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Fall back to parallel marking
- on IA32 (barrier unimplemented)
- when write_protect_code is enabled (protection dependency on marking state unimplemented)
Bug: https://github.com/dart-lang/sdk/issues/34002
Change-Id: If093f24e4dc6bf29f407cc45e95bb2274fc53dcf
Reviewed-on: https://dart-review.googlesource.com/71389
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@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>
Tested with imports through current directory, VM binary directory,
and LD_LIBRARY_PATH. This also restores the Dart 1 behavior of not supporting
relative extension paths.
Change-Id: I090bf8592fef74d4ccde40e6f550baa84c98e3bc
Reviewed-on: https://dart-review.googlesource.com/69162
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Samir Jindel <sjindel@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>
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>
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 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>
Change-Id: Ic3d18aed72c572fe07bbd2a98b85431a0a143019
Reviewed-on: https://dart-review.googlesource.com/65505
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
This CL adds support to build.py and test.py for building/testing
a VM with the interpreter on x64, e.g.:
$ ./tools/gn.py -m release -a x64 --bytecode
$ ./tools/build.py -m release -a x64 --bytecode runtime
$ ./tools/test.py -m release -a x64 -r vm -c dartkb language_2
Change-Id: I956d23790636609d4a2e71129481fcbd7afef9a0
Reviewed-on: https://dart-review.googlesource.com/65206
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Rationale:
Improves the analysis if instance calls need checks
(check class or check null) combined with CHA.
Bug: https://github.com/dart-lang/sdk/issues/33664
Change-Id: I0a4761f8816bf5a5aaf5d17ca56d8bf4e3b79fc3
Reviewed-on: https://dart-review.googlesource.com/64440
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
server is started.
When the incremental compiler is used it accumulates state that
increases the footprint of the process. This state is needed only
when the 'reload' or 'expression evaluation' functionality is used
in the debugger.
Currently in the VM we do not have a good way of detecting when the
debugger will be used as the vm service observatory functionality
can be turned on dynamically after the program has started.
This CL turns on the incremental compiler only when command line options
are used to start the observatory server. We could run into issues with
'expression evaluation' when the observatory is started dynamically after
the program is loaded.
Change-Id: I18c17698622071bca428018f7fdac1a84b0f195e
Reviewed-on: https://dart-review.googlesource.com/64667
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Remove accidental legacy test section from front_end bots.
Remove no-op --strong arg from test matrix.
Change-Id: Icafc7eeb3c25f5816596affeaf8f75a7328fb907
Reviewed-on: https://dart-review.googlesource.com/64520
Reviewed-by: Jonas Termansen <sortie@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>
Revert "[gardening] Update arm64 status files."
This reverts commit ff0a1d6b67 as
updating multiplier is better solution than updating status files.
Bug: http://dartbug.com/33659
Change-Id: I064964e1fafe9c77fb24d5e9c324927b75cbacb0
Reviewed-on: https://dart-review.googlesource.com/63340
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
Rationale:
This CL finalizes recent improvements by allowing
inlining 64-bit and double getter/setter operations.
The runtime over all data types (with and without
view) now no longer has outliers.
Note:
64-bit targets only, 32-bit targets still tbd.
Performance:
About 4x improvement on micro benchmarks.
https://github.com/dart-lang/sdk/issues/33205
Change-Id: Ic82fa24167a68e3c196edf4843f0829c7fbcf9e1
Reviewed-on: https://dart-review.googlesource.com/60451
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@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>
Issue 33519 causing bots to go purple due to temp files not being cleaned
up properly.
Change-Id: I772e698da36d5672e545ca12118274cb618e90ce
Reviewed-on: https://dart-review.googlesource.com/62322
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>