This prepares for returning more that just the component from an
incremental compilation.
TEST=existing
Change-Id: I3ee269083290097f1a92d77d105b607a6a02f1f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221086
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
This is the test from the attempt to allow overlapping edits to be
merged. That work broke some other tests, but I want to record both the
current and ideal behaviors in case I can't get back to fixing it.
Change-Id: Ib41afc37463957ebd710e65847512f91fe47a0f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221180
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Add dependency on unsound platform files.
This should fix the following flaky CQ failure:
FAILED: dev_compiler/build/web/dart_stack_trace_mapper.js
Error: Input file not found: dart2js_platform_unsound.dill.
...
Compilation action tries to read the unsound version of the platform,
but the GN template only specifies the dependency on the sound platform
making build non-hermetic.
Change-Id: If13431b1682e35a419cb6865c38e2b69348751f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221084
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Every AOT user out there has been using bare instructions mode
and continuing to maintaining non-bare instructions mode simply
adds costs (both in terms of time spent making changes to work
in a mode that is not used and CI resources spent on testing it).
This change removes FLAG_use_bare_instructions and changes the code
to assume that FLAG_precompiled_mode implies bare instructions.
TEST=ci
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,app-kernel-linux-release-x64-try,app-kernel-linux-debug-x64-try
Change-Id: I5032b13bfcb613f79865f2cfa139cca8d1b42556
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220964
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Service responses and events previously could include "private"
properties, which have names starting with "_". This change removes
these properties from service objects unless explicitly requested via a
private parameter.
See go/smaller-dart-vm-service-responses for response size reduction
data.
TEST=Existing service suite
Change-Id: Ia65b14872e798eaa843f7d180c57721b82371d0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221143
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
HNullCheck is inserted before HGetLength when the receiver might be null.
This makes HGetLength and HFieldGet use the same pattern.
HNullCheck supports strengthening of dominated uses, which allows
specialization of string and array interceptors, leading to better code
in some cases. An example improvement is:
if (aLocale.length < 2)
return aLocale;
return J.substring$2$s(aLocale, 0, 2).toLowerCase();
-->
if (aLocale.length < 2)
return aLocale;
return B.JSString_methods.substring$2(aLocale, 0, 2).toLowerCase();
Here `aLocale` has the type String*, and the explicit null check before
`aLocale.length` strengthens the receiver at the call to `substring`.
There is very little code size change.
The inconsistency between the handling of HFieldGet and HGetlength came
to light when investigating an unexpected difference in Uri.parse between two
apps.
Change-Id: I6e76de2070ab2c0058a109896c738ea2a09b322a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221028
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
This CL moves the computation of macro declaration data and the
required compilation sequence for macro compilation early in the
outline building phase by performing computation fully in terms
of builders.
Change-Id: I61a566f0aed661767a47579bca4d5931e4a4df9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220771
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
This CL moves the computation of the need compilation sequence from
macro_test to the source loader. The compilation sequence is
computed late in the outline phase and needs to be moved early to
ensure a performant compilation with macros.
Change-Id: I639aae28d3abeab57aeffeea390a85be271bf259
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220770
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
This CL adds a test for the minimal sequence of compilation steps
that need to be performed to compile the test while ensuring that
macro declarations are compiled before any application.
Change-Id: Icd6b9140e60d35d2b2b034c16e0807262f971418
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220768
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
This fixes the completion issue when I run on my desktop with
internal repo.
Change-Id: I4efc137d96c486cc8c9d139cd372ee0df262d057
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221029
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
I still don't know why it happens.
But there might be something else as well, as users complaining
about the server not responsive. And one suspect is this infinite
cycle that I added. I thought it is safe, but something is wrong,
and it could be it.
Change-Id: I6095e1493c4cc49e6a5540bf30d244747c36641c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221023
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
The test is still failing because there is an issue with parsing.
Change-Id: I2cab385ce5be68713b2b27d10fc52f662df7e211
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220885
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This CL moves the computation of macro declarations/applications
from macro_test to KernelTarget.buildOutline. Initially these are
computed as late in the phase as is convenient. Later these
computations are intended to be moved as early as possible to ensure
a performant implementation of macros.
Change-Id: Ia2255937eba8d87b6ca8f3f03d13960206f176d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220765
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
This test mimics the macro builder system currently in development
and tests declared and applied macros can be recognized through the
generated AST.
Change-Id: Ide47def2b6044d74051a090879f49ba4a3c8d201
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220763
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Previously, if a test timed out and the `tearDown` callback was invoked
to cleanup the temporary project, we would try and cleanup the temporary
directory even if the subprocess hadn't exited. This works fine on most
platforms, but causes an exception to be thrown on Windows as the
subprocess still holds a handle to the temporary directory. Ensuring the
subprocess is killed before deleting the temporary directory will
prevent us from encountering errors on cleanup on Windows.
Fixes https://github.com/dart-lang/sdk/issues/47700
Change-Id: I71599908c31a1b32afed15c1388d228618462506
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220641
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
We almost can remove it.
Unfortunately surveyor/lib/src/analysis.dart uses it, so we need to
update it first.
Change-Id: I239d24506f99183147bf45744a6f8d66d3eb4f94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220826
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
In addition to the underlying type (stored as either a cid or an
AbstractType), CompileTypes also store two flags: whether a value of the
type can be null and whether it can be a sentinel.
When constraining the type of a definition via a RedefinitionInstr, the
resulting type should be nullable only if both the original and
constrained type are. Similarly, the resulting type should only allow
the sentinel value if both the original and constrained type do.
When the underlying type is represented by a cid, this was already
the case. When it is represented by an AbstractType, only nullability
was appropriately handled. This CL fixes it so that the possibility of
being a sentinel is also handled correctly in the latter case.
TEST=vm/cc/TypePropagator_RedefineCanBeSentinelWithCannotBe
Bug: https://github.com/dart-lang/sdk/issues/47739
Change-Id: I9d51b1c14ff385d522309f9c984a25dc6bdfbbf4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220767
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
This change makes the error message consistent with a similar
message in sdk/lib/_internal/vm/bin/vmservice_server.dart.
Before:
Could not start Observatory HTTP server
After:
Could not start Observatory HTTP server:
Invalid argument(s): A directory corresponding to fileSystemPath "/.../out/DebugX64/devtools" could not be found
#0 createStaticHandler (package:shelf_static/src/static_handler.dart:50:5)
[...]
Change-Id: Ie42d39d8c009b4ea403e1584a524567b3da20a45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220742
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
Makes runtime/include/** respect -Wstrict-prototypes.
Closes: https://github.com/dart-lang/sdk/issues/47729
TEST=ci (FFI has tests that build against the API).
TEST=manually verified in Xcode we have no more warnings.
Change-Id: I035640ae93e942946f5171dd30776b072a235990
Cq-Include-Trybots: luci.dart.try:dart-sdk-linux-try,dart-sdk-mac-try,vm-kernel-gcc-linux-try,vm-kernel-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220761
Reviewed-by: Slava Egorov <vegorov@google.com>
* Change SCREAMING_SNAKE to camelCase
* Make `late final` fields `final` where possible
* Turn a getter into a memoized late field
* Delete outdated comments which no longer provide value
Change-Id: I789eb52c553e126ccf058252ff5ff1730f436b38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220805
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>