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

Issue 10010029: When checking against non-parametrized types use a cache to hold result tuples (class, result). Tha… (Closed)

Created:
8 years, 8 months ago by srdjan
Modified:
8 years, 8 months ago
Reviewers:
regis
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

When checking against non-parametrized types use a cache to hold result tuples (class, result). That cache is stored in the instruction stream. Currently implemented for instanceof, ia32 only. Should migrate to other type tests and architectures. 70x improvement on a benchmark (similar to what is seen in html _unwrap). Committed: https://code.google.com/p/dart/source/detail?r=6281

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 8

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+175 lines, -19 lines) Patch
M runtime/vm/class_finalizer.cc View 1 2 3 1 chunk +17 lines, -6 lines 0 comments Download
M runtime/vm/code_generator.cc View 1 2 3 2 chunks +43 lines, -7 lines 0 comments Download
M runtime/vm/code_generator_ia32.cc View 1 2 3 5 chunks +48 lines, -4 lines 0 comments Download
M runtime/vm/code_generator_x64.cc View 1 2 3 2 chunks +4 lines, -1 line 0 comments Download
M runtime/vm/code_patcher.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M runtime/vm/code_patcher_arm.cc View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
M runtime/vm/code_patcher_ia32.cc View 1 2 3 1 chunk +16 lines, -0 lines 0 comments Download
M runtime/vm/code_patcher_x64.cc View 1 2 3 1 chunk +13 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_compiler_x64.cc View 1 2 3 2 chunks +4 lines, -1 line 0 comments Download
M runtime/vm/object.h View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M runtime/vm/object.cc View 1 2 3 2 chunks +13 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
srdjan
8 years, 8 months ago (2012-04-05 23:02:02 UTC) #1
regis
LGTM Nice! Are you planning on caching the type for implicit type checks in checked ...
8 years, 8 months ago (2012-04-06 00:44:01 UTC) #2
srdjan
8 years, 8 months ago (2012-04-06 15:58:34 UTC) #3
https://chromiumcodereview.appspot.com/10010029/diff/5004/runtime/vm/class_fi...
File runtime/vm/class_finalizer.cc (right):

https://chromiumcodereview.appspot.com/10010029/diff/5004/runtime/vm/class_fi...
runtime/vm/class_finalizer.cc:1227: const String& super_name =
String::Handle(super_type.TypeClassName());
On 2012/04/06 00:44:01, regis wrote:
> Why not print the super type rather than just the super type class?
> TypeClassName() -> Name()

Done.

https://chromiumcodereview.appspot.com/10010029/diff/5004/runtime/vm/code_pat...
File runtime/vm/code_patcher_arm.cc (right):

https://chromiumcodereview.appspot.com/10010029/diff/5004/runtime/vm/code_pat...
runtime/vm/code_patcher_arm.cc:73: UNIMPLEMENTED();  // Untested.
On 2012/04/06 00:44:01, regis wrote:
> I hope the UNIMPLEMENTED() is tested by now ;-)

:-). Removed comment.

https://chromiumcodereview.appspot.com/10010029/diff/5004/runtime/vm/code_pat...
File runtime/vm/code_patcher_x64.cc (right):

https://chromiumcodereview.appspot.com/10010029/diff/5004/runtime/vm/code_pat...
runtime/vm/code_patcher_x64.cc:248: uint64_t* target_addr =
reinterpret_cast<uint64_t*>(instruction_address + 1);
On 2012/04/06 00:44:01, regis wrote:
> I do not think offset +1 is correct.
> You always told me not to submit untested code :-)

Deleting the code in both, leaving UNIMPLEMENTED.

https://chromiumcodereview.appspot.com/10010029/diff/5004/runtime/vm/code_pat...
runtime/vm/code_patcher_x64.cc:257: uint64_t* target_addr =
reinterpret_cast<uint64_t*>(instruction_address + 1);
On 2012/04/06 00:44:01, regis wrote:
> ditto

ditto

Powered by Google App Engine
This is Rietveld 408576698