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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" 5 #include "src/crankshaft/arm64/lithium-codegen-arm64.h"
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 2898 matching lines...) Expand 10 before | Expand all | Expand 10 after
2909 // is not a smi, since all other non-spec objects have {null} prototypes and 2909 // is not a smi, since all other non-spec objects have {null} prototypes and
2910 // will be ruled out below. 2910 // will be ruled out below.
2911 if (instr->hydrogen()->ObjectNeedsSmiCheck()) { 2911 if (instr->hydrogen()->ObjectNeedsSmiCheck()) {
2912 __ JumpIfSmi(object, instr->FalseLabel(chunk_)); 2912 __ JumpIfSmi(object, instr->FalseLabel(chunk_));
2913 } 2913 }
2914 2914
2915 // Loop through the {object}s prototype chain looking for the {prototype}. 2915 // Loop through the {object}s prototype chain looking for the {prototype}.
2916 __ Ldr(object_map, FieldMemOperand(object, HeapObject::kMapOffset)); 2916 __ Ldr(object_map, FieldMemOperand(object, HeapObject::kMapOffset));
2917 Label loop; 2917 Label loop;
2918 __ Bind(&loop); 2918 __ Bind(&loop);
2919
2920 // Deoptimize if the object needs to be access checked.
2921 __ Ldrb(object_instance_type,
2922 FieldMemOperand(object_map, Map::kBitFieldOffset));
2923 __ Tst(object_instance_type, Operand(1 << Map::kIsAccessCheckNeeded));
2924 DeoptimizeIf(ne, instr, Deoptimizer::kAccessCheck);
2925 // Deoptimize for proxies.
2919 __ CompareInstanceType(object_map, object_instance_type, JS_PROXY_TYPE); 2926 __ CompareInstanceType(object_map, object_instance_type, JS_PROXY_TYPE);
2920 DeoptimizeIf(eq, instr, Deoptimizer::kProxy); 2927 DeoptimizeIf(eq, instr, Deoptimizer::kProxy);
2928
2921 __ Ldr(object_prototype, FieldMemOperand(object_map, Map::kPrototypeOffset)); 2929 __ Ldr(object_prototype, FieldMemOperand(object_map, Map::kPrototypeOffset));
2922 __ Cmp(object_prototype, prototype); 2930 __ Cmp(object_prototype, prototype);
2923 __ B(eq, instr->TrueLabel(chunk_)); 2931 __ B(eq, instr->TrueLabel(chunk_));
2924 __ CompareRoot(object_prototype, Heap::kNullValueRootIndex); 2932 __ CompareRoot(object_prototype, Heap::kNullValueRootIndex);
2925 __ B(eq, instr->FalseLabel(chunk_)); 2933 __ B(eq, instr->FalseLabel(chunk_));
2926 __ Ldr(object_map, FieldMemOperand(object_prototype, HeapObject::kMapOffset)); 2934 __ Ldr(object_map, FieldMemOperand(object_prototype, HeapObject::kMapOffset));
2927 __ B(&loop); 2935 __ B(&loop);
2928 } 2936 }
2929 2937
2930 2938
(...skipping 2885 matching lines...) Expand 10 before | Expand all | Expand 10 after
5816 Handle<ScopeInfo> scope_info = instr->scope_info(); 5824 Handle<ScopeInfo> scope_info = instr->scope_info();
5817 __ Push(scope_info); 5825 __ Push(scope_info);
5818 __ Push(ToRegister(instr->function())); 5826 __ Push(ToRegister(instr->function()));
5819 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5827 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5820 RecordSafepoint(Safepoint::kNoLazyDeopt); 5828 RecordSafepoint(Safepoint::kNoLazyDeopt);
5821 } 5829 }
5822 5830
5823 5831
5824 } // namespace internal 5832 } // namespace internal
5825 } // namespace v8 5833 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698