Three improvements to the generated compile_commands.json on Windows.
1. Prevent the use of .rsp files by using `ninja -t compdb -x`.
Start using the ninja from DEPS that supports the `-x` flag.
2. Remove the `ninja -t msvc` part of the the build commands. Clangd
does not understand it.
3. Add the windows sysroots (which are set with `-e environment.x64`
in the build).
Currently, these are hardcoded to the ones shipped in depot_tools
because the `environment.x64` is non-trivial to parse.
Bug: https://github.com/dart-lang/sdk/issues/50032
Change-Id: I897ded9e7c97abdf4dde738c275db36536e0b0c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260701
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Makes it clear that the original future can still complete,
it's just the new future which doesn't wait for it any longer.
Fixes#42318
Bug: http://dartbug.com/42318
Change-Id: I16c25e4e4588d444bd99796d25bdb92bea1467f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260582
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Lasse Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
"vm_common" set of core libraries is shared between various Dart VM
embedders: standalone VM, Flutter, Fuchsia Dart runner and Fuchsia
Flutter runner.
This change would simplify future changes of core library patch
files and will remove the need for additional changes in Flutter
engine when patch file is added or removed.
TEST=ci
Change-Id: Id9fb9dc369504fd4d7dab44de3799dbef594b12d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260900
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This reverts commit 959854769c.
Reason for revert: This CL appears to cause some performance regressions in Flutter hot reload, please see https://github.com/flutter/flutter/issues/112177
In addition the recently added benchmark IntegerSetLookup.DefaultHashSet also shows regressions.
Original change's description:
> [VM/Library] - Adjust next probe to be a quadratic probe in _HashBase
>
> Adjust next probe to a quadratic probe so that it matches up with the internal VM hash map implementation.This avoids some issues with hash code clustering and uses the probing strategy in the VM's HashTable.
>
> Change-Id: I6af560b971c2e6fa745e3b3414e2d8a9075e7ff5
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239004
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I27955a4eb239cf9afcbd40989d570467b9eea063
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260747
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
I ran into an "unknown" root when trying to debug something, turned
out to be via frames. This CL marks the root as such.
TEST=Existing tests.
Change-Id: I48f1176d036f5b888e88a5fc8b3796af8d86f301
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260880
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reproduction of https://github.com/dart-lang/sdk/issues/49968
in that we upon recompilation (of another library) include a reference
to a constructor in a library which we do not include.
Change-Id: I6f0e0b44b95ccf4d059a7641cdc8f97dc5f6e451
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260542
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Currently the HeapSnapshotGraph represents the objects in the Dart VM
heap and how they relate to each other. They effectively form a directed
graph with a specific root node.
The API does allow traversing the graph by following an object's
outgoing references.
Though in certain situations it can be very useful to know the set of
objects referencing a given object (i.e. incoming references).
This CL adds such support, thereby allowing traversing edges in both
directions: Finding what an object references and who references an
object.
When loading a snapshot we therefore have to also compute the reverse
edges and store them. To offset any additional computation time and
memory consumption, we optimize the existing implementation by not using
growable List<int> objects for outgoing edges but rather typed-data
views into the existing Uint32List of edges.
Due to this optimization we make loading of snapshot faster and smaller,
in a simple benchmark we seem to get:
* JIT: 10% faster, 40% less RAM
* AOT: 30% faster, 40% less RAM
despite the additional compute & data structures of this API.
TEST=vm/dart{,_2}/heap_snapshot_referencees_test
Change-Id: Ief30bfb58c70364744eeb7f69967dd1f72ece807
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260524
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
This CL introduces a new kernel-to-kernel pass in Wasm backend to
compile `FfiNative`-annotated external functions to external functions
with `wasm:import` pragmas.
The new pass `WasmFfiNativeTransformer` extends `FfiNativeTransformer`.
Some `FfiNativeTransformer` methods made public to allow reuse in the
pass.
The conversion works like this: when we see a member like:
@FfiNative<Int8 Function(Int8, Int8)>("ffi.addInt8")
external int addInt8(int a, int b);
We generate a Wasm import using Wasm ABI types according to emscripten
calling conventions:
@pragma('wasm:import', 'ffi.addInt8')
external static WasmI32 addInt8_$import(WasmI32 a, WasmI32 b);
and convert the original member (`addInt8()`) to a wrapper function that
calls the Wasm import, converting the arguments and return values to
Dart types:
static int addInt8(int a, int b) {
return WasmI32.toIntSigned(
addInt8_$import(
WasmI32::int8FromInt(a),
WasmI32::int8FromInt(b),
));
}
Build, test, and CI changes:
- Test runner now uses `// SharedObjects=...` lines in dart2wasm tests
to pass extra Wasm modules to d8 command used to run the tests.
Support for `// SharedObjects=...` lines were already used in
native/AOT FFI tests, not added in this CL. We just start to use those
lines in dart2wasm tests.
- dart2wasm gn file updated with a target "test_wasm_modules" that
builds FFI test Wasm modules to Wasm using emcc (emscripten C
compiler).
- CI dart2wasm_hostasserts configuration updated to copy the Wasm files
generated by the "test_wasm_modules" target to the shards.
TEST=tests/web/wasm/ffi_native_test
Change-Id: I6527fe4e2ca2b582e16d84fee244e9cbe6dee307
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252822
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
This reapplies f740b500e2
The change is not that different from the original, except that a
few changes have landed in between to address the failure
encountered by the SDK roll last time. Namely, the map lookup on
`resolvedUri` is normalized, so that the lookup will always match
how the store operation is done, and hence will succeed when copying
cache entries between resolvedUri and uri (see also
https://dart-review.googlesource.com/c/sdk/+/250440).
Change-Id: Ic3ad778a3e9ea465b515de9800f296c71683970c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260081
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
!!! NOTE to Google3 rollers:
If this change causes test failures in google3 you can temporarily
set `null_safety_asserts = False` on the failing
`dart_browser_binary` targets until we can fix the mistyped code.
That should allow the test to pass with this change.
Of course feel free to revert this change again if the number of
failures is too high.
Re-land previously reverted change:
https://dart-review.googlesource.com/c/sdk/+/258780
Adds additional tests and more checks to ensure assertions are only
added in libraries that have been migrated to null safety.
Issue: https://github.com/dart-lang/sdk/issues/49918
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259120
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Change-Id: Idcab0fe49a8dd98cdd73192eabae4439aebe2013
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260070
Patterns may need to be visited twice during analysis: once to
determine a type schema, and a second type to resolve the pattern
match. Previously, the shared TypeAnalyzer had just a single
`dispatchPattern` method, so it had to create temporary objects to
record the structure of the patterns between the two visits. Now,
there are two dispatch methods: `dispatchPatternSchema` and
`dispatchPattern`. This avoids the creation of a bunch of temporary
objects and makes the design much simpler.
(Based on an idea from Brian Wilkerson)
Change-Id: If10b6b7fb578594c3f660baa55d7e28123652638
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260282
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This version bump was intended to happen as part of
https://dart-review.googlesource.com/c/sdk/+/260500, but it looks like
it got lost in the rebase between patchsets 3 and 4.
Change-Id: I382da03694e60809e137b676c8c99ce5019ff198
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260740
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This change fixes the following build errors when building Dart VM with
gcc:
../../runtime/vm/compiler/assembler/assembler_arm64.h: In member function ‘uint32_t dart::compiler::Address::encoding(dart::compiler::OperandSize) const’:
../../runtime/vm/compiler/assembler/assembler_arm64.h:355:3: error: control reaches end of non-void function [-Werror=return-type]
355 | }
../../runtime/vm/compiler/assembler/assembler_arm64.cc: In member function ‘void dart::compiler::Assembler::PopNativeCalleeSavedRegisters()’:
../../runtime/vm/compiler/assembler/assembler_arm64.cc:2380:52: error: bitwise comparison always evaluates to false [-Werror=tautological-compare]
2380 | bool pop_single = (kAbiPreservedFpuRegCount & 1) == 1;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~ ~
../../runtime/vm/compiler/assembler/assembler_arm64.cc:2400:47: error: bitwise comparison always evaluates to false [-Werror=tautological-compare]
2400 | pop_single = (kAbiPreservedCpuRegCount & 1) == 1;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~ ~
TEST=ci
Change-Id: Ib44790dbe99288f569a26e4df28f61ef2aa40ea3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260640
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This is needed for CFE integration of field type promotion, since it
allows the CFE to call propertyGet in circumstances where there's no
expression corresponding to the property get, such as during an
invocation of a field that's been parsed as a method call.
Change-Id: I1856705c080315e87e283af217be331021ef8aee
Bug: https://github.com/dart-lang/language/issues/2020
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260452
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
+ split large annotations test up
Change-Id: I5071f4310ea3bf784e40ae1bcd1f9e497551e912
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>