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