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

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

Issue 1496843004: PPC: [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 | « no previous file | src/crankshaft/ppc/lithium-ppc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/ppc/lithium-codegen-ppc.cc
diff --git a/src/crankshaft/ppc/lithium-codegen-ppc.cc b/src/crankshaft/ppc/lithium-codegen-ppc.cc
index 2b72fd5099c65b80f60697d61e216af60835cdee..89ddd4dac89ce4a09102cbf1ba6ca3eac6b9e8cf 100644
--- a/src/crankshaft/ppc/lithium-codegen-ppc.cc
+++ b/src/crankshaft/ppc/lithium-codegen-ppc.cc
@@ -2756,6 +2756,7 @@ void LCodeGen::DoHasInPrototypeChainAndBranch(
LHasInPrototypeChainAndBranch* instr) {
Register const object = ToRegister(instr->object());
Register const object_map = scratch0();
+ Register const object_instance_type = ip;
Register const object_prototype = object_map;
Register const prototype = ToRegister(instr->prototype());
@@ -2771,6 +2772,8 @@ void LCodeGen::DoHasInPrototypeChainAndBranch(
__ LoadP(object_map, FieldMemOperand(object, HeapObject::kMapOffset));
Label loop;
__ bind(&loop);
+ __ CompareInstanceType(object_map, object_instance_type, JS_PROXY_TYPE);
+ DeoptimizeIf(eq, instr, Deoptimizer::kProxy);
__ LoadP(object_prototype,
FieldMemOperand(object_map, Map::kPrototypeOffset));
__ cmp(object_prototype, prototype);
« no previous file with comments | « no previous file | src/crankshaft/ppc/lithium-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698