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_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/field-type.h" | 9 #include "src/field-type.h" |
10 #include "src/ic/call-optimization.h" | 10 #include "src/ic/call-optimization.h" |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 DCHECK(!receiver.is(scratch_in)); | 246 DCHECK(!receiver.is(scratch_in)); |
247 __ push(receiver); | 247 __ push(receiver); |
248 // Write the arguments to stack frame. | 248 // Write the arguments to stack frame. |
249 if (is_store) { | 249 if (is_store) { |
250 DCHECK(!receiver.is(store_parameter)); | 250 DCHECK(!receiver.is(store_parameter)); |
251 DCHECK(!scratch_in.is(store_parameter)); | 251 DCHECK(!scratch_in.is(store_parameter)); |
252 __ push(store_parameter); | 252 __ push(store_parameter); |
253 } | 253 } |
254 DCHECK(optimization.is_simple_api_call()); | 254 DCHECK(optimization.is_simple_api_call()); |
255 | 255 |
256 // Abi for CallApiFunctionStub. | 256 // Abi for CallApiCallbackStub. |
257 Register callee = r0; | 257 Register callee = r0; |
258 Register data = r4; | 258 Register data = r4; |
259 Register holder = r2; | 259 Register holder = r2; |
260 Register api_function_address = r1; | 260 Register api_function_address = r1; |
261 | 261 |
262 // Put callee in place. | 262 // Put callee in place. |
263 __ LoadAccessor(callee, accessor_holder, accessor_index, | 263 __ LoadAccessor(callee, accessor_holder, accessor_index, |
264 is_store ? ACCESSOR_SETTER : ACCESSOR_GETTER); | 264 is_store ? ACCESSOR_SETTER : ACCESSOR_GETTER); |
265 | 265 |
266 // Put holder in place. | 266 // Put holder in place. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 } | 315 } |
316 | 316 |
317 // Put api_function_address in place. | 317 // Put api_function_address in place. |
318 Address function_address = v8::ToCData<Address>(api_call_info->callback()); | 318 Address function_address = v8::ToCData<Address>(api_call_info->callback()); |
319 ApiFunction fun(function_address); | 319 ApiFunction fun(function_address); |
320 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; | 320 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; |
321 ExternalReference ref = ExternalReference(&fun, type, masm->isolate()); | 321 ExternalReference ref = ExternalReference(&fun, type, masm->isolate()); |
322 __ mov(api_function_address, Operand(ref)); | 322 __ mov(api_function_address, Operand(ref)); |
323 | 323 |
324 // Jump to stub. | 324 // Jump to stub. |
325 CallApiAccessorStub stub(isolate, is_store, call_data_undefined, | 325 CallApiCallbackStub stub(isolate, is_store, call_data_undefined, |
326 !optimization.is_constant_call()); | 326 !optimization.is_constant_call()); |
327 __ TailCallStub(&stub); | 327 __ TailCallStub(&stub); |
328 } | 328 } |
329 | 329 |
330 | 330 |
331 static void StoreIC_PushArgs(MacroAssembler* masm) { | 331 static void StoreIC_PushArgs(MacroAssembler* masm) { |
332 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), | 332 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), |
333 StoreDescriptor::ValueRegister(), | 333 StoreDescriptor::ValueRegister(), |
334 VectorStoreICDescriptor::SlotRegister(), | 334 VectorStoreICDescriptor::SlotRegister(), |
335 VectorStoreICDescriptor::VectorRegister()); | 335 VectorStoreICDescriptor::VectorRegister()); |
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
797 // Return the generated code. | 797 // Return the generated code. |
798 return GetCode(kind(), Code::NORMAL, name); | 798 return GetCode(kind(), Code::NORMAL, name); |
799 } | 799 } |
800 | 800 |
801 | 801 |
802 #undef __ | 802 #undef __ |
803 } // namespace internal | 803 } // namespace internal |
804 } // namespace v8 | 804 } // namespace v8 |
805 | 805 |
806 #endif // V8_TARGET_ARCH_ARM | 806 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |