The string hash field is expected to be initialized to 0 instead of null. On 64-bit targets, the string hash is in the header instead of a regular field.
TEST=local, fuzzer
Change-Id: Icaf7a32d90a3d57da37b4f1a28643ee34da44091
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237760
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
* Make `MicroContextObjects` constructor private, which is not used
outside the library.
* Remove unused `analysisContext2` constructor parameter.
* Make `tryMatchSubtypeOf` private, which requires a parameter of
private type.
* Make `_FileStateFiles` public, as it is used outside the library.
* Return empty for void-typed functions.
Change-Id: If67a69effdbbaed2eb364788e52eeb60270a0c19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237855
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
No functional change. This is a minor readability improvement that
I'd like to put in place before doing more work on language issue #731
(Inference should flow information between arguments in a generic
function call).
Bug: https://github.com/dart-lang/language/issues/731
Change-Id: Ia25540cd80762a74ac0d0a4d226a51eda7e09a4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237920
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This reverts commit eb95543629.
Revert "Add the macro unit into 'units' of LibraryBuilder."
This reverts commit 2670218aea.
Change-Id: I7d4964264b8be92cfa98334fde0579eeb989c94b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237960
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Also remove unused functions from dart::bin::Thread.
TEST=ci, cbuild
Change-Id: I670dbf2767662156607cbfbee4c3ba64f1ba7ab1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237765
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Calling "SpecialCasedBinaryOperator" and "SpecialCasedTernaryOperator"
with wrong number of parameters (especially too few) would not go well.
It's now checked and goes a lot better.
Change-Id: Id9606db869f020bbd7264686adaf9521bd263fb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237900
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
We also mark the test as slow, since it does many subprocess runs.
This seems to fix debug-x64 runs of this test.
TEST=ci
Change-Id: I98f4ac5810e6241ec08dd523747325c8669560ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237689
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
This CL allows the incremental compiler to pass a benchmarker and
perform benchmarking in the same way as is possible via `fasta compile`.
It's enabled by setting an environment variable, on linux this can be
done with
```
export DART_CFE_ENABLE_INCREMENTAL_COMPILER_BENCHMARKING=true
```
on Windows it would likely be something like
```
set DART_CFE_ENABLE_INCREMENTAL_COMPILER_BENCHMARKING=true
```
When set, benchmarking data is recorded and after a `computeDelta`
call the recorded data is printed.
Currently, visualization via the html document requires wrapping of
the output between
```
{"benchmarkers": [
```
and
```
]}
```
Change-Id: I78f1298ebc17c47a172abdf00c48dac388197d3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237693
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Using a trusted type policy for the script elements injected to load
deferred libraries allows a content security policy to be enabled to
prevent untrusted scripts elements from loading code.
TEST=https://dart-review.googlesource.com/c/sdk/+/237638
Change-Id: Ie3505a68d83cb19c7f8bdbefa01df7fc58d9924a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237542
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
* Remove CondtitionalModification; unused.
* Prefer string interpolation
* Prefer for-in over forEach
* Don't expose private types in public API
* A few other small ones
Change-Id: I14b4f1a957907338ae62b5fa980ecb5c1b240496
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237845
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
So, we should resolve references, types in it.
Not tested yet.
Change-Id: I5264d9b9b8dbb6e05188a2dad961fcd7b87cfc98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237841
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This ensures that the `index.html` file (which determines whether to
load the new service worker and therefore invalidate the cache) will
always be fresh.
Bug: https://github.com/flutter/devtools/issues/3896
Change-Id: Ib0b6adda66b7dd926f57724f21c2a7c6284bce60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237842
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Elliott Brooks <elliottbrooks@google.com>
Optional arguments (positional and named) in @FfiNative
annotations are not meaningful, and should result in a
compile-time error.
TEST=tests/ffi/ffi_native_test.dart
Bug: https://github.com/dart-lang/sdk/issues/47169
Change-Id: I8896e6a43f9399b537e6ee7c7a0e2857a370203f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232622
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
The very first version, many improvements to be done later.
Change-Id: If78efba1ab0d06aaea6f3c7525fcd00a39c18459
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237768
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This change fixes a bug in the IA32 FG Moves, where any moves
of Int8 and Uint8 from a register other than the first four general
purpose registers would be bogus.
The moves would generate to move the second byte of the first four
GP registers because the other four registers do not have byte
registers.
This change also fixes an issue where X64 byte register moves would
generate incorrect bytecode for otherwise correct instruction prints.
It would for instance print "movb [rsp],rdi", but emit "movb [rsp],bh".
This change also fixes a bug in NativeFpuRegistersLocation::Equals
that cause different FPU regs. to compare equal despite being different
kinds.
This in turn caused moves between these different regs. to be dropped
because they looked like no-ops.
See also:
https://dart-review.googlesource.com/c/sdk/+/221624
TEST=Existing.
Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-ia32-try,vm-kernel-nnbd-win-release-ia32-try
Change-Id: I09e69295c8a522d74f8a8fd817188b4de656c619
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237690
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
Subclasses of the _Function class are generated on the fly as fields
with function types are encountered. Therefore, this class must be early
in the initialization order.
Change-Id: Ia0b998c443af9f6bdb4af512f6da99e6e3767c1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237681
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Should make this test run within the normal timeout period.
TEST=ci
Change-Id: Ie8048a6cc7c31b193cf326bf9742fad279411b44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237688
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
These linter fixes help prepare analyzer for lints 2.0.0
Change-Id: Ic942fa367965edac479b917cbbb601b30da8b53c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237766
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
This reverts commit ee5837aa7a.
Updated Intellij plugins have been published which support the new
message.
TEST=CQ
Change-Id: I81f6d878f036991a95cc1f58d3102015e77aa609
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237741
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>