| 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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
| 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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 Register vector = LoadWithVectorDescriptor::VectorRegister(); | 412 Register vector = LoadWithVectorDescriptor::VectorRegister(); |
| 413 Register slot = LoadWithVectorDescriptor::SlotRegister(); | 413 Register slot = LoadWithVectorDescriptor::SlotRegister(); |
| 414 DCHECK(!AreAliased(vector, slot, t0, t1, t2, t5)); | 414 DCHECK(!AreAliased(vector, slot, t0, t1, t2, t5)); |
| 415 Handle<TypeFeedbackVector> dummy_vector = | 415 Handle<TypeFeedbackVector> dummy_vector = |
| 416 TypeFeedbackVector::DummyVector(masm->isolate()); | 416 TypeFeedbackVector::DummyVector(masm->isolate()); |
| 417 int slot_index = dummy_vector->GetIndex( | 417 int slot_index = dummy_vector->GetIndex( |
| 418 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedLoadICSlot)); | 418 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedLoadICSlot)); |
| 419 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); | 419 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); |
| 420 __ li(slot, Operand(Smi::FromInt(slot_index))); | 420 __ li(slot, Operand(Smi::FromInt(slot_index))); |
| 421 | 421 |
| 422 Code::Flags flags = | 422 masm->isolate()->load_stub_cache()->GenerateProbe(masm, receiver, key, t0, t1, |
| 423 Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(Code::LOAD_IC)); | 423 t2, t5); |
| 424 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::KEYED_LOAD_IC, flags, | |
| 425 receiver, key, t0, t1, t2, t5); | |
| 426 // Cache miss. | 424 // Cache miss. |
| 427 GenerateMiss(masm); | 425 GenerateMiss(masm); |
| 428 | 426 |
| 429 // Do a quick inline probe of the receiver's dictionary, if it | 427 // Do a quick inline probe of the receiver's dictionary, if it |
| 430 // exists. | 428 // exists. |
| 431 __ bind(&probe_dictionary); | 429 __ bind(&probe_dictionary); |
| 432 // a3: elements | 430 // a3: elements |
| 433 __ lw(a0, FieldMemOperand(receiver, HeapObject::kMapOffset)); | 431 __ lw(a0, FieldMemOperand(receiver, HeapObject::kMapOffset)); |
| 434 __ lbu(a0, FieldMemOperand(a0, Map::kInstanceTypeOffset)); | 432 __ lbu(a0, FieldMemOperand(a0, Map::kInstanceTypeOffset)); |
| 435 GenerateGlobalInstanceTypeCheck(masm, a0, &slow); | 433 GenerateGlobalInstanceTypeCheck(masm, a0, &slow); |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 Register vector = VectorStoreICDescriptor::VectorRegister(); | 653 Register vector = VectorStoreICDescriptor::VectorRegister(); |
| 656 Register slot = VectorStoreICDescriptor::SlotRegister(); | 654 Register slot = VectorStoreICDescriptor::SlotRegister(); |
| 657 DCHECK(!AreAliased(vector, slot, t1, t2, t4, t5)); | 655 DCHECK(!AreAliased(vector, slot, t1, t2, t4, t5)); |
| 658 Handle<TypeFeedbackVector> dummy_vector = | 656 Handle<TypeFeedbackVector> dummy_vector = |
| 659 TypeFeedbackVector::DummyVector(masm->isolate()); | 657 TypeFeedbackVector::DummyVector(masm->isolate()); |
| 660 int slot_index = dummy_vector->GetIndex( | 658 int slot_index = dummy_vector->GetIndex( |
| 661 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot)); | 659 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot)); |
| 662 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); | 660 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); |
| 663 __ li(slot, Operand(Smi::FromInt(slot_index))); | 661 __ li(slot, Operand(Smi::FromInt(slot_index))); |
| 664 | 662 |
| 665 Code::Flags flags = | 663 masm->isolate()->store_stub_cache()->GenerateProbe(masm, receiver, key, t1, |
| 666 Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(Code::STORE_IC)); | 664 t2, t4, t5); |
| 667 masm->isolate()->stub_cache()->GenerateProbe( | |
| 668 masm, Code::KEYED_STORE_IC, flags, receiver, key, t1, t2, t4, t5); | |
| 669 // Cache miss. | 665 // Cache miss. |
| 670 __ Branch(&miss); | 666 __ Branch(&miss); |
| 671 | 667 |
| 672 // Extra capacity case: Check if there is extra capacity to | 668 // Extra capacity case: Check if there is extra capacity to |
| 673 // perform the store and update the length. Used for adding one | 669 // perform the store and update the length. Used for adding one |
| 674 // element to the array by writing to array[array.length]. | 670 // element to the array by writing to array[array.length]. |
| 675 __ bind(&extra); | 671 __ bind(&extra); |
| 676 // Condition code from comparing key and array length is still available. | 672 // Condition code from comparing key and array length is still available. |
| 677 // Only support writing to array[array.length]. | 673 // Only support writing to array[array.length]. |
| 678 __ Branch(&slow, ne, key, Operand(t0)); | 674 __ Branch(&slow, ne, key, Operand(t0)); |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 883 break; | 879 break; |
| 884 default: | 880 default: |
| 885 UNIMPLEMENTED(); | 881 UNIMPLEMENTED(); |
| 886 } | 882 } |
| 887 patcher.ChangeBranchCondition(branch_instr, opcode); | 883 patcher.ChangeBranchCondition(branch_instr, opcode); |
| 888 } | 884 } |
| 889 } // namespace internal | 885 } // namespace internal |
| 890 } // namespace v8 | 886 } // namespace v8 |
| 891 | 887 |
| 892 #endif // V8_TARGET_ARCH_MIPS | 888 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |