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

Unified Diff: src/crankshaft/x64/lithium-codegen-x64.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/x64/lithium-codegen-x64.cc
diff --git a/src/crankshaft/x64/lithium-codegen-x64.cc b/src/crankshaft/x64/lithium-codegen-x64.cc
index 7dab9f4322a6a89387f94935da363e344e35006d..03c047d4e3da50805536f1f90e072f2704a4cea7 100644
--- a/src/crankshaft/x64/lithium-codegen-x64.cc
+++ b/src/crankshaft/x64/lithium-codegen-x64.cc
@@ -2599,8 +2599,16 @@ void LCodeGen::DoHasInPrototypeChainAndBranch(
__ movp(object_map, FieldOperand(object, HeapObject::kMapOffset));
Label loop;
__ bind(&loop);
+
+
+ // Deoptimize if the object needs to be access checked.
+ __ testb(FieldOperand(object_map, Map::kBitFieldOffset),
+ Immediate(1 << Map::kIsAccessCheckNeeded));
+ DeoptimizeIf(not_zero, instr, Deoptimizer::kAccessCheck);
+ // Deoptimize for proxies.
__ CmpInstanceType(object_map, JS_PROXY_TYPE);
DeoptimizeIf(equal, instr, Deoptimizer::kProxy);
+
__ movp(object_prototype, FieldOperand(object_map, Map::kPrototypeOffset));
__ cmpp(object_prototype, prototype);
EmitTrueBranch(instr, equal);
« no previous file with comments | « src/crankshaft/ia32/lithium-codegen-ia32.cc ('k') | src/deoptimizer.h » ('j') | src/prototype.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698