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

Unified Diff: src/crankshaft/arm64/lithium-codegen-arm64.cc

Issue 1492983002: [crankshaft] Deoptimize if HHasInPrototypeChainAndBranch hits a proxy. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/crankshaft/arm64/lithium-arm64.cc ('k') | src/crankshaft/hydrogen-instructions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/arm64/lithium-codegen-arm64.cc
diff --git a/src/crankshaft/arm64/lithium-codegen-arm64.cc b/src/crankshaft/arm64/lithium-codegen-arm64.cc
index 05023ddedfe131d02373fab56ac5a6818be5fd51..8dcfd2e534fe3a82b9dd7337e1497e81178a1e9b 100644
--- a/src/crankshaft/arm64/lithium-codegen-arm64.cc
+++ b/src/crankshaft/arm64/lithium-codegen-arm64.cc
@@ -2959,7 +2959,8 @@ void LCodeGen::DoInstanceOf(LInstanceOf* instr) {
void LCodeGen::DoHasInPrototypeChainAndBranch(
LHasInPrototypeChainAndBranch* instr) {
Register const object = ToRegister(instr->object());
- Register const object_map = ToRegister(instr->scratch());
+ Register const object_map = ToRegister(instr->scratch1());
+ Register const object_instance_type = ToRegister(instr->scratch2());
Register const object_prototype = object_map;
Register const prototype = ToRegister(instr->prototype());
@@ -2974,6 +2975,8 @@ void LCodeGen::DoHasInPrototypeChainAndBranch(
__ Ldr(object_map, FieldMemOperand(object, HeapObject::kMapOffset));
Label loop;
__ Bind(&loop);
+ __ CompareInstanceType(object_map, object_instance_type, JS_PROXY_TYPE);
+ DeoptimizeIf(eq, instr, Deoptimizer::kProxy);
__ Ldr(object_prototype, FieldMemOperand(object_map, Map::kPrototypeOffset));
__ Cmp(object_prototype, prototype);
__ B(eq, instr->TrueLabel(chunk_));
« no previous file with comments | « src/crankshaft/arm64/lithium-arm64.cc ('k') | src/crankshaft/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698