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

Issue 2055263002: VM: Improve specialization of calls on receiver in AOT mode. (Closed)

Created:
4 years, 6 months ago by Vyacheslav Egorov (Google)
Modified:
4 years, 6 months ago
Reviewers:
Florian Schneider
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

VM: Improve specialization of calls on receiver in AOT mode. When encountering call this.m(...) we can check if m resolves to the same method in all concrete subclasses of the receiver class. If it does then we don't need any checks and can just use a StaticCall instead of InstanceCall. This is allows us to improve code quality for cases like: class Base { var _field; foo() { _field = true; } } class A01 extends Base { } ... class A16 extends Base { } Previously AOT would generate InstanceCall(get:_field) in the method foo. However with this change we generate StaticCall(...) which subsequently gets handled by the inliner. R=fschneider@google.com BUG= Committed: https://github.com/dart-lang/sdk/commit/ec9b1c385a4e7824cf133cffb834bb38d65fe1fc

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+106 lines, -41 lines) Patch
M runtime/vm/aot_optimizer.cc View 1 chunk +87 lines, -41 lines 2 comments Download
M runtime/vm/intermediate_language.h View 1 chunk +19 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
Vyacheslav Egorov (Google)
4 years, 6 months ago (2016-06-10 15:12:35 UTC) #1
Florian Schneider
Lgtm. https://codereview.chromium.org/2055263002/diff/1/runtime/vm/aot_optimizer.cc File runtime/vm/aot_optimizer.cc (right): https://codereview.chromium.org/2055263002/diff/1/runtime/vm/aot_optimizer.cc#newcode2545 runtime/vm/aot_optimizer.cc:2545: StaticCallInstr* call = new (Z) StaticCallInstr( Alternatively, maybe ...
4 years, 6 months ago (2016-06-10 15:30:18 UTC) #2
Vyacheslav Egorov (Google)
https://codereview.chromium.org/2055263002/diff/1/runtime/vm/aot_optimizer.cc File runtime/vm/aot_optimizer.cc (right): https://codereview.chromium.org/2055263002/diff/1/runtime/vm/aot_optimizer.cc#newcode2545 runtime/vm/aot_optimizer.cc:2545: StaticCallInstr* call = new (Z) StaticCallInstr( On 2016/06/10 15:30:18, ...
4 years, 6 months ago (2016-06-10 16:05:06 UTC) #3
Vyacheslav Egorov (Google)
4 years, 6 months ago (2016-06-10 16:12:52 UTC) #5
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
ec9b1c385a4e7824cf133cffb834bb38d65fe1fc (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698