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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
8 | 8 |
9 #include "src/ic/call-optimization.h" | 9 #include "src/ic/call-optimization.h" |
10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 | 307 |
308 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow); | 308 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow); |
309 | 309 |
310 // Miss case, call the runtime. | 310 // Miss case, call the runtime. |
311 __ bind(&miss); | 311 __ bind(&miss); |
312 | 312 |
313 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 313 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
314 } | 314 } |
315 | 315 |
316 | 316 |
| 317 void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) { |
| 318 // Push receiver, key and value for runtime call. |
| 319 __ Push(StoreIC::ReceiverRegister(), StoreIC::NameRegister(), |
| 320 StoreIC::ValueRegister()); |
| 321 |
| 322 // The slow case calls into the runtime to complete the store without causing |
| 323 // an IC miss that would otherwise cause a transition to the generic stub. |
| 324 ExternalReference ref = |
| 325 ExternalReference(IC_Utility(IC::kStoreIC_Slow), masm->isolate()); |
| 326 __ TailCallExternalReference(ref, 3, 1); |
| 327 } |
| 328 |
| 329 |
| 330 void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) { |
| 331 // Push receiver, key and value for runtime call. |
| 332 __ Push(StoreIC::ReceiverRegister(), StoreIC::NameRegister(), |
| 333 StoreIC::ValueRegister()); |
| 334 |
| 335 // The slow case calls into the runtime to complete the store without causing |
| 336 // an IC miss that would otherwise cause a transition to the generic stub. |
| 337 ExternalReference ref = |
| 338 ExternalReference(IC_Utility(IC::kKeyedStoreIC_Slow), masm->isolate()); |
| 339 __ TailCallExternalReference(ref, 3, 1); |
| 340 } |
| 341 |
| 342 |
317 #undef __ | 343 #undef __ |
318 #define __ ACCESS_MASM(masm()) | 344 #define __ ACCESS_MASM(masm()) |
319 | 345 |
320 | 346 |
321 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, | 347 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, |
322 Handle<Name> name) { | 348 Handle<Name> name) { |
323 if (!label->is_unused()) { | 349 if (!label->is_unused()) { |
324 __ bind(label); | 350 __ bind(label); |
325 __ mov(this->name(), Operand(name)); | 351 __ mov(this->name(), Operand(name)); |
326 } | 352 } |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
831 // Return the generated code. | 857 // Return the generated code. |
832 return GetCode(kind(), Code::NORMAL, name); | 858 return GetCode(kind(), Code::NORMAL, name); |
833 } | 859 } |
834 | 860 |
835 | 861 |
836 #undef __ | 862 #undef __ |
837 } | 863 } |
838 } // namespace v8::internal | 864 } // namespace v8::internal |
839 | 865 |
840 #endif // V8_TARGET_ARCH_ARM | 866 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |