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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 DCHECK(!AreAliased(receiver, scratch)); | 256 DCHECK(!AreAliased(receiver, scratch)); |
257 DCHECK(!AreAliased(value(), scratch)); | 257 DCHECK(!AreAliased(value(), scratch)); |
258 // Call the JavaScript setter with receiver and value on the stack. | 258 // Call the JavaScript setter with receiver and value on the stack. |
259 if (map->IsJSGlobalObjectMap()) { | 259 if (map->IsJSGlobalObjectMap()) { |
260 // Swap in the global receiver. | 260 // Swap in the global receiver. |
261 __ Ldr(scratch, | 261 __ Ldr(scratch, |
262 FieldMemOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); | 262 FieldMemOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); |
263 receiver = scratch; | 263 receiver = scratch; |
264 } | 264 } |
265 __ Push(receiver, value()); | 265 __ Push(receiver, value()); |
266 ParameterCount actual(1); | |
267 ParameterCount expected(expected_arguments); | |
268 __ LoadAccessor(x1, holder, accessor_index, ACCESSOR_SETTER); | 266 __ LoadAccessor(x1, holder, accessor_index, ACCESSOR_SETTER); |
269 __ InvokeFunction(x1, expected, actual, CALL_FUNCTION, | 267 __ Mov(x0, 1); |
270 CheckDebugStepCallWrapper()); | 268 __ Call(masm->isolate()->builtins()->CallFunction( |
| 269 ConvertReceiverMode::kNotNullOrUndefined), |
| 270 RelocInfo::CODE_TARGET); |
271 } else { | 271 } else { |
272 // If we generate a global code snippet for deoptimization only, remember | 272 // If we generate a global code snippet for deoptimization only, remember |
273 // the place to continue after deoptimization. | 273 // the place to continue after deoptimization. |
274 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); | 274 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); |
275 } | 275 } |
276 | 276 |
277 // We have to return the passed value, not the return value of the setter. | 277 // We have to return the passed value, not the return value of the setter. |
278 __ Pop(x0); | 278 __ Pop(x0); |
279 | 279 |
280 // Restore context register. | 280 // Restore context register. |
(...skipping 16 matching lines...) Expand all Loading... |
297 DCHECK(!AreAliased(holder, scratch)); | 297 DCHECK(!AreAliased(holder, scratch)); |
298 DCHECK(!AreAliased(receiver, scratch)); | 298 DCHECK(!AreAliased(receiver, scratch)); |
299 // Call the JavaScript getter with the receiver on the stack. | 299 // Call the JavaScript getter with the receiver on the stack. |
300 if (map->IsJSGlobalObjectMap()) { | 300 if (map->IsJSGlobalObjectMap()) { |
301 // Swap in the global receiver. | 301 // Swap in the global receiver. |
302 __ Ldr(scratch, | 302 __ Ldr(scratch, |
303 FieldMemOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); | 303 FieldMemOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); |
304 receiver = scratch; | 304 receiver = scratch; |
305 } | 305 } |
306 __ Push(receiver); | 306 __ Push(receiver); |
307 ParameterCount actual(0); | |
308 ParameterCount expected(expected_arguments); | |
309 __ LoadAccessor(x1, holder, accessor_index, ACCESSOR_GETTER); | 307 __ LoadAccessor(x1, holder, accessor_index, ACCESSOR_GETTER); |
310 __ InvokeFunction(x1, expected, actual, CALL_FUNCTION, | 308 __ Mov(x0, 0); |
311 CheckDebugStepCallWrapper()); | 309 __ Call(masm->isolate()->builtins()->CallFunction( |
| 310 ConvertReceiverMode::kNotNullOrUndefined), |
| 311 RelocInfo::CODE_TARGET); |
312 } else { | 312 } else { |
313 // If we generate a global code snippet for deoptimization only, remember | 313 // If we generate a global code snippet for deoptimization only, remember |
314 // the place to continue after deoptimization. | 314 // the place to continue after deoptimization. |
315 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); | 315 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); |
316 } | 316 } |
317 | 317 |
318 // Restore context register. | 318 // Restore context register. |
319 __ Pop(cp); | 319 __ Pop(cp); |
320 } | 320 } |
321 __ Ret(); | 321 __ Ret(); |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
784 // Return the generated code. | 784 // Return the generated code. |
785 return GetCode(kind(), Code::FAST, name); | 785 return GetCode(kind(), Code::FAST, name); |
786 } | 786 } |
787 | 787 |
788 | 788 |
789 #undef __ | 789 #undef __ |
790 } // namespace internal | 790 } // namespace internal |
791 } // namespace v8 | 791 } // namespace v8 |
792 | 792 |
793 #endif // V8_TARGET_ARCH_IA32 | 793 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |