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

Issue 1965493004: Canonicalize generic types in an isolate specific hash table (Closed)

Created:
4 years, 7 months ago by siva
Modified:
4 years, 7 months ago
Reviewers:
rmacnak, regis, Cutch
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

- Canonicalize generic types in a global isolate hash table, this ensures that we do not linearly walk through a large type list in the class calling the expensive 'Type::Equals' method (some applications have close to 1304 generic types in them) - Use the stand hash table implementation for TypeArguments canonicalization instead of a custom hash table R=johnmccutchan@google.com, regis@google.com, rmacnak@google.com Committed: https://github.com/dart-lang/sdk/commit/5de775a823c6cdd5a1386044eed47da32d84d74d

Patch Set 1 #

Total comments: 4

Patch Set 2 : fix-long-lines #

Patch Set 3 : self-review-comments #

Patch Set 4 : fix-issues #

Patch Set 5 : fix-syntax #

Patch Set 6 : sync-tot #

Total comments: 24

Patch Set 7 : address-code-review-comments #

Total comments: 2

Patch Set 8 : address-code-review-comments #

Patch Set 9 : fix-merge-conflict #

Patch Set 10 : address-merge-conflicts #

Unified diffs Side-by-side diffs Delta from patch set Stats (+495 lines, -492 lines) Patch
M runtime/vm/intrinsifier_arm.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/intrinsifier_arm64.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/intrinsifier_ia32.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/intrinsifier_mips.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/intrinsifier_x64.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/isolate_reload.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/object.h View 1 2 3 4 5 6 7 8 9 17 chunks +111 lines, -21 lines 0 comments Download
M runtime/vm/object.cc View 1 2 3 4 5 6 7 8 31 chunks +153 lines, -370 lines 0 comments Download
M runtime/vm/object_reload.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -4 lines 0 comments Download
M runtime/vm/object_service.cc View 1 2 3 4 5 6 7 8 3 chunks +16 lines, -7 lines 0 comments Download
M runtime/vm/object_store.h View 1 2 chunks +8 lines, -0 lines 0 comments Download
M runtime/vm/object_store.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/precompiler.cc View 1 2 3 4 5 6 2 chunks +54 lines, -67 lines 0 comments Download
M runtime/vm/raw_object.h View 1 2 3 4 5 6 7 8 6 chunks +8 lines, -3 lines 0 comments Download
M runtime/vm/service.cc View 1 2 3 4 5 6 7 8 3 chunks +21 lines, -14 lines 0 comments Download
A runtime/vm/type_table.h View 1 2 3 4 5 6 7 1 chunk +112 lines, -0 lines 0 comments Download
M runtime/vm/vm_sources.gypi View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 14 (5 generated)
regis
I am pretty sure that you traverse the type arguments of recursive types several times. ...
4 years, 7 months ago (2016-05-10 18:14:26 UTC) #2
siva
Addressed your comments and added the isolate canonicalize table. PTAL https://chromiumcodereview.appspot.com/1965493004/diff/1/runtime/vm/object.h File runtime/vm/object.h (right): https://chromiumcodereview.appspot.com/1965493004/diff/1/runtime/vm/object.h#newcode8546 ...
4 years, 7 months ago (2016-05-13 23:16:13 UTC) #5
Cutch
LGTM w.r.t. reload support. Currently we copy the canonical types from the old classes to ...
4 years, 7 months ago (2016-05-16 17:01:57 UTC) #7
rmacnak
lgtm https://chromiumcodereview.appspot.com/1965493004/diff/100001/runtime/vm/object.cc File runtime/vm/object.cc (right): https://chromiumcodereview.appspot.com/1965493004/diff/100001/runtime/vm/object.cc#newcode3681 runtime/vm/object.cc:3681: if (types.IsNull() || !types.IsArray()) { Never an array ...
4 years, 7 months ago (2016-05-16 19:37:03 UTC) #8
regis
https://chromiumcodereview.appspot.com/1965493004/diff/100001/runtime/vm/object.cc File runtime/vm/object.cc (right): https://chromiumcodereview.appspot.com/1965493004/diff/100001/runtime/vm/object.cc#newcode3642 runtime/vm/object.cc:3642: intptr_t Class::FindCanonicalTypeIndex(const AbstractType& needle) const { This function should ...
4 years, 7 months ago (2016-05-16 20:17:48 UTC) #9
siva
Addressed all comments, PTAL. https://chromiumcodereview.appspot.com/1965493004/diff/100001/runtime/vm/object.cc File runtime/vm/object.cc (right): https://chromiumcodereview.appspot.com/1965493004/diff/100001/runtime/vm/object.cc#newcode3642 runtime/vm/object.cc:3642: intptr_t Class::FindCanonicalTypeIndex(const AbstractType& needle) const ...
4 years, 7 months ago (2016-05-16 23:24:25 UTC) #10
regis
LGTM https://chromiumcodereview.appspot.com/1965493004/diff/120001/runtime/vm/object.cc File runtime/vm/object.cc (right): https://chromiumcodereview.appspot.com/1965493004/diff/120001/runtime/vm/object.cc#newcode17055 runtime/vm/object.cc:17055: return FinalizeHash(result, Type::kHashBits); This is the only place ...
4 years, 7 months ago (2016-05-17 16:55:31 UTC) #11
siva
https://chromiumcodereview.appspot.com/1965493004/diff/120001/runtime/vm/object.cc File runtime/vm/object.cc (right): https://chromiumcodereview.appspot.com/1965493004/diff/120001/runtime/vm/object.cc#newcode17055 runtime/vm/object.cc:17055: return FinalizeHash(result, Type::kHashBits); On 2016/05/17 16:55:30, regis wrote: > ...
4 years, 7 months ago (2016-05-17 21:25:53 UTC) #12
siva
4 years, 7 months ago (2016-05-17 21:35:29 UTC) #14
Message was sent while issue was closed.
Committed patchset #10 (id:180001) manually as
5de775a823c6cdd5a1386044eed47da32d84d74d (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698