| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_S390 | 5 #if V8_TARGET_ARCH_S390 |
| 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 24 matching lines...) Expand all Loading... |
| 35 DCHECK(!holder.is(scratch)); | 35 DCHECK(!holder.is(scratch)); |
| 36 DCHECK(!receiver.is(scratch)); | 36 DCHECK(!receiver.is(scratch)); |
| 37 // Call the JavaScript getter with the receiver on the stack. | 37 // Call the JavaScript getter with the receiver on the stack. |
| 38 if (map->IsJSGlobalObjectMap()) { | 38 if (map->IsJSGlobalObjectMap()) { |
| 39 // Swap in the global receiver. | 39 // Swap in the global receiver. |
| 40 __ LoadP(scratch, | 40 __ LoadP(scratch, |
| 41 FieldMemOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); | 41 FieldMemOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); |
| 42 receiver = scratch; | 42 receiver = scratch; |
| 43 } | 43 } |
| 44 __ Push(receiver); | 44 __ Push(receiver); |
| 45 ParameterCount actual(0); | |
| 46 ParameterCount expected(expected_arguments); | |
| 47 __ LoadAccessor(r3, holder, accessor_index, ACCESSOR_GETTER); | 45 __ LoadAccessor(r3, holder, accessor_index, ACCESSOR_GETTER); |
| 48 __ InvokeFunction(r3, expected, actual, CALL_FUNCTION, | 46 __ LoadImmP(r2, Operand(0)); |
| 49 CheckDebugStepCallWrapper()); | 47 __ Call(masm->isolate()->builtins()->CallFunction( |
| 48 ConvertReceiverMode::kNotNullOrUndefined), |
| 49 RelocInfo::CODE_TARGET); |
| 50 } else { | 50 } else { |
| 51 // If we generate a global code snippet for deoptimization only, remember | 51 // If we generate a global code snippet for deoptimization only, remember |
| 52 // the place to continue after deoptimization. | 52 // the place to continue after deoptimization. |
| 53 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); | 53 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); |
| 54 } | 54 } |
| 55 | 55 |
| 56 // Restore context register. | 56 // Restore context register. |
| 57 __ pop(cp); | 57 __ pop(cp); |
| 58 } | 58 } |
| 59 __ Ret(); | 59 __ Ret(); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 77 DCHECK(!receiver.is(scratch)); | 77 DCHECK(!receiver.is(scratch)); |
| 78 DCHECK(!value().is(scratch)); | 78 DCHECK(!value().is(scratch)); |
| 79 // Call the JavaScript setter with receiver and value on the stack. | 79 // Call the JavaScript setter with receiver and value on the stack. |
| 80 if (map->IsJSGlobalObjectMap()) { | 80 if (map->IsJSGlobalObjectMap()) { |
| 81 // Swap in the global receiver. | 81 // Swap in the global receiver. |
| 82 __ LoadP(scratch, | 82 __ LoadP(scratch, |
| 83 FieldMemOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); | 83 FieldMemOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); |
| 84 receiver = scratch; | 84 receiver = scratch; |
| 85 } | 85 } |
| 86 __ Push(receiver, value()); | 86 __ Push(receiver, value()); |
| 87 ParameterCount actual(1); | |
| 88 ParameterCount expected(expected_arguments); | |
| 89 __ LoadAccessor(r3, holder, accessor_index, ACCESSOR_SETTER); | 87 __ LoadAccessor(r3, holder, accessor_index, ACCESSOR_SETTER); |
| 90 __ InvokeFunction(r3, expected, actual, CALL_FUNCTION, | 88 __ LoadImmP(r2, Operand(1)); |
| 91 CheckDebugStepCallWrapper()); | 89 __ Call(masm->isolate()->builtins()->CallFunction( |
| 90 ConvertReceiverMode::kNotNullOrUndefined), |
| 91 RelocInfo::CODE_TARGET); |
| 92 } else { | 92 } else { |
| 93 // If we generate a global code snippet for deoptimization only, remember | 93 // If we generate a global code snippet for deoptimization only, remember |
| 94 // the place to continue after deoptimization. | 94 // the place to continue after deoptimization. |
| 95 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); | 95 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); |
| 96 } | 96 } |
| 97 | 97 |
| 98 // We have to return the passed value, not the return value of the setter. | 98 // We have to return the passed value, not the return value of the setter. |
| 99 // Restore context register. | 99 // Restore context register. |
| 100 __ Pop(cp, r2); | 100 __ Pop(cp, r2); |
| 101 } | 101 } |
| (...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 741 | 741 |
| 742 // Return the generated code. | 742 // Return the generated code. |
| 743 return GetCode(kind(), Code::NORMAL, name); | 743 return GetCode(kind(), Code::NORMAL, name); |
| 744 } | 744 } |
| 745 | 745 |
| 746 #undef __ | 746 #undef __ |
| 747 } // namespace internal | 747 } // namespace internal |
| 748 } // namespace v8 | 748 } // namespace v8 |
| 749 | 749 |
| 750 #endif // V8_TARGET_ARCH_ARM | 750 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |