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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 DCHECK(!receiver.is(scratch_in)); | 235 DCHECK(!receiver.is(scratch_in)); |
236 __ push(receiver); | 236 __ push(receiver); |
237 // Write the arguments to stack frame. | 237 // Write the arguments to stack frame. |
238 if (is_store) { | 238 if (is_store) { |
239 DCHECK(!receiver.is(store_parameter)); | 239 DCHECK(!receiver.is(store_parameter)); |
240 DCHECK(!scratch_in.is(store_parameter)); | 240 DCHECK(!scratch_in.is(store_parameter)); |
241 __ push(store_parameter); | 241 __ push(store_parameter); |
242 } | 242 } |
243 DCHECK(optimization.is_simple_api_call()); | 243 DCHECK(optimization.is_simple_api_call()); |
244 | 244 |
245 // Abi for CallApiCallbackStub. | 245 // Abi for CallApiFunctionStub. |
246 Register callee = a0; | 246 Register callee = a0; |
247 Register data = t0; | 247 Register data = t0; |
248 Register holder = a2; | 248 Register holder = a2; |
249 Register api_function_address = a1; | 249 Register api_function_address = a1; |
250 | 250 |
251 // Put callee in place. | 251 // Put callee in place. |
252 __ LoadAccessor(callee, accessor_holder, accessor_index, | 252 __ LoadAccessor(callee, accessor_holder, accessor_index, |
253 is_store ? ACCESSOR_SETTER : ACCESSOR_GETTER); | 253 is_store ? ACCESSOR_SETTER : ACCESSOR_GETTER); |
254 | 254 |
255 // Put holder in place. | 255 // Put holder in place. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 return; | 302 return; |
303 } | 303 } |
304 // Put api_function_address in place. | 304 // Put api_function_address in place. |
305 Address function_address = v8::ToCData<Address>(api_call_info->callback()); | 305 Address function_address = v8::ToCData<Address>(api_call_info->callback()); |
306 ApiFunction fun(function_address); | 306 ApiFunction fun(function_address); |
307 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; | 307 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; |
308 ExternalReference ref = ExternalReference(&fun, type, masm->isolate()); | 308 ExternalReference ref = ExternalReference(&fun, type, masm->isolate()); |
309 __ li(api_function_address, Operand(ref)); | 309 __ li(api_function_address, Operand(ref)); |
310 | 310 |
311 // Jump to stub. | 311 // Jump to stub. |
312 CallApiCallbackStub stub(isolate, is_store, call_data_undefined, | 312 CallApiAccessorStub stub(isolate, is_store, call_data_undefined, |
313 !optimization.is_constant_call()); | 313 !optimization.is_constant_call()); |
314 __ TailCallStub(&stub); | 314 __ TailCallStub(&stub); |
315 } | 315 } |
316 | 316 |
317 | 317 |
318 static void StoreIC_PushArgs(MacroAssembler* masm) { | 318 static void StoreIC_PushArgs(MacroAssembler* masm) { |
319 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), | 319 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), |
320 StoreDescriptor::ValueRegister(), | 320 StoreDescriptor::ValueRegister(), |
321 VectorStoreICDescriptor::SlotRegister(), | 321 VectorStoreICDescriptor::SlotRegister(), |
322 VectorStoreICDescriptor::VectorRegister()); | 322 VectorStoreICDescriptor::VectorRegister()); |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 // Return the generated code. | 791 // Return the generated code. |
792 return GetCode(kind(), Code::NORMAL, name); | 792 return GetCode(kind(), Code::NORMAL, name); |
793 } | 793 } |
794 | 794 |
795 | 795 |
796 #undef __ | 796 #undef __ |
797 } // namespace internal | 797 } // namespace internal |
798 } // namespace v8 | 798 } // namespace v8 |
799 | 799 |
800 #endif // V8_TARGET_ARCH_MIPS | 800 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |