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_PPC | 5 #if V8_TARGET_ARCH_PPC |
6 | 6 |
7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
8 #include "src/ic/ic.h" | 8 #include "src/ic/ic.h" |
9 #include "src/ic/ic-compiler.h" | 9 #include "src/ic/ic-compiler.h" |
10 #include "src/ic/stub-cache.h" | 10 #include "src/ic/stub-cache.h" |
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
681 DCHECK(!AreAliased(vector, slot, r8, r9, r10, r11)); | 681 DCHECK(!AreAliased(vector, slot, r8, r9, r10, r11)); |
682 Handle<TypeFeedbackVector> dummy_vector = | 682 Handle<TypeFeedbackVector> dummy_vector = |
683 TypeFeedbackVector::DummyVector(masm->isolate()); | 683 TypeFeedbackVector::DummyVector(masm->isolate()); |
684 int slot_index = dummy_vector->GetIndex( | 684 int slot_index = dummy_vector->GetIndex( |
685 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot)); | 685 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot)); |
686 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); | 686 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); |
687 __ LoadSmiLiteral(slot, Smi::FromInt(slot_index)); | 687 __ LoadSmiLiteral(slot, Smi::FromInt(slot_index)); |
688 | 688 |
689 Code::Flags flags = | 689 Code::Flags flags = |
690 Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(Code::STORE_IC)); | 690 Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(Code::STORE_IC)); |
691 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::STORE_IC, flags, | 691 masm->isolate()->stub_cache()->GenerateProbe( |
692 receiver, key, r8, r9, r10, r11); | 692 masm, Code::KEYED_STORE_IC, flags, receiver, key, r8, r9, r10, r11); |
693 // Cache miss. | 693 // Cache miss. |
694 __ b(&miss); | 694 __ b(&miss); |
695 | 695 |
696 // Extra capacity case: Check if there is extra capacity to | 696 // Extra capacity case: Check if there is extra capacity to |
697 // perform the store and update the length. Used for adding one | 697 // perform the store and update the length. Used for adding one |
698 // element to the array by writing to array[array.length]. | 698 // element to the array by writing to array[array.length]. |
699 __ bind(&extra); | 699 __ bind(&extra); |
700 // Condition code from comparing key and array length is still available. | 700 // Condition code from comparing key and array length is still available. |
701 __ bne(&slow); // Only support writing to writing to array[array.length]. | 701 __ bne(&slow); // Only support writing to writing to array[array.length]. |
702 // Check for room in the elements backing store. | 702 // Check for room in the elements backing store. |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
887 patcher.EmitCondition(ne); | 887 patcher.EmitCondition(ne); |
888 } else { | 888 } else { |
889 DCHECK(Assembler::GetCondition(branch_instr) == ne); | 889 DCHECK(Assembler::GetCondition(branch_instr) == ne); |
890 patcher.EmitCondition(eq); | 890 patcher.EmitCondition(eq); |
891 } | 891 } |
892 } | 892 } |
893 } // namespace internal | 893 } // namespace internal |
894 } // namespace v8 | 894 } // namespace v8 |
895 | 895 |
896 #endif // V8_TARGET_ARCH_PPC | 896 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |