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

Unified Diff: src/ic/x64/ic-compiler-x64.cc

Issue 753993003: Use weak cells in map checks in polymorphic ICs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/ic/x64/ic-compiler-x64.cc
diff --git a/src/ic/x64/ic-compiler-x64.cc b/src/ic/x64/ic-compiler-x64.cc
index a5848b6dda231369ee78e984bf8542de1487027c..11e6a09ea65dee382a67cb08ef91c690b6a9d7ef 100644
--- a/src/ic/x64/ic-compiler-x64.cc
+++ b/src/ic/x64/ic-compiler-x64.cc
@@ -107,10 +107,11 @@ Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types,
for (int current = 0; current < receiver_count; ++current) {
Handle<HeapType> type = types->at(current);
Handle<Map> map = IC::TypeToMap(*type, isolate());
+ Handle<WeakCell> cell = Map::WeakCellForMap(map);
if (!map->is_deprecated()) {
number_of_handled_maps++;
// Check map and tail call if there's a match
- __ Cmp(map_reg, map);
+ __ CmpWeakValue(map_reg, scratch2(), cell);
if (type->Is(HeapType::Number())) {
DCHECK(!number_case.is_unused());
__ bind(&number_case);

Powered by Google App Engine
This is Rietveld 408576698