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

Unified Diff: src/ic/mips64/handler-compiler-mips64.cc

Issue 853713002: Make map check in NamedStoreHandlerCompiler::GenerateFieldTypeChecks weak. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix mips64 Created 5 years, 11 months 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
« no previous file with comments | « src/ic/mips/handler-compiler-mips.cc ('k') | src/ic/x64/handler-compiler-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/mips64/handler-compiler-mips64.cc
diff --git a/src/ic/mips64/handler-compiler-mips64.cc b/src/ic/mips64/handler-compiler-mips64.cc
index d3b861bc254b6193f195dedcf7b2a9084d77c9c3..00f77825bf6bc8a9a5c1392f09b36153033fe01f 100644
--- a/src/ic/mips64/handler-compiler-mips64.cc
+++ b/src/ic/mips64/handler-compiler-mips64.cc
@@ -371,21 +371,24 @@ void NamedStoreHandlerCompiler::GenerateConstantCheck(Register map_reg,
void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type,
Register value_reg,
Label* miss_label) {
+ Register map_reg = scratch1();
+ Register scratch = scratch2();
+ DCHECK(!value_reg.is(map_reg));
+ DCHECK(!value_reg.is(scratch));
__ JumpIfSmi(value_reg, miss_label);
HeapType::Iterator<Map> it = field_type->Classes();
if (!it.Done()) {
- __ ld(scratch1(), FieldMemOperand(value_reg, HeapObject::kMapOffset));
+ __ ld(map_reg, FieldMemOperand(value_reg, HeapObject::kMapOffset));
Label do_store;
- Handle<Map> current;
while (true) {
- // Do the CompareMap() directly within the Branch() functions.
- current = it.Current();
+ // Compare map directly within the Branch() functions.
it.Advance();
+ __ GetWeakValue(scratch, Map::WeakCellForMap(it.Current()));
if (it.Done()) {
- __ Branch(miss_label, ne, scratch1(), Operand(current));
+ __ Branch(miss_label, ne, map_reg, Operand(scratch));
break;
}
- __ Branch(&do_store, eq, scratch1(), Operand(current));
+ __ Branch(&do_store, eq, map_reg, Operand(scratch));
}
__ bind(&do_store);
}
« no previous file with comments | « src/ic/mips/handler-compiler-mips.cc ('k') | src/ic/x64/handler-compiler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698