Notably, this carries us across the gcc->llvm transition.
Change-Id: I46203749c64c7ef0f52de40abcd4a073517cb06f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330949
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Also adds `JS_FALSE` to replace uses of `JS_GET_FLAG(false)`. See the
doc comment for details.
Change-Id: I33f89f158c1955a19fa299f22c50d51e36ede3d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330171
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
This CL reorganizes our collection of kernel transformations into
"modular" and "global" ones. Modular (phase 0a) transformations are
those that can be run on each library before we have "linked" the full
program AST. Global (phase 0b) transformations are those that are run
over the full program AST.
Although we colloquially refer to multiple transformations of each kind,
there is actually a single modular (resp. global) `Transformer`, which
merges all the required transformations into a single AST pass.
Change-Id: I8f53cba6fc9a8aab106188ec3597ab194dd0cde0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330170
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
See 3ecf3a729a
Change-Id: If58e262fb913a11edd8f0ecf3f2dcba6879ee65b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331086
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
- Remove test directories standalone_2 and dart_2
- Remove all references to standalone_2 and dart_2 in test scripts
TEST=ci
Change-Id: I574868e274558efbbe12fe8b6408bbe77a888583
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330982
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Add a few more parser tests.
Change-Id: I9ba22f0216cd3dcb2b104d8005429445c1e87637
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331083
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Now that we have our own `dart:convert` implementations in dart2wasm
targets (1) and the internal types are now internally public (2), this
simplifies some of the string implementation code by using the
implementation classes directly.
Note: stringref patch can be ignored, it's currently unused and I'm only
updating it to make it compile. It will be rewritten based on
`JSStringImpl` in [3].
To keep the CLs as small as possible, this CL does not do any of the
optimizations we can do now, such as optimizing
`OneByteString._setRange` to Wasm `array.copy` instructions. These will
be done in follow-up CLs.
[1]: https://dart-review.googlesource.com/c/sdk/+/330781
[2]: https://dart-review.googlesource.com/c/sdk/+/330783
[3]: https://dart-review.googlesource.com/c/sdk/+/316628
Change-Id: I92918d58a565ad32f5a221430e02d81562f03b00
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331040
Reviewed-by: Jackson Gardner <jacksongardner@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
Normally in the debugger we return truncated values, but there are some cases where the user expects the full value. The legacy DAP handled these, but the new DAP did not.
With this change:
- "Copy Value" (context: clipboard) actions will always copy the full string (and without quotes)
- the REPL/Debug Console will include the full untruncated string
Fixes https://github.com/Dart-Code/Dart-Code/issues/4730
Change-Id: I6e43f8e21ca606d4ea1e9f1c30a111d7a4d82f20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/326642
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Helin Shiah <helinx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
While tidying up some branches on my Mac I found this change I'd never uploaded. It fixes some (thought not all) failures when running with the memory resource provider set to Windows-style paths on non-Windows.
It also allows an environment variable (TEST_ANALYZER_WINDOWS_PATHS) to be used to set this behaviour to avoid modifying the code.
Change-Id: I4cb7e0c0aa6a10f28b43397c33ac8649af73a459
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331046
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
It cannot happen, we remove invalid types during linking.
Change-Id: I9585a7bbe1f9c27cf029457bcd4221d46d509ccd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330948
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Currently on 32-bit architectures, we only specialize truncating
division when the divisor is 1 or -1. That means all other cases
must go to runtime.
However, there is a general, non-branching computation for truncating
division when the absolute value of the divisor is a power of two,
so replace the call with that computation when appropriate.
TEST=language/div_mod, language/vm/modtruncdiv_int
Cq-Include-Trybots: luci.dart.try:vm-aot-linux-release-simarm_x64-try,vm-aot-linux-release-x64-try
Change-Id: I279565633b03d1e16c02200a96fd6ffef8798741
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331041
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
`NativeCallInstr::EmitNativeCode` `link_lazily` code path uses the
new snapshotting behavior, and the non-`link_lazily` checks that it's
never snapshotted.
The snapshot behavior argument is threaded from the the EmitNativeCode
to the places where the pool entry is constructed.
Does not yet migrate `kSwitchableCallMissEntryPoint` and
`kMegamorphicCallEntryPoint`.
TEST=CI
Change-Id: I8dd1dc5aa525f888b493856c60ae385087463d02
Cq-Include-Trybots: luci.dart.try:vm-ffi-qemu-linux-release-riscv64-try,vm-linux-debug-simriscv64-try,vm-aot-linux-release-arm64-try,vm-aot-android-release-arm64c-try,vm-aot-win-debug-arm64-try,vm-aot-mac-product-arm64-try,vm-mac-debug-arm64-try,vm-ffi-android-debug-arm-try,vm-ffi-qemu-linux-release-arm-try,vm-linux-debug-ia32-try,vm-linux-debug-x64-try,vm-aot-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/328861
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This reverts commit 5daaa7d9eb.
Reason for revert: internal crashes
Original change's description:
> [vm, gc] Mark through new-space.
>
> - Initial and final marking no longer visit all of new-space, reducing the STW pause for major GC.
> - A scavenge during concurrent marking must forward / filter objects in the marking worklist that are moved / collected, increasing the STW pause for minor GC.
> - Unreachable intergenerational cycles and weak references are collected in the next mark-sweep instead of first requiring enough scavenges to promote the whole cycle or weak target into old-space.
> - Artificial minor GCs are no longer needed to avoid memory leaks from back-to-back major GCs.
> - reachabilityBarrier is now just a count of major GCs.
>
> TEST=ci
> Change-Id: I4a6a23273d8ecb78c640f054731d4ceb737bfc4d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325840
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
Change-Id: I8a50074db343c63c14f0487ae8b4f5fee2c4ae76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330720
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
This is a part of [1] and a continuation of [2].
- Make typed data implementation file a library, to allow importing it
in `dart:convert` patch.
- Make SIMD implementation file a library, to allow importing it from
the typed data library.
- Make typed data implementation classes internally public (available in
other `dart:...` libraries).
- Relax `mayDefineRestrictedType` to allow implementing restricted types
anywhere in the standard library implementation.
[1]: https://dart-review.googlesource.com/c/sdk/+/330121
[2]: https://dart-review.googlesource.com/c/sdk/+/330781
Change-Id: I70bc6869a20fd2479bee081cfceef27d6de19974
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330783
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Jackson Gardner <jacksongardner@google.com>
This copies VM's convert implementation in dart2wasm's default and JSCM
targets, to be able to optimize the implementation based on these
targets' typed data and string implementation classes.
An example optimization that specializes UTF-8 decoder to `_U8List` can
be seen in [1], which improves a real-world benchmark (extracted from
internal) from 220ms to 90ms. (-59%)
Another optimization is we will be using the browser's UTF8 and JSON
decoders in JSCM convert patch.
VM's convert patch is moved from vm_shared to vm, as it's no longer used
outside of VM.
[1]: https://dart-review.googlesource.com/c/sdk/+/330121
Tested: existing tests.
Change-Id: I981070615a106e4f356ed8b292a29ec950bd4d97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330781
Reviewed-by: Jackson Gardner <jacksongardner@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
The previous logic shortcutted the actual logic specified by the spec,
which introduced this bug. The shortcutted logic would ask "is
Iterable<dynamic> assignable to Iterable<int>?" which is "no."
This new logic separates the assignability calculation for yield* vs
yield statements.
Fixed: https://github.com/dart-lang/sdk/issues/53731
Change-Id: Ifd13c6b41b781167664de4e236583dc2b68f16a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330946
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This fixes an edge case on all ARM64 ABIs, when there is only one argument register remaining and the next argument is a 9-16 byte struct.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/52644
Change-Id: I40d962e6d1b3484dbfcf91f5d6baca0bfec76056
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330161
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Bug:https://github.com/dart-lang/sdk/issues/53161
Change-Id: I3f13af3cb852b3656341922b9656ec91fc413eed
Tested: documentation + unit test only
CoreLibraryReviewExempt: Only adds documentation and adds a unit test to verify existing behavior
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323426
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Missed a couple of LoadUntaggeds for PointerBase.data in the graph
intrinsifier during 4d1bdaac.
Creates slots for ExternalOneByteString.external_data and
ExternalTwoByteString.external_data and uses LoadField with those slots
instead of LoadUntagged.
TEST=ci
Issue: https://github.com/dart-lang/sdk/issues/42072
Fixes: https://github.com/dart-lang/sdk/issues/53124
Change-Id: I900281644c4c42ad303cc7a6121e4c8bb7852cfe
Cq-Include-Trybots: luci.dart.try:vm-aot-linux-release-simarm_x64-try,vm-aot-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330787
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>