Per our internal discussion, we need this afterall: see b/129881700
Change-Id: I2c1deebaa68640944fa83df1850be0dce40b188f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98805
Auto-Submit: Vijay Menon <vsm@google.com>
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
This reverts commit 1ad11facec.
Reason for revert: The CL broke the flutter-analyze bot.
Original change's description:
> Fix mustCallSuper for mixins and inherited interfaces:
>
> * If a method overrides a mixed in @mustCallSuper method, it should call super.
> * If a method overrides a method from a supertype, which itself overrides a
> method from an interface, the first method should call super.
>
> Fixes internal b/70374204.
>
> Change-Id: I645de4a288a8c5ffff173e97692f8eb6fe38bdb5
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98443
> Commit-Queue: Samuel Rawlins <srawlins@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
TBR=brianwilkerson@google.com,srawlins@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I9339e6a8933f6d25b3bcbdbac0b6a1d304a3693b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98803
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This just has one change, a fix to how adjacent strings inside "=>"
functions are indented.
Change-Id: I457ea308101be9fb5acc4257e47360635a2b97e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98746
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Kernel service snapshot is built in default (non-bytecode) mode and
it is not compatible with VM running in bytecode mode.
Previously, this incompatibility was causing crashes and building of
kernel service snapshot was disabled if SDK is built with --bytecode.
With the change https://dart-review.googlesource.com/c/sdk/+/98723
that workaround is no longer needed, and we can build kernel service
snapshot once again.
Change-Id: Ia5660b637894a5ffc2723e12dc2bf9630cc2f8c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98604
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This change makes snapshots generated in bytecode mode incompatible with
VM running in a non-bytecode mode, and vice versa.
When there are both bytecode and AST available, we should consistently
use the same source for JIT compilation, as they are not compatible in
some cases (captured contexts of closures are different in bytecode and AST).
Change-Id: Id50c42694d8db1ffaf9dd1bd902071fc3297a5a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98723
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
If the receiver's static type has one concrete implementation, lookup the target for that implementation and add it to the ICData's entries. For some well-known interfaces, do the same for the most common concrete implementation (e.g., int -> _Smi).
Avoids method resolution during application startup.
Bug: https://github.com/dart-lang/sdk/issues/36428
Change-Id: I57edf9c9cb5cb13af3182a100adce2802571a3aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98445
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
This brings some updates from dart2js' string escape function over to
DDC. Includes some small changes to work better for DDC:
- take the quote style as an input; DDC uses it for ES6 template strings.
- use ES6 escape syntax (DDC requires ES6 support).
- always use UTF-8 mode because DDC writes files as UTF-8.
Change-Id: I56e2cbb9afcebf06500185170bd9877b16f5dd92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98693
Auto-Submit: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
This brings Analyzer's type inference in line with the language spec.
Similar to CFE, the inference function now takes an isConst parameter,
which if set, tells it to eliminate type variables from the context
type.
Change-Id: Ied67bac39d73c9ecd7e0a482a0c8db77272637cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98707
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Change-Id: I0664dd951ab4374856b3db83b7311a63176fa356
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98721
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Bytecode configurations should have the same test coverage as default mode.
The following tests are excluded in dartkb mode as there are too many crashes:
- service/* (debugging capabilities are not supported);
- lib_2/mirrors/* (mirrors are not supported);
- vm/cc/* (bytecode modes are not wired up in run_vm_tests).
Change-Id: I11eead94b96f43ab454acd6e6f6861af943c0488
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97847
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
* If a method overrides a mixed in @mustCallSuper method, it should call super.
* If a method overrides a method from a supertype, which itself overrides a
method from an interface, the first method should call super.
Fixes internal b/70374204.
Change-Id: I645de4a288a8c5ffff173e97692f8eb6fe38bdb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98443
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This fixes the problem with two-pass constant evaluation (with
intervening serialization) where an integer created by the first
pass would look like a double to the second pass.
Fixes https://github.com/dart-lang/sdk/issues/36477
Change-Id: I5040c3a2dac780c17a28b29df3dd65b6b9b3379b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98676
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Based on the unified typed data layout, we can now inline accesses to
typed data interface classes if there are no 3rd party implementations
of those interfaces.
Example: If a receiver is of type Uint8List and we call `[]` or `[]=` we
will inline the byte access.
Instead of changing the existing inliner / call specializer we add this
as an extra pass: If the inliner / call specializer infer that the
receiver type is e.g. internal typed data then it will perform the
inlining itself using more optimized LoadIndexed instruction.
=> Only if those existing optimization passes have not been able to inline
the access will we, later on in the compilation pipeline, run a
specialized pass which will inline the accesses using LoadUntagged +
LoadIndexed (which is slightly less efficient than using only LoadIndexed
for internal typed data).
As a first step this is only done for AOT.
For ease of writing tests matching certain IR graphs this CL also adds a
IR pattern matcher.
Issue https://github.com/dart-lang/sdk/issues/35154
Cq-Include-Trybots: luci.dart.try:vm-canary-linux-debug-try, vm-dartkb-linux-debug-x64-try, vm-dartkb-linux-release-x64-try, vm-kernel-asan-linux-release-x64-try, vm-kernel-checked-linux-release-x64-try, vm-kernel-linux-debug-ia32-try, vm-kernel-linux-debug-simdbc64-try, vm-kernel-linux-debug-x64-try, vm-kernel-linux-product-x64-try, vm-kernel-linux-release-ia32-try, vm-kernel-linux-release-simarm-try, vm-kernel-linux-release-simarm64-try, vm-kernel-linux-release-simdbc64-try, vm-kernel-linux-release-x64-try, vm-kernel-optcounter-threshold-linux-release-ia32-try, vm-kernel-optcounter-threshold-linux-release-x64-try, vm-kernel-precomp-android-release-arm-try, vm-kernel-precomp-bare-linux-release-simarm-try, vm-kernel-precomp-bare-linux-release-simarm64-try, vm-kernel-precomp-bare-linux-release-x64-try, vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-product-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-obfuscate-linux-release-x64-try, vm-kernel-precomp-win-release-simarm64-try, vm-kernel-precomp-win-release-x64-try, vm-kernel-reload-linux-debug-x64-try, vm-kernel-reload-linux-release-x64-try, vm-kernel-reload-rollback-linux-debug-x64-try, vm-kernel-reload-rollback-linux-release-x64-try, vm-kernel-win-debug-ia32-try, vm-kernel-win-debug-x64-try, vm-kernel-win-product-x64-try, vm-kernel-win-release-ia32-try, vm-kernel-win-release-x64-try
Change-Id: I5f2e01a55f46b473f64478b05679f65b9fd7c4c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98662
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
This is needed to prevent frontend from attempting to evaluate this constant during compile time.
Change-Id: If6c72f1ab6b3d7e3ea753703e79b388c39fbeca9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98698
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This reverts commit 3d6e29d251.
Change-Id: Id4760ef320e26552629d6795b6faa630bf5e15dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98697
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
Adds:
- dart2aot, a script similar to dart2js which compiles my.dart to my.dart.aot.
- dartaotruntime, a minimal Dart runtime that only runs AOT blobs.
- some extra tooling like gen_kernel and gen_snapshot used by the above.
- build rules for all of the above, including adding it to the full SDK builds.
Bug:https://github.com/dart-lang/sdk/issues/27596
Change-Id: Ic35f832b2b86be959212b8d21cfc5a082da5ced4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97627
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
In the VM-specific async transformation, an index is used to generate
fresh temporary names for values that are live across an await.
Before it was always 0 when translating a statement because there are
no live values on entry or exit to a statement.
When translating statements nested inside block expressions there can
be live values, so the index should not be reset.
Closes https://github.com/dart-lang/sdk/issues/36466
Change-Id: I6103d75c25f312ab1538a7c0f8fee0fea9f01b27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98664
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Change-Id: I82036fa3babc65ffa96f56309b073dd72f07c6f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98695
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
AllocateClosure bytecode is used to convey information about closure
function into an instance allocation site. This allows VM inliner to see
closure function very early at the optimization pipeline and enables
inlining of closure calls.
DeltaBlueClosures in JIT/bytecode mode (--use-bytecode-compiler):
Before: DeltaBlueClosures(RunTime): 1746.5404424083767 us.
After: DeltaBlueClosures(RunTime): 1291.4649496449324 us.
Issue: https://github.com/dart-lang/sdk/issues/36342
Issue: https://github.com/dart-lang/sdk/issues/36429
Issue: https://github.com/dart-lang/sdk/issues/36428
Change-Id: I6e94cdc2eb30110b0651a86bd2bdc40dcdd63207
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98439
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>