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 | 5 |
6 #include "src/v8.h" | 6 #include "src/v8.h" |
7 | 7 |
8 #if V8_TARGET_ARCH_MIPS | 8 #if V8_TARGET_ARCH_MIPS |
9 | 9 |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 __ lw(a3, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); | 429 __ lw(a3, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); |
430 __ lw(t0, FieldMemOperand(a3, HeapObject::kMapOffset)); | 430 __ lw(t0, FieldMemOperand(a3, HeapObject::kMapOffset)); |
431 __ LoadRoot(at, Heap::kHashTableMapRootIndex); | 431 __ LoadRoot(at, Heap::kHashTableMapRootIndex); |
432 __ Branch(&probe_dictionary, eq, t0, Operand(at)); | 432 __ Branch(&probe_dictionary, eq, t0, Operand(at)); |
433 | 433 |
434 // The handlers in the stub cache expect a vector and slot. Since we won't | 434 // The handlers in the stub cache expect a vector and slot. Since we won't |
435 // change the IC from any downstream misses, a dummy vector can be used. | 435 // change the IC from any downstream misses, a dummy vector can be used. |
436 Register vector = LoadWithVectorDescriptor::VectorRegister(); | 436 Register vector = LoadWithVectorDescriptor::VectorRegister(); |
437 Register slot = LoadWithVectorDescriptor::SlotRegister(); | 437 Register slot = LoadWithVectorDescriptor::SlotRegister(); |
438 DCHECK(!AreAliased(vector, slot, t0, t1, t2, t5)); | 438 DCHECK(!AreAliased(vector, slot, t0, t1, t2, t5)); |
439 Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast( | 439 Handle<TypeFeedbackVector> dummy_vector = |
440 masm->isolate()->factory()->keyed_load_dummy_vector()); | 440 TypeFeedbackVector::DummyVector(masm->isolate()); |
441 int slot_index = dummy_vector->GetIndex(FeedbackVectorICSlot(0)); | 441 int slot_index = dummy_vector->GetIndex( |
442 __ LoadRoot(vector, Heap::kKeyedLoadDummyVectorRootIndex); | 442 FeedbackVectorICSlot(TypeFeedbackVector::kDummyKeyedLoadICSlot)); |
| 443 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); |
443 __ li(slot, Operand(Smi::FromInt(slot_index))); | 444 __ li(slot, Operand(Smi::FromInt(slot_index))); |
444 | 445 |
445 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( | 446 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
446 Code::ComputeHandlerFlags(Code::LOAD_IC)); | 447 Code::ComputeHandlerFlags(Code::LOAD_IC)); |
447 masm->isolate()->stub_cache()->GenerateProbe( | 448 masm->isolate()->stub_cache()->GenerateProbe( |
448 masm, Code::LOAD_IC, flags, false, receiver, key, t0, t1, t2, t5); | 449 masm, Code::LOAD_IC, flags, false, receiver, key, t0, t1, t2, t5); |
449 // Cache miss. | 450 // Cache miss. |
450 GenerateMiss(masm); | 451 GenerateMiss(masm); |
451 | 452 |
452 // Do a quick inline probe of the receiver's dictionary, if it | 453 // Do a quick inline probe of the receiver's dictionary, if it |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 __ lw(t0, FieldMemOperand(key, HeapObject::kMapOffset)); | 678 __ lw(t0, FieldMemOperand(key, HeapObject::kMapOffset)); |
678 __ lb(t0, FieldMemOperand(t0, Map::kInstanceTypeOffset)); | 679 __ lb(t0, FieldMemOperand(t0, Map::kInstanceTypeOffset)); |
679 __ JumpIfNotUniqueNameInstanceType(t0, &slow); | 680 __ JumpIfNotUniqueNameInstanceType(t0, &slow); |
680 | 681 |
681 if (FLAG_vector_stores) { | 682 if (FLAG_vector_stores) { |
682 // The handlers in the stub cache expect a vector and slot. Since we won't | 683 // The handlers in the stub cache expect a vector and slot. Since we won't |
683 // change the IC from any downstream misses, a dummy vector can be used. | 684 // change the IC from any downstream misses, a dummy vector can be used. |
684 Register vector = VectorStoreICDescriptor::VectorRegister(); | 685 Register vector = VectorStoreICDescriptor::VectorRegister(); |
685 Register slot = VectorStoreICDescriptor::SlotRegister(); | 686 Register slot = VectorStoreICDescriptor::SlotRegister(); |
686 DCHECK(!AreAliased(vector, slot, a3, t0, t1, t2)); | 687 DCHECK(!AreAliased(vector, slot, a3, t0, t1, t2)); |
687 Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast( | 688 Handle<TypeFeedbackVector> dummy_vector = |
688 masm->isolate()->factory()->keyed_store_dummy_vector()); | 689 TypeFeedbackVector::DummyVector(masm->isolate()); |
689 int slot_index = dummy_vector->GetIndex(FeedbackVectorICSlot(0)); | 690 int slot_index = dummy_vector->GetIndex( |
690 __ LoadRoot(vector, Heap::kKeyedStoreDummyVectorRootIndex); | 691 FeedbackVectorICSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot)); |
| 692 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); |
691 __ li(slot, Operand(Smi::FromInt(slot_index))); | 693 __ li(slot, Operand(Smi::FromInt(slot_index))); |
692 } | 694 } |
693 | 695 |
694 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( | 696 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
695 Code::ComputeHandlerFlags(Code::STORE_IC)); | 697 Code::ComputeHandlerFlags(Code::STORE_IC)); |
696 masm->isolate()->stub_cache()->GenerateProbe( | 698 masm->isolate()->stub_cache()->GenerateProbe( |
697 masm, Code::STORE_IC, flags, false, receiver, key, a3, t0, t1, t2); | 699 masm, Code::STORE_IC, flags, false, receiver, key, a3, t0, t1, t2); |
698 // Cache miss. | 700 // Cache miss. |
699 __ Branch(&miss); | 701 __ Branch(&miss); |
700 | 702 |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
905 patcher.ChangeBranchCondition(ne); | 907 patcher.ChangeBranchCondition(ne); |
906 } else { | 908 } else { |
907 DCHECK(Assembler::IsBne(branch_instr)); | 909 DCHECK(Assembler::IsBne(branch_instr)); |
908 patcher.ChangeBranchCondition(eq); | 910 patcher.ChangeBranchCondition(eq); |
909 } | 911 } |
910 } | 912 } |
911 } // namespace internal | 913 } // namespace internal |
912 } // namespace v8 | 914 } // namespace v8 |
913 | 915 |
914 #endif // V8_TARGET_ARCH_MIPS | 916 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |