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

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

Issue 2503453002: [arm64] Change comparison to CBNZ in PropertyHandlerCompiler::CheckPrototypes. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/arm64/handler-compiler-arm64.cc
diff --git a/src/ic/arm64/handler-compiler-arm64.cc b/src/ic/arm64/handler-compiler-arm64.cc
index cf644fc2add69d1d414681513a080cbcfdbb239b..58d0bb74461bc5ddcbf84278f4f5fe0ab54f2117 100644
--- a/src/ic/arm64/handler-compiler-arm64.cc
+++ b/src/ic/arm64/handler-compiler-arm64.cc
@@ -478,8 +478,10 @@ Register PropertyHandlerCompiler::CheckPrototypes(
DCHECK_EQ(Smi::FromInt(Map::kPrototypeChainValid), validity_cell->value());
__ Mov(scratch1, Operand(validity_cell));
__ Ldr(scratch1, FieldMemOperand(scratch1, Cell::kValueOffset));
- __ Cmp(scratch1, Operand(Smi::FromInt(Map::kPrototypeChainValid)));
- __ B(ne, miss);
+ // Compare scratch1 against Map::kPrototypeChainValid.
+ static_assert(Map::kPrototypeChainValid == 0,
+ "Map::kPrototypeChainValid has unexpected value");
+ __ Cbnz(scratch1, miss);
}
// Keep track of the current object in register reg.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698