mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 00:39:49 +00:00
[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 <kustermann@google.com> Commit-Queue: Samir Jindel <sjindel@google.com>
This commit is contained in:
parent
c2fc5f9756
commit
9983424a3c
|
@ -43,7 +43,7 @@ class _AsyncAwaitCompleter<T> implements Completer<T> {
|
|||
}
|
||||
}
|
||||
|
||||
void start(f) {
|
||||
void start(void Function() f) {
|
||||
f();
|
||||
isSync = true;
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ class _AsyncAwaitCompleter<T> implements Completer<T> {
|
|||
}
|
||||
}
|
||||
|
||||
void start(f) {
|
||||
void start(void Function() f) {
|
||||
f();
|
||||
isSync = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue