Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Issue 2202773002: AOT: Faster invocation of callback fields. (Closed)

Created:
4 years, 4 months ago by Florian Schneider
Modified:
4 years, 4 months ago
Reviewers:
rmacnak
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

AOT: Faster invocation of callback fields. In the JIT we dynamically create stubs for implicit closure invocation of fields. For AOT we only used to do this for the .call invocations (explicit closure calls). Other fields invocations would go through the slower runtime call. This CL adds invocation stubs in AOT mode for all fields that have a function type as type annotation (likely callback fields) and avoid the overhead of runtime calls. The invocation stubs are cached at receiver classes. Therefore, they are added to all subclasses of a class that defines a callback field. This speeds up Flutter's layout_bench on a Nexus 4 by 6.8%. R=rmacnak@google.com Committed: https://github.com/dart-lang/sdk/commit/08a96e13b71797a8cabeb00552b84e853cb3b9cb

Patch Set 1 #

Total comments: 6

Patch Set 2 : addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+65 lines, -0 lines) Patch
M runtime/vm/precompiler.h View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/precompiler.cc View 1 1 chunk +64 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (5 generated)
Florian Schneider
4 years, 4 months ago (2016-08-01 21:51:39 UTC) #5
Florian Schneider
=== µs per iteration before 1056.6 1057.3 1054.4 1078.4 1058.4 1052.9 1059.1 1055.5 1069.1 1055.8 ...
4 years, 4 months ago (2016-08-01 22:30:15 UTC) #6
rmacnak
lgtm w/c https://codereview.chromium.org/2202773002/diff/1/runtime/vm/precompiler.cc File runtime/vm/precompiler.cc (right): https://codereview.chromium.org/2202773002/diff/1/runtime/vm/precompiler.cc#newcode558 runtime/vm/precompiler.cc:558: OS::Print("Found callback field %s\n", field_name.ToCString()); THR_Print https://codereview.chromium.org/2202773002/diff/1/runtime/vm/precompiler.cc#newcode563 ...
4 years, 4 months ago (2016-08-01 23:41:08 UTC) #7
Florian Schneider
https://codereview.chromium.org/2202773002/diff/1/runtime/vm/precompiler.cc File runtime/vm/precompiler.cc (right): https://codereview.chromium.org/2202773002/diff/1/runtime/vm/precompiler.cc#newcode558 runtime/vm/precompiler.cc:558: OS::Print("Found callback field %s\n", field_name.ToCString()); On 2016/08/01 23:41:08, rmacnak ...
4 years, 4 months ago (2016-08-01 23:57:00 UTC) #8
Florian Schneider
4 years, 4 months ago (2016-08-02 00:17:01 UTC) #10
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
08a96e13b71797a8cabeb00552b84e853cb3b9cb (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698