| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/ic/ic.h" | 10 #include "src/ic/ic.h" |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 r3); | 580 r3); |
| 581 __ Ret(); | 581 __ Ret(); |
| 582 | 582 |
| 583 __ bind(&index_name); | 583 __ bind(&index_name); |
| 584 __ IndexFromHash(r3, key); | 584 __ IndexFromHash(r3, key); |
| 585 // Now jump to the place where smi keys are handled. | 585 // Now jump to the place where smi keys are handled. |
| 586 __ jmp(&index_smi); | 586 __ jmp(&index_smi); |
| 587 } | 587 } |
| 588 | 588 |
| 589 | 589 |
| 590 void KeyedLoadIC::GenerateString(MacroAssembler* masm) { | |
| 591 // Return address is in lr. | |
| 592 Label miss; | |
| 593 | |
| 594 Register receiver = LoadDescriptor::ReceiverRegister(); | |
| 595 Register index = LoadDescriptor::NameRegister(); | |
| 596 Register scratch = r3; | |
| 597 Register result = r0; | |
| 598 DCHECK(!scratch.is(receiver) && !scratch.is(index)); | |
| 599 | |
| 600 StringCharAtGenerator char_at_generator(receiver, index, scratch, result, | |
| 601 &miss, // When not a string. | |
| 602 &miss, // When not a number. | |
| 603 &miss, // When index out of range. | |
| 604 STRING_INDEX_IS_ARRAY_INDEX); | |
| 605 char_at_generator.GenerateFast(masm); | |
| 606 __ Ret(); | |
| 607 | |
| 608 StubRuntimeCallHelper call_helper; | |
| 609 char_at_generator.GenerateSlow(masm, call_helper); | |
| 610 | |
| 611 __ bind(&miss); | |
| 612 GenerateMiss(masm); | |
| 613 } | |
| 614 | |
| 615 | |
| 616 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { | 590 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { |
| 617 // Push receiver, key and value for runtime call. | 591 // Push receiver, key and value for runtime call. |
| 618 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), | 592 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), |
| 619 StoreDescriptor::ValueRegister()); | 593 StoreDescriptor::ValueRegister()); |
| 620 | 594 |
| 621 ExternalReference ref = | 595 ExternalReference ref = |
| 622 ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate()); | 596 ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate()); |
| 623 __ TailCallExternalReference(ref, 3, 1); | 597 __ TailCallExternalReference(ref, 3, 1); |
| 624 } | 598 } |
| 625 | 599 |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1010 patcher.EmitCondition(ne); | 984 patcher.EmitCondition(ne); |
| 1011 } else { | 985 } else { |
| 1012 DCHECK(Assembler::GetCondition(branch_instr) == ne); | 986 DCHECK(Assembler::GetCondition(branch_instr) == ne); |
| 1013 patcher.EmitCondition(eq); | 987 patcher.EmitCondition(eq); |
| 1014 } | 988 } |
| 1015 } | 989 } |
| 1016 } | 990 } |
| 1017 } // namespace v8::internal | 991 } // namespace v8::internal |
| 1018 | 992 |
| 1019 #endif // V8_TARGET_ARCH_ARM | 993 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |