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 #if V8_TARGET_ARCH_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 DCHECK(!AreAliased(vector, slot, a4, a5, a6, t1)); | 413 DCHECK(!AreAliased(vector, slot, a4, a5, a6, t1)); |
414 Handle<TypeFeedbackVector> dummy_vector = | 414 Handle<TypeFeedbackVector> dummy_vector = |
415 TypeFeedbackVector::DummyVector(masm->isolate()); | 415 TypeFeedbackVector::DummyVector(masm->isolate()); |
416 int slot_index = dummy_vector->GetIndex( | 416 int slot_index = dummy_vector->GetIndex( |
417 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedLoadICSlot)); | 417 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedLoadICSlot)); |
418 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); | 418 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); |
419 __ li(slot, Operand(Smi::FromInt(slot_index))); | 419 __ li(slot, Operand(Smi::FromInt(slot_index))); |
420 | 420 |
421 Code::Flags flags = | 421 Code::Flags flags = |
422 Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(Code::LOAD_IC)); | 422 Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(Code::LOAD_IC)); |
423 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::LOAD_IC, flags, | 423 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::KEYED_LOAD_IC, flags, |
424 receiver, key, a4, a5, a6, t1); | 424 receiver, key, a4, a5, a6, t1); |
425 // Cache miss. | 425 // Cache miss. |
426 GenerateMiss(masm); | 426 GenerateMiss(masm); |
427 | 427 |
428 // Do a quick inline probe of the receiver's dictionary, if it | 428 // Do a quick inline probe of the receiver's dictionary, if it |
429 // exists. | 429 // exists. |
430 __ bind(&probe_dictionary); | 430 __ bind(&probe_dictionary); |
431 // a3: elements | 431 // a3: elements |
432 __ ld(a0, FieldMemOperand(receiver, HeapObject::kMapOffset)); | 432 __ ld(a0, FieldMemOperand(receiver, HeapObject::kMapOffset)); |
433 __ lbu(a0, FieldMemOperand(a0, Map::kInstanceTypeOffset)); | 433 __ lbu(a0, FieldMemOperand(a0, Map::kInstanceTypeOffset)); |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 DCHECK(!AreAliased(vector, slot, a5, a6, a7, t0)); | 662 DCHECK(!AreAliased(vector, slot, a5, a6, a7, t0)); |
663 Handle<TypeFeedbackVector> dummy_vector = | 663 Handle<TypeFeedbackVector> dummy_vector = |
664 TypeFeedbackVector::DummyVector(masm->isolate()); | 664 TypeFeedbackVector::DummyVector(masm->isolate()); |
665 int slot_index = dummy_vector->GetIndex( | 665 int slot_index = dummy_vector->GetIndex( |
666 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot)); | 666 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot)); |
667 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); | 667 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); |
668 __ li(slot, Operand(Smi::FromInt(slot_index))); | 668 __ li(slot, Operand(Smi::FromInt(slot_index))); |
669 | 669 |
670 Code::Flags flags = | 670 Code::Flags flags = |
671 Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(Code::STORE_IC)); | 671 Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(Code::STORE_IC)); |
672 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::STORE_IC, flags, | 672 masm->isolate()->stub_cache()->GenerateProbe( |
673 receiver, key, a5, a6, a7, t0); | 673 masm, Code::KEYED_STORE_IC, flags, receiver, key, a5, a6, a7, t0); |
674 // Cache miss. | 674 // Cache miss. |
675 __ Branch(&miss); | 675 __ Branch(&miss); |
676 | 676 |
677 // Extra capacity case: Check if there is extra capacity to | 677 // Extra capacity case: Check if there is extra capacity to |
678 // perform the store and update the length. Used for adding one | 678 // perform the store and update the length. Used for adding one |
679 // element to the array by writing to array[array.length]. | 679 // element to the array by writing to array[array.length]. |
680 __ bind(&extra); | 680 __ bind(&extra); |
681 // Condition code from comparing key and array length is still available. | 681 // Condition code from comparing key and array length is still available. |
682 // Only support writing to array[array.length]. | 682 // Only support writing to array[array.length]. |
683 __ Branch(&slow, ne, key, Operand(a4)); | 683 __ Branch(&slow, ne, key, Operand(a4)); |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
904 break; | 904 break; |
905 default: | 905 default: |
906 UNIMPLEMENTED(); | 906 UNIMPLEMENTED(); |
907 } | 907 } |
908 patcher.ChangeBranchCondition(branch_instr, opcode); | 908 patcher.ChangeBranchCondition(branch_instr, opcode); |
909 } | 909 } |
910 } // namespace internal | 910 } // namespace internal |
911 } // namespace v8 | 911 } // namespace v8 |
912 | 912 |
913 #endif // V8_TARGET_ARCH_MIPS64 | 913 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |