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

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

Issue 1845243005: [ic] Use the CallFunction builtin to invoke accessors. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: mips64 fix Created 4 years, 8 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 | « no previous file | src/ic/arm64/handler-compiler-arm64.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_ARM 5 #if V8_TARGET_ARCH_ARM
6 6
7 #include "src/ic/handler-compiler.h" 7 #include "src/ic/handler-compiler.h"
8 8
9 #include "src/api-arguments.h" 9 #include "src/api-arguments.h"
10 #include "src/field-type.h" 10 #include "src/field-type.h"
(...skipping 25 matching lines...) Expand all
36 DCHECK(!holder.is(scratch)); 36 DCHECK(!holder.is(scratch));
37 DCHECK(!receiver.is(scratch)); 37 DCHECK(!receiver.is(scratch));
38 // Call the JavaScript getter with the receiver on the stack. 38 // Call the JavaScript getter with the receiver on the stack.
39 if (map->IsJSGlobalObjectMap()) { 39 if (map->IsJSGlobalObjectMap()) {
40 // Swap in the global receiver. 40 // Swap in the global receiver.
41 __ ldr(scratch, 41 __ ldr(scratch,
42 FieldMemOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); 42 FieldMemOperand(receiver, JSGlobalObject::kGlobalProxyOffset));
43 receiver = scratch; 43 receiver = scratch;
44 } 44 }
45 __ push(receiver); 45 __ push(receiver);
46 ParameterCount actual(0);
47 ParameterCount expected(expected_arguments);
48 __ LoadAccessor(r1, holder, accessor_index, ACCESSOR_GETTER); 46 __ LoadAccessor(r1, holder, accessor_index, ACCESSOR_GETTER);
49 __ InvokeFunction(r1, expected, actual, CALL_FUNCTION, 47 __ mov(r0, Operand(0));
50 CheckDebugStepCallWrapper()); 48 __ Call(masm->isolate()->builtins()->CallFunction(
49 ConvertReceiverMode::kNotNullOrUndefined),
50 RelocInfo::CODE_TARGET);
51 } else { 51 } else {
52 // If we generate a global code snippet for deoptimization only, remember 52 // If we generate a global code snippet for deoptimization only, remember
53 // the place to continue after deoptimization. 53 // the place to continue after deoptimization.
54 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); 54 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset());
55 } 55 }
56 56
57 // Restore context register. 57 // Restore context register.
58 __ pop(cp); 58 __ pop(cp);
59 } 59 }
60 __ Ret(); 60 __ Ret();
(...skipping 19 matching lines...) Expand all
80 DCHECK(!receiver.is(scratch)); 80 DCHECK(!receiver.is(scratch));
81 DCHECK(!value().is(scratch)); 81 DCHECK(!value().is(scratch));
82 // Call the JavaScript setter with receiver and value on the stack. 82 // Call the JavaScript setter with receiver and value on the stack.
83 if (map->IsJSGlobalObjectMap()) { 83 if (map->IsJSGlobalObjectMap()) {
84 // Swap in the global receiver. 84 // Swap in the global receiver.
85 __ ldr(scratch, 85 __ ldr(scratch,
86 FieldMemOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); 86 FieldMemOperand(receiver, JSGlobalObject::kGlobalProxyOffset));
87 receiver = scratch; 87 receiver = scratch;
88 } 88 }
89 __ Push(receiver, value()); 89 __ Push(receiver, value());
90 ParameterCount actual(1);
91 ParameterCount expected(expected_arguments);
92 __ LoadAccessor(r1, holder, accessor_index, ACCESSOR_SETTER); 90 __ LoadAccessor(r1, holder, accessor_index, ACCESSOR_SETTER);
93 __ InvokeFunction(r1, expected, actual, CALL_FUNCTION, 91 __ mov(r0, Operand(1));
94 CheckDebugStepCallWrapper()); 92 __ Call(masm->isolate()->builtins()->CallFunction(
93 ConvertReceiverMode::kNotNullOrUndefined),
94 RelocInfo::CODE_TARGET);
95 } else { 95 } else {
96 // If we generate a global code snippet for deoptimization only, remember 96 // If we generate a global code snippet for deoptimization only, remember
97 // the place to continue after deoptimization. 97 // the place to continue after deoptimization.
98 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); 98 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset());
99 } 99 }
100 100
101 // We have to return the passed value, not the return value of the setter. 101 // We have to return the passed value, not the return value of the setter.
102 __ pop(r0); 102 __ pop(r0);
103 103
104 // Restore context register. 104 // Restore context register.
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 // Return the generated code. 786 // Return the generated code.
787 return GetCode(kind(), Code::NORMAL, name); 787 return GetCode(kind(), Code::NORMAL, name);
788 } 788 }
789 789
790 790
791 #undef __ 791 #undef __
792 } // namespace internal 792 } // namespace internal
793 } // namespace v8 793 } // namespace v8
794 794
795 #endif // V8_TARGET_ARCH_ARM 795 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ic/arm64/handler-compiler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698