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

Side by Side Diff: src/crankshaft/x87/lithium-codegen-x87.cc

Issue 1534663002: X87: [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: 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/crankshaft/x87/lithium-codegen-x87.h" 7 #include "src/crankshaft/x87/lithium-codegen-x87.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 2805 matching lines...) Expand 10 before | Expand all | Expand 10 after
2816 // will be ruled out below. 2816 // will be ruled out below.
2817 if (instr->hydrogen()->ObjectNeedsSmiCheck()) { 2817 if (instr->hydrogen()->ObjectNeedsSmiCheck()) {
2818 __ test(object, Immediate(kSmiTagMask)); 2818 __ test(object, Immediate(kSmiTagMask));
2819 EmitFalseBranch(instr, zero); 2819 EmitFalseBranch(instr, zero);
2820 } 2820 }
2821 2821
2822 // Loop through the {object}s prototype chain looking for the {prototype}. 2822 // Loop through the {object}s prototype chain looking for the {prototype}.
2823 __ mov(object_map, FieldOperand(object, HeapObject::kMapOffset)); 2823 __ mov(object_map, FieldOperand(object, HeapObject::kMapOffset));
2824 Label loop; 2824 Label loop;
2825 __ bind(&loop); 2825 __ bind(&loop);
2826
2827 // Deoptimize if the object needs to be access checked.
2828 __ test_b(FieldOperand(object_map, Map::kBitFieldOffset),
2829 1 << Map::kIsAccessCheckNeeded);
2830 DeoptimizeIf(not_zero, instr, Deoptimizer::kAccessCheck);
2831 // Deoptimize for proxies.
2826 __ CmpInstanceType(object_map, JS_PROXY_TYPE); 2832 __ CmpInstanceType(object_map, JS_PROXY_TYPE);
2827 DeoptimizeIf(equal, instr, Deoptimizer::kProxy); 2833 DeoptimizeIf(equal, instr, Deoptimizer::kProxy);
2834
2828 __ mov(object_prototype, FieldOperand(object_map, Map::kPrototypeOffset)); 2835 __ mov(object_prototype, FieldOperand(object_map, Map::kPrototypeOffset));
2829 __ cmp(object_prototype, prototype); 2836 __ cmp(object_prototype, prototype);
2830 EmitTrueBranch(instr, equal); 2837 EmitTrueBranch(instr, equal);
2831 __ cmp(object_prototype, factory()->null_value()); 2838 __ cmp(object_prototype, factory()->null_value());
2832 EmitFalseBranch(instr, equal); 2839 EmitFalseBranch(instr, equal);
2833 __ mov(object_map, FieldOperand(object_prototype, HeapObject::kMapOffset)); 2840 __ mov(object_map, FieldOperand(object_prototype, HeapObject::kMapOffset));
2834 __ jmp(&loop); 2841 __ jmp(&loop);
2835 } 2842 }
2836 2843
2837 2844
(...skipping 3230 matching lines...) Expand 10 before | Expand all | Expand 10 after
6068 RecordSafepoint(Safepoint::kNoLazyDeopt); 6075 RecordSafepoint(Safepoint::kNoLazyDeopt);
6069 } 6076 }
6070 6077
6071 6078
6072 #undef __ 6079 #undef __
6073 6080
6074 } // namespace internal 6081 } // namespace internal
6075 } // namespace v8 6082 } // namespace v8
6076 6083
6077 #endif // V8_TARGET_ARCH_X87 6084 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698