Skip to content

Commit 1cf9d7a

Browse files
sjindel-googlecommit-bot@chromium.org
authored andcommitted
Revert "[vm] Add type to _AsyncAwaitCompleter.start."
This reverts commit 9983424. Reason for revert: Breaks vm/dart/causal_stacks/async_throws_stack_no_causal_test Original change's description: > [vm] Add type to _AsyncAwaitCompleter.start. > > Without the type, the call to the the parameter f() was being handled > as a dynamic InstanceCall (smiable), so we had a megamorphic call to one > of the Closure_XXXX_call methods (there are many copies of this method > for different signatures) which in turn calls the closure. > > Now that the type is present, we do a direct ClosureCall to the target. > > This gives a measurable improvement to an important internal benchmark. > > Change-Id: Ia9429879f69257465a2537616d8f8595fb1eefa8 > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138520 > Reviewed-by: Martin Kustermann <[email protected]> > Commit-Queue: Samir Jindel <[email protected]> [email protected],[email protected] Change-Id: I2deeebc24d80a7f444f4f53c5c8959b747fd1b29 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138502 Reviewed-by: Samir Jindel <[email protected]> Commit-Queue: Samir Jindel <[email protected]>
1 parent 2a8127d commit 1cf9d7a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

sdk/lib/_internal/vm/lib/async_patch.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class _AsyncAwaitCompleter<T> implements Completer<T> {
4343
}
4444
}
4545

46-
void start(void Function() f) {
46+
void start(f) {
4747
f();
4848
isSync = true;
4949
}

sdk_nnbd/lib/_internal/vm/lib/async_patch.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class _AsyncAwaitCompleter<T> implements Completer<T> {
4141
}
4242
}
4343

44-
void start(void Function() f) {
44+
void start(f) {
4545
f();
4646
isSync = true;
4747
}

0 commit comments

Comments
 (0)