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

Side by Side Diff: src/ic/x87/handler-compiler-x87.cc

Issue 1168093002: [strong] Implement strong mode restrictions on property access (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 6 months 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 | « src/ic/x64/ic-x64.cc ('k') | src/ic/x87/ic-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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X87 7 #if V8_TARGET_ARCH_X87
8 8
9 #include "src/ic/call-optimization.h" 9 #include "src/ic/call-optimization.h"
10 #include "src/ic/handler-compiler.h" 10 #include "src/ic/handler-compiler.h"
11 #include "src/ic/ic.h" 11 #include "src/ic/ic.h"
12 12
13 namespace v8 { 13 namespace v8 {
14 namespace internal { 14 namespace internal {
15 15
16 #define __ ACCESS_MASM(masm) 16 #define __ ACCESS_MASM(masm)
17 17
18 18
19 static void LoadIC_PushArgs(MacroAssembler* masm) {
20 Register receiver = LoadDescriptor::ReceiverRegister();
21 Register name = LoadDescriptor::NameRegister();
22
23 DCHECK(!ebx.is(receiver) && !ebx.is(name));
24
25 __ pop(ebx);
26 __ push(receiver);
27 __ push(name);
28 __ push(ebx);
29 }
30
31
32 void NamedLoadHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
33 // Return address is on the stack.
34 LoadIC_PushArgs(masm);
35
36 // Do tail-call to runtime routine.
37 ExternalReference ref(IC_Utility(IC::kLoadIC_Slow), masm->isolate());
38 __ TailCallExternalReference(ref, 2, 1);
39 }
40
41
42 void ElementHandlerCompiler::GenerateLoadSlow(MacroAssembler* masm) {
43 // Return address is on the stack.
44 LoadIC_PushArgs(masm);
45
46 // Do tail-call to runtime routine.
47 ExternalReference ref(IC_Utility(IC::kKeyedLoadIC_Slow), masm->isolate());
48 __ TailCallExternalReference(ref, 2, 1);
49 }
50
51
19 void NamedLoadHandlerCompiler::GenerateLoadViaGetter( 52 void NamedLoadHandlerCompiler::GenerateLoadViaGetter(
20 MacroAssembler* masm, Handle<Map> map, Register receiver, Register holder, 53 MacroAssembler* masm, Handle<Map> map, Register receiver, Register holder,
21 int accessor_index, int expected_arguments, Register scratch) { 54 int accessor_index, int expected_arguments, Register scratch) {
22 { 55 {
23 FrameScope scope(masm, StackFrame::INTERNAL); 56 FrameScope scope(masm, StackFrame::INTERNAL);
24 57
25 if (accessor_index >= 0) { 58 if (accessor_index >= 0) {
26 DCHECK(!holder.is(scratch)); 59 DCHECK(!holder.is(scratch));
27 DCHECK(!receiver.is(scratch)); 60 DCHECK(!receiver.is(scratch));
28 // Call the JavaScript getter with the receiver on the stack. 61 // Call the JavaScript getter with the receiver on the stack.
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 // Return the generated code. 838 // Return the generated code.
806 return GetCode(kind(), Code::NORMAL, name); 839 return GetCode(kind(), Code::NORMAL, name);
807 } 840 }
808 841
809 842
810 #undef __ 843 #undef __
811 } // namespace internal 844 } // namespace internal
812 } // namespace v8 845 } // namespace v8
813 846
814 #endif // V8_TARGET_ARCH_X87 847 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/ic/x64/ic-x64.cc ('k') | src/ic/x87/ic-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698