OLD | NEW |
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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
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 Loading... |
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 __ ld(scratch, | 41 __ ld(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(a1, holder, accessor_index, ACCESSOR_GETTER); | 46 __ LoadAccessor(a1, holder, accessor_index, ACCESSOR_GETTER); |
49 __ InvokeFunction(a1, expected, actual, CALL_FUNCTION, | 47 __ li(a0, Operand(V8_INT64_C(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 17 matching lines...) Expand all Loading... |
78 DCHECK(!receiver.is(scratch)); | 78 DCHECK(!receiver.is(scratch)); |
79 DCHECK(!value().is(scratch)); | 79 DCHECK(!value().is(scratch)); |
80 // Call the JavaScript setter with receiver and value on the stack. | 80 // Call the JavaScript setter with receiver and value on the stack. |
81 if (map->IsJSGlobalObjectMap()) { | 81 if (map->IsJSGlobalObjectMap()) { |
82 // Swap in the global receiver. | 82 // Swap in the global receiver. |
83 __ ld(scratch, | 83 __ ld(scratch, |
84 FieldMemOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); | 84 FieldMemOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); |
85 receiver = scratch; | 85 receiver = scratch; |
86 } | 86 } |
87 __ Push(receiver, value()); | 87 __ Push(receiver, value()); |
88 ParameterCount actual(1); | |
89 ParameterCount expected(expected_arguments); | |
90 __ LoadAccessor(a1, holder, accessor_index, ACCESSOR_SETTER); | 88 __ LoadAccessor(a1, holder, accessor_index, ACCESSOR_SETTER); |
91 __ InvokeFunction(a1, expected, actual, CALL_FUNCTION, | 89 __ li(a0, Operand(1)); |
92 CheckDebugStepCallWrapper()); | 90 __ Call(masm->isolate()->builtins()->CallFunction( |
| 91 ConvertReceiverMode::kNotNullOrUndefined), |
| 92 RelocInfo::CODE_TARGET); |
93 } else { | 93 } else { |
94 // If we generate a global code snippet for deoptimization only, remember | 94 // If we generate a global code snippet for deoptimization only, remember |
95 // the place to continue after deoptimization. | 95 // the place to continue after deoptimization. |
96 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); | 96 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); |
97 } | 97 } |
98 | 98 |
99 // We have to return the passed value, not the return value of the setter. | 99 // We have to return the passed value, not the return value of the setter. |
100 // Restore context register. | 100 // Restore context register. |
101 __ Pop(cp, v0); | 101 __ Pop(cp, v0); |
102 } | 102 } |
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
780 // Return the generated code. | 780 // Return the generated code. |
781 return GetCode(kind(), Code::NORMAL, name); | 781 return GetCode(kind(), Code::NORMAL, name); |
782 } | 782 } |
783 | 783 |
784 | 784 |
785 #undef __ | 785 #undef __ |
786 } // namespace internal | 786 } // namespace internal |
787 } // namespace v8 | 787 } // namespace v8 |
788 | 788 |
789 #endif // V8_TARGET_ARCH_MIPS64 | 789 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |