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

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

Issue 1521953002: [proxies] fix access issue when having proxies on the prototype-chain of global objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: ppc code mess 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
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 b4c3da411215febd8ca33cad31cf18206387b0e4..d656acedda2cf9c8f2305607051bf2d7bfa69759 100644
--- a/src/crankshaft/arm64/lithium-codegen-arm64.cc
+++ b/src/crankshaft/arm64/lithium-codegen-arm64.cc
@@ -2916,8 +2916,16 @@ void LCodeGen::DoHasInPrototypeChainAndBranch(
__ Ldr(object_map, FieldMemOperand(object, HeapObject::kMapOffset));
Label loop;
__ Bind(&loop);
+
+ // Deoptimize if the object needs to be access checked.
+ __ Ldrb(object_instance_type,
+ FieldMemOperand(object_map, Map::kBitFieldOffset));
+ __ Tst(object_instance_type, Operand(1 << Map::kIsAccessCheckNeeded));
+ DeoptimizeIf(ne, instr, Deoptimizer::kAccessCheck);
+ // Deoptimize for proxies.
__ 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_));

Powered by Google App Engine
This is Rietveld 408576698