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/api-arguments.h" | 9 #include "src/api-arguments.h" |
10 #include "src/field-type.h" | 10 #include "src/field-type.h" |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; | 323 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; |
324 ExternalReference ref = ExternalReference(&fun, type, masm->isolate()); | 324 ExternalReference ref = ExternalReference(&fun, type, masm->isolate()); |
325 __ mov(api_function_address, Operand(ref)); | 325 __ mov(api_function_address, Operand(ref)); |
326 | 326 |
327 // Jump to stub. | 327 // Jump to stub. |
328 CallApiCallbackStub stub(isolate, is_store, call_data_undefined, | 328 CallApiCallbackStub stub(isolate, is_store, call_data_undefined, |
329 !optimization.is_constant_call()); | 329 !optimization.is_constant_call()); |
330 __ TailCallStub(&stub); | 330 __ TailCallStub(&stub); |
331 } | 331 } |
332 | 332 |
333 | |
334 static void StoreIC_PushArgs(MacroAssembler* masm) { | |
335 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), | |
336 StoreDescriptor::ValueRegister(), | |
337 StoreWithVectorDescriptor::SlotRegister(), | |
338 StoreWithVectorDescriptor::VectorRegister()); | |
339 } | |
340 | |
341 | |
342 void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) { | |
343 StoreIC_PushArgs(masm); | |
344 | |
345 // The slow case calls into the runtime to complete the store without causing | |
346 // an IC miss that would otherwise cause a transition to the generic stub. | |
347 __ TailCallRuntime(Runtime::kKeyedStoreIC_Slow); | |
348 } | |
349 | |
350 | |
351 #undef __ | 333 #undef __ |
352 #define __ ACCESS_MASM(masm()) | 334 #define __ ACCESS_MASM(masm()) |
353 | 335 |
354 | 336 |
355 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, | 337 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, |
356 Handle<Name> name) { | 338 Handle<Name> name) { |
357 if (!label->is_unused()) { | 339 if (!label->is_unused()) { |
358 __ bind(label); | 340 __ bind(label); |
359 __ mov(this->name(), Operand(name)); | 341 __ mov(this->name(), Operand(name)); |
360 } | 342 } |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 // Return the generated code. | 679 // Return the generated code. |
698 return GetCode(kind(), name); | 680 return GetCode(kind(), name); |
699 } | 681 } |
700 | 682 |
701 | 683 |
702 #undef __ | 684 #undef __ |
703 } // namespace internal | 685 } // namespace internal |
704 } // namespace v8 | 686 } // namespace v8 |
705 | 687 |
706 #endif // V8_TARGET_ARCH_ARM | 688 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |