Use all tokens of the declaration, otherwise static fields don't work.
Tests for fields.
Updates to the implementation.
After https://dart-review.googlesource.com/c/sdk/+/359280
Change-Id: Ibebe035ae664ca46b789fe80474ef041a9f8dea1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359340
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reland of bdacbb8dec
Patchset 2 has fixes for tests failing in the reland.
TEST=ci
Change-Id: I1053ef653d4112d3998070cc4fc098d19d8ff264
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/357440
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
Related issues:
https://github.com/dart-lang/sdk/issues/55024https://github.com/dart-lang/sdk/issues/55267
These operators were initially broken in 3.3 and were exposed
as returning JSBoolean but implemented as returning bool. They
were fixed to return bool in the public API, but we should
prefer to have them return JS types as they're likely to be used
in cases where implicit conversions are not useful.
CoreLibraryReviewExempt: Fixing type mismatch in backend-specific library.
Change-Id: I3b0e60550dcac78918f8399d11238dcfa34982cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359180
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
`resolvedExecutable` is always running on the host, so this makes much
more sense than starting from the target which may be a different
platform. Still try from the target dill if that doesn't work: if the
running tool is a third party tool using the CFE as a library then
that might be the best we have to go on.
R=jakemac@google.com, johnniwinther@google.com
Change-Id: If73dc49e8ee4eb2bc729d9713fa50ddd4ccbccf8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359062
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Auto-Submit: Morgan :) <davidmorgan@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
The new implementation of String.codeUnitAt is always inlined and
doesn't depend on the polymorphic inlining of recognized methods.
String.codeUnitAt now has a custom body in the flow graph builder
which performs non-speculative bounds check and then branches between
OneByteString and TwoByteString. Corresponding graph intrinsic and
native method are removed.
This change also fixes passing of unboxed arguments to runtime
in the slow path of GenericCheckBound instruction in JIT mode
(when shared stubs are not used).
TEST=ci
Change-Id: Iab2805fc752df84c37089165f828e31aca5f043f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359000
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
The existing implementation assumed, hardcoded, that the compilation
environment had an entry for any string of the form `dart.library.`+X,
with a value of either `"true"` or `""`.
This did not match the runtime behavior of the standalone VM,
which allows non-constant access to the compilation environment.
Changed to only have entries with value `"true"` for libraries
which exist.
This changes the value of `bool.hasEnvironment` or a
`String.fromEnvironment` or `bool.fromEnvironment` with a
non-default `defaultValue`.
The existing behavior was that `bool.hasEnvironment` was always true,
and that the other constructors ignored the `defaultValue`,
so most likely such tests or `defaultValues` aren't used anyway.
Fixes#53815
Bug: https://dartbug.com/53815
Change-Id: I995bb34b5ab04b39a8a588d6a59c0027a0fe855c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331261
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
When dump info data is being serialized as part of the codegen + emitter joint phase, all the impacts are considered "generated" and so they must all be serialized with the dump info data. If we wait to serialize them until the end of the phase as we usually do, these impacts cannot be GCed right away. This leads to a much higher memory footprint. By serializing them eagerly we can GC the object and just maintain the much leaner serialized data.
Change-Id: I11606f7291fe8d86af1f72724bd8c68e9666a00a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359300
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
ComputeElementAddress takes a base untagged address, an index, an index
scale, and an offset and returns base + (index * scale) + offset as an
untagged address.
This removes the last conversions between untagged and unboxed integers
for untagged GC-movable pointers. The only remaining conversions are
the following cases, which all involve non-GC-movable pointers:
1. Calls to the FFI resolver (on IA32 only).
2. Returning nullptr when a pointer to memory is expected in
exceptional returns from FFI callbacks.
3. Converting user-provided integers to FFI pointer objects and back.
In addition, we no longer add the data field to materializations of
typed data views, but instead recompute the data field in
DeferredObject::Fill(). This removes the last source of unsafe untagged
pointers that may have arbitrary lifetimes in the flow graph.
Thus, we can now verify in the FlowGraphChecker that there are no
GC-triggering instructions between the creation of an untagged
GC-movable pointer and its use (including the use itself). To do this,
this CL adds a predicate MayCreateUnsafeUntaggedPointer to definitions,
which by default returns true for kUntagged results, false otherwise,
and should only be overwritten in cases where the result can be proven
to not be a untagged GC-movable pointer.
TEST=vm/dart/regress_54710_il_test
vm/cc/AllocationSinking_NoViewDataMaterialization
Fixes: https://github.com/dart-lang/sdk/issues/54710
Cq-Include-Trybots: luci.dart.try:vm-aot-android-release-arm64c-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-mac-release-arm64-try,vm-aot-mac-release-x64-try,vm-aot-obfuscate-linux-release-x64-try,vm-aot-optimization-level-linux-release-x64-try,vm-appjit-linux-debug-x64-try,vm-asan-linux-release-x64-try,vm-checked-mac-release-arm64-try,vm-eager-optimization-linux-release-ia32-try,vm-eager-optimization-linux-release-x64-try,vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-qemu-linux-release-arm-try,vm-ffi-qemu-linux-release-riscv64-try,vm-fuchsia-release-x64-try,vm-linux-debug-ia32-try,vm-linux-debug-x64c-try,vm-mac-debug-arm64-try,vm-mac-debug-x64-try,vm-msan-linux-release-x64-try,vm-reload-linux-debug-x64-try,vm-reload-rollback-linux-debug-x64-try,vm-ubsan-linux-release-x64-try,vm-win-release-ia32-try
Change-Id: Ie172a8bd0330a728a4f151478664a530f8d9b38a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354862
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
This accepts the flag without a suffix because I'm fairly confident we can ship this support without breaking changes to the API.
For a short period, the old flag is still supported so that Dart-Code + SDK don't need to be updated at the same time to avoid the support disappearing. I will remove the old flag in a few weeks (after a beta SDK branch and a stable Dart-Code release).
Change-Id: I246a33f37a5d5fc5c05c15daab7d87d4cc4fd9e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359064
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This is a small tidy up that changes `failTestOnAnyErrorNotification` to be automatically set when using `expectErrorNotification` so there's slightly less noise in tests.
Change-Id: I44056a23aca872b8e96109be4d4ba4356b8af53d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359221
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Goma is off by default, and RBE is only enabled where it is known to
work, so there is no need to disable RBE instead. Some of these builders
additionally disable RBE in their infra/config definitions and there is
no need to duplicate that information here.
Bug: b/296994239
Change-Id: I9f9733ba5189b53b899289a23d68126f7c6adcc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/357610
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Previously, the FFI used unboxed integers as a native representation
for pointers in FFI code, as the compiler only handled very specific
uses of untagged pointers flowing between instructions. Since then,
this restriction has been removed for untagged pointers that do not
point to memory managed by the GC, like FFI pointers, so now they can
have a more precise representation.
By being precise about when untagged (untagged pointers to freshly
allocated Handles and the contents of Pointer data fields) and tagged
(TypedData objects constructed to hold the byte representation of
compound data) values are expected, we can remove the need to have
untagged pointers to GC-movable objects and/or having untagged
pointers escape as unboxed integers in the generated IL.
This CL also renames kUnboxedFfiIntPtr -> kUnboxedAddress and limits
its uses specifically to where the unboxed integer represents the
numeric representation of an untagged pointer.
This CL changes CCall to take Representations for the arguments and
return value instead of what looks like an arbitrary
NativeCallingConvention. However, the serializer and deserializers for
CCall, used in IL tests, originally assumed that the argument and return
representations were kUnboxedFfiIntPtr, so providing an arbitrary
NativeCallingConvention which didn't match that assumption would cause
failures during IL tests. That assumption came from the fact that
the only creator of CCall instructions was in kernel_to_il.cc, and there
that was the case.
Now CCall builds the native calling convention during construction
and deserialization from the argument and return representations and
stores both the representations and built native calling convention
internally. In the future, if we want to create CCall instructions with
more arbitrary native calling conventions, then we'll need to handle
serialization/deserialization of arbitrary native calling conventions,
and also add consistency checks that the provided representations
appropriately match the native calling convention.
TEST=ffi vm/dart/regress_306327173_il vm/dart/address_local_pointer_il
Issue: https://github.com/dart-lang/sdk/issues/54710
Cq-Include-Trybots: luci.dart.try:vm-aot-android-release-arm64c-try,vm-aot-android-release-arm_x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-mac-release-arm64-try,vm-aot-mac-release-x64-try,vm-aot-obfuscate-linux-release-x64-try,vm-aot-optimization-level-linux-release-x64-try,vm-aot-win-debug-arm64-try,vm-appjit-linux-debug-x64-try,vm-asan-linux-release-x64-try,vm-checked-mac-release-arm64-try,vm-eager-optimization-linux-release-ia32-try,vm-eager-optimization-linux-release-x64-try,vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-qemu-linux-release-arm-try,vm-ffi-qemu-linux-release-riscv64-try,vm-fuchsia-release-x64-try,vm-linux-debug-ia32-try,vm-linux-debug-x64-try,vm-linux-debug-x64c-try,vm-mac-debug-arm64-try,vm-mac-debug-x64-try,vm-msan-linux-release-x64-try,vm-reload-linux-debug-x64-try,vm-reload-rollback-linux-debug-x64-try,vm-ubsan-linux-release-x64-try,vm-win-debug-arm64-try,vm-win-debug-x64-try,vm-win-release-ia32-try
Change-Id: I34effe8fbdc80288b703e0152d5ba67ce2343400
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353101
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
This keeps the array registers unchanged across the instruction,
which can save instructions if there are unused registers to allocate
for the temporaries and the source or destination registers are live
after the copy (e.g., if the destination array is then used in a
LoadIndexed instruction post-copy).
On IA32, we still use writable registers due to register pressure.
TEST=ci
Change-Id: Ia955f8db39e4aba0f01b9d06ea50992a7375a492
Cq-Include-Trybots: luci.dart.try:vm-aot-android-release-arm64c-try,vm-aot-android-release-arm_x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-mac-release-arm64-try,vm-aot-mac-release-x64-try,vm-aot-obfuscate-linux-release-x64-try,vm-aot-optimization-level-linux-release-x64-try,vm-aot-win-debug-arm64-try,vm-appjit-linux-debug-x64-try,vm-asan-linux-release-x64-try,vm-checked-mac-release-arm64-try,vm-eager-optimization-linux-release-ia32-try,vm-eager-optimization-linux-release-x64-try,vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-qemu-linux-release-arm-try,vm-ffi-qemu-linux-release-riscv64-try,vm-fuchsia-release-x64-try,vm-linux-debug-ia32-try,vm-linux-debug-x64-try,vm-linux-debug-x64c-try,vm-mac-debug-arm64-try,vm-mac-debug-x64-try,vm-msan-linux-release-x64-try,vm-reload-linux-debug-x64-try,vm-reload-rollback-linux-debug-x64-try,vm-ubsan-linux-release-x64-try,vm-win-debug-arm64-try,vm-win-debug-x64-try,vm-win-release-ia32-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/357901
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
After https://dart-review.googlesource.com/c/sdk/+/330600, there were
more chances for the optimizing compiler to introduce or move
GC-triggering instructions like allocations or boxings between the
retrieval of an untagged pointer to GC-moveable memory and its use.
To limit the chance of this happening, this CL removes the explicit
loading of the untagged payload address when building the initial
flow graph in most cases when the array is not known to be an external
array (an external string, an external typed data object, or an FFI
Pointer).
The remaining case is during view allocation, which extracts the
payload address of the base typed data object underlying the view
(which may be GC-movable) to calculate the payload address that should
be stored in the data field of the view object. See
https://github.com/dart-lang/sdk/issues/54884.
During canonicalization of LoadIndexed, StoreIndexed, and MemoryCopy
instructions, if the cid of an array input is an external array
(external string, external typed data object, or Pointer), then a
LoadField instruction that extracts the untagged payload address
is inserted before the instruction and the corresponding input is
rebound to that LoadField instruction.
Once all compiler passes that involve code motion have been performed,
a new pass looks for LoadIndexed, StoreIndexed, or MemoryCopy where
the cid stored in the instruction for the array is a typed data cid.
In these cases, if the array is not an internal typed data object,
then the payload address is extracted. Waiting until this point ensures
that no GC-triggering instructions are inserted between the extraction
of the payload address and the use. (Internal typed data objects are
left as-is because the payload address is inside the object itself
and doesn't require indirection through the data field of the object).
This CL also replaces code conditional on the array cid with code
that is instead conditional on the array element representation in
cases where it makes sense to do so, since this is a less brittle
check than checking the array cid (e.g., checking for kUnboxedInt8
to load, store, or copy an signed byte from an array instead of
listing all possible array cids that store signed bytes).
This CL also fixes an issue with the ARM64 assembler where calling
LoadFromOffset with an Address that has a non-Offset type would
silently generate bad code instead of triggering the ASSERT in
PrepareLargeOffset.
TEST=vm/dart/typed_list_index_checkbound_il_test
Issue: https://github.com/dart-lang/sdk/issues/54710
Cq-Include-Trybots: luci.dart.try:vm-aot-android-release-arm64c-try,vm-aot-android-release-arm_x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-mac-release-arm64-try,vm-aot-mac-release-x64-try,vm-aot-obfuscate-linux-release-x64-try,vm-aot-optimization-level-linux-release-x64-try,vm-aot-win-debug-arm64-try,vm-appjit-linux-debug-x64-try,vm-asan-linux-release-x64-try,vm-checked-mac-release-arm64-try,vm-eager-optimization-linux-release-ia32-try,vm-eager-optimization-linux-release-x64-try,vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-qemu-linux-release-arm-try,vm-ffi-qemu-linux-release-riscv64-try,vm-fuchsia-release-x64-try,vm-linux-debug-ia32-try,vm-linux-debug-x64-try,vm-linux-debug-x64c-try,vm-mac-debug-arm64-try,vm-mac-debug-x64-try,vm-msan-linux-release-x64-try,vm-reload-linux-debug-x64-try,vm-reload-rollback-linux-debug-x64-try,vm-ubsan-linux-release-x64-try,vm-win-debug-arm64-try,vm-win-debug-x64-try,vm-win-release-ia32-try
Change-Id: I25b5f314943e9254d3d28986d720a5d47f12feeb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352363
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
E.g. the below command should update both strong, weak, etc and
incremental, parser etc suites with any test containing ffi:
`out/ReleaseX64/dart pkg/front_end/tool/update_expectations.dart *ffi*`
In the future we should, I think, update the tool to be more like
`unit_test_suites.dart` and get rid of the option for package:testing
to generate a program and then run that.
Change-Id: I19edfe2198cbe86326396dc2c8a8f871c599588d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359061
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
To avoid accounting overhead during each bump pointer allocation, we add the size of the whole bump area when starting to use that area and
subtract the remaining size when switching to a new area.
TEST=ci
Change-Id: If0c429db47c27ca51aac5c055268e85f70bad9ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359160
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This change reworks the client resume permissions API to make it easier
for clients to deal with user provided `--pause-isolates-on-start` and
`--pause-isolates-on-exit` flags.
`requireUserPermissionToResume` should be called by the tool that
launches the Dart process to indicate whether or not the user provided
`--pause-isolates-on-{start,exit}`. The default behavior is to assume
that a tool set these flags for its own use (e.g., resetting breakpoints
after a hot restart in Flutter), where isolates will resume immediately
after each client that has indicated interest in that pause event has
invoked `readyToResume`.
If a user provided one of the previously mentioned flags, isolates will
not immediately resume after each relevant client has invoked
`readyToResume`. Instead, a call to `resume()` must be made to indicate
the user has triggered the resume request instead of tooling. If the
user permissions to resume are changed while the isolate is paused and
all relevant clients have invoked `readyToResume`, the isolate will
automatically resume if the user no longer requires us to wait for a
user resume.
`resume()` now also acts as a "force resume", bypassing any required
permissions set by tooling.
This behavior change is breaking, so the DDS protocol version is being
bumped to 2.0.
`package:dds_service_extensions` has also been updated to include the
following DDS RPCs:
- `requireUserPermissionToResume`
- `readyToResume`
Change-Id: Id5f0806b3c56507d39eb00b6305b8896bab13ae7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/357420
Reviewed-by: Elliott Brooks <elliottbrooks@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This adds support for printing the DTD connection information to stdout
when --print-dtd-uri is passed.
This change also fixes an issue where DDS would fail to spawn an isolate
with the DTD snapshot when DDS was running in AOT mode. This means the
SDK must be shipped with both AppJIT and AOT DTD snapshots, at least
until dartdev is moved to run from AOT.
Fixes https://github.com/dart-lang/sdk/issues/55034
TEST=run_test.dart
Change-Id: I788ef9bfe76297a8d594992a2aac440ed9e2ecac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358541
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
This is mostly a very tidy extraction of `getTypeSource`. This method
relied on a handful of helper functions, all of which were _only_
present in order to help `getTypeSource`. This method also does not
rely on `_buffer` or `eol`. And it is only used by one piece of code,
`extract_method`. Almost a slam dunk!
However, there appeared some strange caveats that I must document
here:
CorrectionUtils also featured two mutable fields, `targetClassElement`
and `targetExecutableElement`. Theoretically, these fields are
supposed to be set before calling `getTypeSource`, to help understand
whether a TypeParameter will be visible when extracting a method, or
something like that. But it appears to be totally broken:
* The singular caller of `getTypeSource`, `ExtractMethodRefactoring`,
_never sets those fields_.
* Two other pieces of code, the AddTypeAnnotation fix, and the
CreateField, CreateFunction, and CreateOverrides fixes, all set the
fields, but _never call getTypeSource_.
Since this all looked like just very stale / rotten code, I removed
everything which looks to be dead: `targetClassElement` and
`targetExecutableElement`, and lo and behold: no tests fail! I've kept
those things deleted, and added a TODO for TypeParameters.
Lastly, since I was trying to figure out ExtractMethodRefactoring, I
tidied it up:
* Make it final
* Rename `ERROR_EXITS` to `errorExits`
* Privatize `searchEngine`, `resolveResult`, `selectionOffset`,
`selectionLength`, `librariesToImport`, and `variableType`.
* Both `selectionRange` and `utils` could be final as they were set
in the constructor body, so move that to initializers, make final,
and make private.
Change-Id: Ia3fb948e5424971eb4250e711c179707552ad8aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358663
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
The analyzer team has decided to adopt the convention of using `TODO`
comments to document long term issues that should persist in the
codebase, and `FIXME` comments to document short term issues that need
immediate attention. They may even consider adding a presubmit hook
to ensure that `FIXME` comments are only used during local
development.
Accordingly, it makes sense to suppress `TODO` comments from being
surfaced to the IDE "problems" view (since there are hundreds of them,
and they're not immediately actionable). This makes VSCode's
"problems" view much more usable in "tree" mode.
(See also https://dart-review.googlesource.com/c/sdk/+/295662, which
made the corresponding change to the `analysis_server` and `analyzer`
packages, and https://dart-review.googlesource.com/c/sdk/+/325121,
which made the corresponding change to the `linter` package).
Change-Id: Ifbd2f6bed468408b1906b25ab94f745eed0b3e55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358980
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Add `package:front_end/src/api_prototype/macros.dart` for utilities
related to compiling macros. Export `isMacroLibraryUri`.
Use `isMacroLibraryUri` instead of hard-coding in a few places.
Add TODO about need to handle macro deps to places that are currently
listing sources as deps.
R=jakemac@google.com, johnniwinther@google.com
Change-Id: I5d2473b810afd42f487178f0aad995804da945c4
Tested: Manually tested with Flutter; e2e tests will be added under tests/macro_build.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358700
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Morgan :) <davidmorgan@google.com>
The released layout is different from the "building Flutter to work on
it" layout, this should work for both. Of course, an end to end test
is needed--work in progress.
R=jakemac@google.com, johnniwinther@google.com
Change-Id: Ida664b6da62d8fd3b66b877f0441e771269d4fe5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358443
Commit-Queue: Morgan :) <davidmorgan@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Auto-Submit: Morgan :) <davidmorgan@google.com>
Avoid polymorphic character access by turning _ChunkedJsonParser
into a mixin instead of the base class.
TEST=ci
Change-Id: Id2080724e07d16e96734a80629c8bd8906dc590b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358445
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Such invocations were simply skipped before, remaining not unaliased
in the output Kernel code, which prevented evaluating them as
constants.
Closes https://github.com/dart-lang/sdk/issues/55152
Change-Id: I3a54f7c806a0c4fbd8158691be113bd2deae04f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/357621
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Codegen block order keeps loop blocks together and reflecting that in
live ranges allows to produce better register allocation decisions.
Consider for example the loop:
v = def();
while (cond) {
if (smth) { // (*)
use(v);
return true;
}
}
If block (*) is interspersed with loop blocks the register allocator
might decide to allocate it to the register in some of the loop blocks.
If the same block is "sunk" away from loop blocks - the register
allocator can clearly see that `v` does not necessarily have to live on
the register in the whole loop.
In JIT codegen block order is not topologically sorted and as such
is unsuitable for our linear scan.
TEST=ci
Cq-Include-Trybots: luci.dart.try:vm-aot-linux-debug-x64-try,vm-aot-mac-release-arm64-try,vm-aot-linux-release-x64-try
Change-Id: I0726815db998b559267949e157cd2158f5dd55f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358448
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>