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

Issue 11642003: Create and cache method extraction stub in the ICData. (Closed)

Created:
8 years ago by Vyacheslav Egorov (Google)
Modified:
7 years, 11 months ago
Reviewers:
srdjan, Ivan Posva
CC:
reviews_dartlang.org
Visibility:
Public.

Description

When requested to extract a method M from class C inject a method extractor (consisting of a single AST node CreateClosure) as a getter get:M into C. This allows to cache and optimize method extraction requests as normal method invocations and at hot method extraction sites that significantly decreases overhead of method extraction which previously required two trips into runtime system and was not cached at all. BUG= Committed: https://code.google.com/p/dart/source/detail?r=17261

Patch Set 1 #

Patch Set 2 : ready for review. #

Total comments: 1

Patch Set 3 : remove hand written assembly stub #

Total comments: 10

Patch Set 4 : lazyly inject extractors as getters into class #

Unified diffs Side-by-side diffs Delta from patch set Stats (+317 lines, -73 lines) Patch
M runtime/vm/class_finalizer.cc View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M runtime/vm/code_generator.cc View 1 2 3 3 chunks +3 lines, -42 lines 0 comments Download
M runtime/vm/dart_api_impl.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M runtime/vm/debugger.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M runtime/vm/flow_graph.h View 1 2 2 chunks +5 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/vm/flow_graph_builder.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M runtime/vm/flow_graph_optimizer.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 1 2 3 5 chunks +40 lines, -12 lines 0 comments Download
M runtime/vm/il_printer.cc View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M runtime/vm/intermediate_language.h View 1 2 2 chunks +10 lines, -7 lines 0 comments Download
M runtime/vm/intermediate_language_ia32.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/intermediate_language_x64.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/object.h View 1 2 3 3 chunks +9 lines, -0 lines 0 comments Download
M runtime/vm/object.cc View 1 2 3 4 chunks +27 lines, -0 lines 0 comments Download
M runtime/vm/parser.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/parser.cc View 1 2 3 2 chunks +34 lines, -0 lines 0 comments Download
M runtime/vm/raw_object.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/resolver.cc View 1 2 3 3 chunks +63 lines, -5 lines 0 comments Download
M runtime/vm/symbols.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
A tests/language/fast_method_extraction_test.dart View 1 2 3 1 chunk +104 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Vyacheslav Egorov (Google)
This is ready for the review.
8 years ago (2012-12-18 23:59:21 UTC) #1
Vyacheslav Egorov (Google)
I have removed hand written assembly and specialization in flow graph optimizer in favor of ...
7 years, 11 months ago (2013-01-16 14:00:23 UTC) #2
srdjan
LGTM https://codereview.chromium.org/11642003/diff/2001/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): https://codereview.chromium.org/11642003/diff/2001/runtime/vm/flow_graph_optimizer.cc#newcode938 runtime/vm/flow_graph_optimizer.cc:938: String::Handle(Field::NameFromGetter(call->function_name())); indent 4 spaces https://codereview.chromium.org/11642003/diff/6001/runtime/vm/code_generator.cc File runtime/vm/code_generator.cc (right): ...
7 years, 11 months ago (2013-01-16 22:08:56 UTC) #3
Ivan Posva
I still disagree with the LGTM and the approach chosen here. -Ivan On 2013/01/16 22:08:56, ...
7 years, 11 months ago (2013-01-17 07:24:36 UTC) #4
Ivan Posva
https://codereview.chromium.org/11642003/diff/6001/runtime/vm/parser.cc File runtime/vm/parser.cc (right): https://codereview.chromium.org/11642003/diff/6001/runtime/vm/parser.cc#newcode994 runtime/vm/parser.cc:994: // func.token_pos() points to the name of the field. ...
7 years, 11 months ago (2013-01-17 08:03:20 UTC) #5
Vyacheslav Egorov (Google)
I've addressed comments. Please take another look. Now I am injecting an extractor for the ...
7 years, 11 months ago (2013-01-17 12:46:38 UTC) #6
Vyacheslav Egorov (Google)
My main concern here is that lookup function became more heavyweight which might affect some ...
7 years, 11 months ago (2013-01-17 12:47:52 UTC) #7
Ivan Posva
Resolver and VM class hierarchy related changes LGTM. Code in the optimizer should be looked ...
7 years, 11 months ago (2013-01-18 07:00:51 UTC) #8
Ivan Posva
Resolver and VM class hierarchy related changes LGTM. Code in the optimizer should be looked ...
7 years, 11 months ago (2013-01-18 07:00:55 UTC) #9
Ivan Posva
Resolver and VM class hierarchy related changes LGTM. Code in the optimizer should be looked ...
7 years, 11 months ago (2013-01-18 07:00:58 UTC) #10
Vyacheslav Egorov (Google)
7 years, 11 months ago (2013-01-18 11:24:40 UTC) #11
Thanks for the review!

Code in the optimizer did not change since Srdjan reviewed it (I just moved one
line of code according to his review comment).

I am going to land this change.

Powered by Google App Engine
This is Rietveld 408576698