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/call-optimization.h" | 7 #include "src/ic/call-optimization.h" |
8 #include "src/ic/handler-compiler.h" | 8 #include "src/ic/handler-compiler.h" |
9 #include "src/ic/ic.h" | 9 #include "src/ic/ic.h" |
10 #include "src/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 ExternalReference ref = ExternalReference(&fun, type, masm->isolate()); | 300 ExternalReference ref = ExternalReference(&fun, type, masm->isolate()); |
301 __ mov(api_function_address, Operand(ref)); | 301 __ mov(api_function_address, Operand(ref)); |
302 | 302 |
303 // Jump to stub. | 303 // Jump to stub. |
304 CallApiAccessorStub stub(isolate, is_store, call_data_undefined); | 304 CallApiAccessorStub stub(isolate, is_store, call_data_undefined); |
305 __ TailCallStub(&stub); | 305 __ TailCallStub(&stub); |
306 } | 306 } |
307 | 307 |
308 | 308 |
309 static void StoreIC_PushArgs(MacroAssembler* masm) { | 309 static void StoreIC_PushArgs(MacroAssembler* masm) { |
310 if (FLAG_vector_stores) { | 310 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), |
311 __ Push(StoreDescriptor::ReceiverRegister(), | 311 StoreDescriptor::ValueRegister(), |
312 StoreDescriptor::NameRegister(), StoreDescriptor::ValueRegister(), | 312 VectorStoreICDescriptor::SlotRegister(), |
313 VectorStoreICDescriptor::SlotRegister(), | 313 VectorStoreICDescriptor::VectorRegister()); |
314 VectorStoreICDescriptor::VectorRegister()); | |
315 } else { | |
316 __ Push(StoreDescriptor::ReceiverRegister(), | |
317 StoreDescriptor::NameRegister(), StoreDescriptor::ValueRegister()); | |
318 } | |
319 } | 314 } |
320 | 315 |
321 | 316 |
322 void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) { | 317 void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) { |
323 StoreIC_PushArgs(masm); | 318 StoreIC_PushArgs(masm); |
324 | 319 |
325 // The slow case calls into the runtime to complete the store without causing | 320 // The slow case calls into the runtime to complete the store without causing |
326 // an IC miss that would otherwise cause a transition to the generic stub. | 321 // an IC miss that would otherwise cause a transition to the generic stub. |
327 __ TailCallRuntime(Runtime::kStoreIC_Slow, FLAG_vector_stores ? 5 : 3, 1); | 322 __ TailCallRuntime(Runtime::kStoreIC_Slow, 5, 1); |
328 } | 323 } |
329 | 324 |
330 | 325 |
331 void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) { | 326 void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) { |
332 StoreIC_PushArgs(masm); | 327 StoreIC_PushArgs(masm); |
333 | 328 |
334 // The slow case calls into the runtime to complete the store without causing | 329 // The slow case calls into the runtime to complete the store without causing |
335 // an IC miss that would otherwise cause a transition to the generic stub. | 330 // an IC miss that would otherwise cause a transition to the generic stub. |
336 __ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, FLAG_vector_stores ? 5 : 3, | 331 __ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, 5, 1); |
337 1); | |
338 } | 332 } |
339 | 333 |
340 | 334 |
341 #undef __ | 335 #undef __ |
342 #define __ ACCESS_MASM(masm()) | 336 #define __ ACCESS_MASM(masm()) |
343 | 337 |
344 | 338 |
345 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, | 339 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, |
346 Handle<Name> name) { | 340 Handle<Name> name) { |
347 if (!label->is_unused()) { | 341 if (!label->is_unused()) { |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 // Return the generated code. | 784 // Return the generated code. |
791 return GetCode(kind(), Code::NORMAL, name); | 785 return GetCode(kind(), Code::NORMAL, name); |
792 } | 786 } |
793 | 787 |
794 | 788 |
795 #undef __ | 789 #undef __ |
796 } // namespace internal | 790 } // namespace internal |
797 } // namespace v8 | 791 } // namespace v8 |
798 | 792 |
799 #endif // V8_TARGET_ARCH_ARM | 793 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |