- Add `.style.yapf` with configuration to use Google style.
- Run `yapf` on all `.py` files in this repo.
- Manually fix one trailing space in a doc string.
- Run `git cl format runtime` to satisfy presubmit.
Change-Id: I7e6bd11e91f07926b9188362599af398551eed79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111600
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
If 'is' is specialized, 'as' will benefit.
Change-Id: Ie95982322bbdd48ac05f0073699547e0b8e7f77c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111986
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Also add ENUM_LIKE property editor, that is like ENUM, but allows
such free-form expressions.
R=brianwilkerson@google.com
Change-Id: I3910b6bea98110c192b6cc9fb716b73270e1d97c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111985
Reviewed-by: Jacob Richman <jacobr@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This version of the dart/language_model CIPD package sets the package attribute
preserve_writable: true and removes the read-only CIPD version file.
Bug: https://github.com/dart-lang/sdk/issues/37698
Change-Id: I3823decf92518dd4e4eb39e8862eb98550fcf2af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111983
Commit-Queue: Ari Aye <ariaye@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Remove DebugCheck on Jump opcode.
Emit explicit DebugCheck bytecode instructions for VariableSet (see CL 111221).
Emit explicit DebugCheck bytecode instructions for VariableDeclaration.
Emit explicit DebugCheck bytecode instructions in _generateNonLocalControlTransfer before context is unwound.
Refactor prologue of async op functions, so that the same DebugCheck opcode is
encountered on every reentry.
Allow extra single steps when debugging bytecode in service tests.
Support context level calculation of compiled frames.
Adjust filter of synthetic variables in debugger.
Fix logic to skip single steps in bytecode prologue.
Change-Id: I1d6236c37af1aded0eebca1c3e3bb1978f7369dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111867
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Adds synthesized type variable builders and formal parameter builders to
the procedure builder. This ensure that both the outline and body
building correctly resolve extension type variables and extension this types.
Change-Id: I55d5665286dafedb4e47316faafb32ddb6cc33d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111730
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
This allows for special-casing extension declarations bodies. This
is needed because the on-clause hold the type of the parameter holding
the `this` value inside an instance method in an extension declaration.
Change-Id: I7af9bf0a9842f7e6f42dddb54fb487c69a8fa519
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111729
Reviewed-by: Dan Rubel <danrubel@google.com>
The prepares for special-casing methods in extension declarations
during building of the outline. This is needed to add synthesized
type parameters and parameters to the method signature.
Change-Id: Id41d85d86a9ad4eedc4a4ce346ad14e18277dda9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111728
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
This fixes another error found by Mike's fuzzer.
R=brianwilkerson@google.com
Change-Id: Id16a280949d14ce7589d47a88faf9a038c588e04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111961
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
After landing d3f3b46, which adds support for vm-service to the run_vm_tests binary,
random vm/cc tests started to time out. The VM shutdown procedure waits
for the service isolate to shut down, which it doesn't do.
Since we haven't been running the vm-service isolate before, this
might've been an existing issue which is just surfaced now. This CL
disabled starting vm-service (like it was before) except for the
particular test which needs it.
Issue https://github.com/dart-lang/sdk/issues/37741
Change-Id: I914cccf0cf640602a6a7e31b1aa456301837be79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111737
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Auto-Submit: Martin Kustermann <kustermann@google.com>
This fixes one of the errors which Mike found with fuzz tester.
R=brianwilkerson@google.com
Change-Id: I987f47746c8721d9a39de0c186cf4c3776f66611
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111960
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This way, users of S-expression deserialization will not also pull in
the rest of the upcoming IL deserialization functionality (and
anything extra needed by that).
Also changes SExpParser::ReportError to just print the error
information to stderr and abort, instead of using the Dart VM
exception machinery.
Change-Id: Id01b2a6fdca1a6204d502f398df139c2faa12d07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111644
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Dart_CodeObserver is a struct (in dart_api.h) with two pointers:
void* data;
void (*Dart_OnNewCodeCallback)(...) on_new_code;
Change-Id: I556b73e0e3488a10f9fd162af24e36ad4f240fa1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111723
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
This CL adds CC a test for Dart_InvokeVMServiceMethod. This requires also
adding support for starting the service-isolate in run_vm_tests, which in
return requires adding the vm_platform.dill (as well as a few other things).
Furthermore this CL also adds a Service::WaitForLoadPortInternal, which does
not require a current thread and makes Dart_InvokeVMServiceMethod use it.
Original CL (not landed): https://dart-review.googlesource.com/c/sdk/+/67761
Closes https://github.com/dart-lang/sdk/issues/33977
Change-Id: Ife98b56043c26eb477825b05f8aaedaec508eeb8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111726
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
This reverts commit d6e9e15cf1.
Reason for revert: The recognized kind was likely intentionally
carried over to the DIF, since the inliner doesn't distinguish
between dynamic and non-dynamic call sites for these recognized
method replacements. In addition, the replacements are speculative
and can't handle arbitrary inputs, so deoptimization should end up
re-executing the original DIF call and thus cause an appropriate
type error to be emitted via the DIF.
Original change's description:
> [vm] Clear recognized method info on dynamic invocation forwarders.
>
> Similar change to b68e5c4338, where this information gets copied
> over into the new dynamic invocation forwarder from the original
> function.
>
> Change-Id: I728fa459837a8bb2e831c5314d12f6a00f7f32b6
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110722
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Teagan Strickland <sstrickl@google.com>
TBR=kustermann@google.com,sstrickl@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: Iffd34142647440f0bdb0ab60d1ec41ca638d4c04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111732
Reviewed-by: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Teagan Strickland <sstrickl@google.com>
This CL sets up the bare minimum support for saving the language version
specified in a file on the kernel library, and adds simple support for
testing it.
The data is not serialized out, error checked or similar in this change.
Change-Id: I4b061ce617acae7964b85be105e0ad0e3e031aa4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111640
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This is the beginning of allowing us to - wherever we process kernel
data - make decisions based on the kernel version. Said another way,
we can actually start to change the kernel format without breaking
backwards compatibility in the VM.
Change-Id: Ied7b3d9fe72976c4f3c0895d02b6ab70e0f5dba9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111642
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
So, we keep this feature working when switch to summary2.
IntelliJ does not use it though.
Change-Id: I11f71443dc7354de8a593442de470fa91aa228e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111870
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
With AnalysisDriver, and computing constant values on demand, we
can check for required parameters directly, without pending constants
and errors.
We also don't have to do additional recursive pass over AST, so will
probably run a little faster.
R=brianwilkerson@google.com, pquitslund@google.com
Change-Id: I623f47851bf0094ac59d60a24f3015a3154432c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111925
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
AST-based flow graph builder has a heuristic logic on when to generate
DebugStepCheck when assigning value to a variable. This logic depends on
right-hand side expression. In order to replicate the same behavior
with bytecode, bytecode generator would also implement this logic and
generate explicit DebugCheck instructions instead of stopping on every
StoreLocal/PopLocal/StoreContextVar.
Change-Id: Ic10180673a324db9216e34459d9c0afaca6a11e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111221
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This fixes the stubs that default type parameters.
Some benchmarks test this behaviour.
Change-Id: If47d99e5fbf1a2bceeb0e6e930e27cfea6f3eedc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111871
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>