| 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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 __ LoadRoot(at, Heap::kHashTableMapRootIndex); | 419 __ LoadRoot(at, Heap::kHashTableMapRootIndex); |
| 420 __ Branch(&probe_dictionary, eq, t0, Operand(at)); | 420 __ Branch(&probe_dictionary, eq, t0, Operand(at)); |
| 421 | 421 |
| 422 // The handlers in the stub cache expect a vector and slot. Since we won't | 422 // The handlers in the stub cache expect a vector and slot. Since we won't |
| 423 // change the IC from any downstream misses, a dummy vector can be used. | 423 // change the IC from any downstream misses, a dummy vector can be used. |
| 424 Register vector = LoadWithVectorDescriptor::VectorRegister(); | 424 Register vector = LoadWithVectorDescriptor::VectorRegister(); |
| 425 Register slot = LoadWithVectorDescriptor::SlotRegister(); | 425 Register slot = LoadWithVectorDescriptor::SlotRegister(); |
| 426 DCHECK(!AreAliased(vector, slot, t0, t1, t2, t5)); | 426 DCHECK(!AreAliased(vector, slot, t0, t1, t2, t5)); |
| 427 Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast( | 427 Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast( |
| 428 masm->isolate()->factory()->keyed_load_dummy_vector()); | 428 masm->isolate()->factory()->keyed_load_dummy_vector()); |
| 429 int int_slot = dummy_vector->GetIndex(FeedbackVectorICSlot(0)); | 429 int slot_index = dummy_vector->GetIndex(FeedbackVectorICSlot(0)); |
| 430 __ LoadRoot(vector, Heap::kKeyedLoadDummyVectorRootIndex); | 430 __ LoadRoot(vector, Heap::kKeyedLoadDummyVectorRootIndex); |
| 431 __ li(slot, Operand(Smi::FromInt(int_slot))); | 431 __ li(slot, Operand(Smi::FromInt(slot_index))); |
| 432 | 432 |
| 433 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( | 433 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
| 434 Code::ComputeHandlerFlags(Code::LOAD_IC)); | 434 Code::ComputeHandlerFlags(Code::LOAD_IC)); |
| 435 masm->isolate()->stub_cache()->GenerateProbe( | 435 masm->isolate()->stub_cache()->GenerateProbe( |
| 436 masm, Code::LOAD_IC, flags, false, receiver, key, t0, t1, t2, t5); | 436 masm, Code::LOAD_IC, flags, false, receiver, key, t0, t1, t2, t5); |
| 437 // Cache miss. | 437 // Cache miss. |
| 438 GenerateMiss(masm); | 438 GenerateMiss(masm); |
| 439 | 439 |
| 440 // Do a quick inline probe of the receiver's dictionary, if it | 440 // Do a quick inline probe of the receiver's dictionary, if it |
| 441 // exists. | 441 // exists. |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 // a0: value. | 655 // a0: value. |
| 656 // a1: key. | 656 // a1: key. |
| 657 // a2: receiver. | 657 // a2: receiver. |
| 658 PropertyICCompiler::GenerateRuntimeSetProperty(masm, language_mode); | 658 PropertyICCompiler::GenerateRuntimeSetProperty(masm, language_mode); |
| 659 // Never returns to here. | 659 // Never returns to here. |
| 660 | 660 |
| 661 __ bind(&maybe_name_key); | 661 __ bind(&maybe_name_key); |
| 662 __ lw(t0, FieldMemOperand(key, HeapObject::kMapOffset)); | 662 __ lw(t0, FieldMemOperand(key, HeapObject::kMapOffset)); |
| 663 __ lb(t0, FieldMemOperand(t0, Map::kInstanceTypeOffset)); | 663 __ lb(t0, FieldMemOperand(t0, Map::kInstanceTypeOffset)); |
| 664 __ JumpIfNotUniqueNameInstanceType(t0, &slow); | 664 __ JumpIfNotUniqueNameInstanceType(t0, &slow); |
| 665 |
| 666 if (FLAG_vector_stores) { |
| 667 // The handlers in the stub cache expect a vector and slot. Since we won't |
| 668 // change the IC from any downstream misses, a dummy vector can be used. |
| 669 Register vector = VectorStoreICDescriptor::VectorRegister(); |
| 670 Register slot = VectorStoreICDescriptor::SlotRegister(); |
| 671 DCHECK(!AreAliased(vector, slot, a3, t0, t1, t2)); |
| 672 Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast( |
| 673 masm->isolate()->factory()->keyed_store_dummy_vector()); |
| 674 int slot_index = dummy_vector->GetIndex(FeedbackVectorICSlot(0)); |
| 675 __ LoadRoot(vector, Heap::kKeyedStoreDummyVectorRootIndex); |
| 676 __ li(slot, Operand(Smi::FromInt(slot_index))); |
| 677 } |
| 678 |
| 665 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( | 679 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
| 666 Code::ComputeHandlerFlags(Code::STORE_IC)); | 680 Code::ComputeHandlerFlags(Code::STORE_IC)); |
| 667 masm->isolate()->stub_cache()->GenerateProbe( | 681 masm->isolate()->stub_cache()->GenerateProbe( |
| 668 masm, Code::STORE_IC, flags, false, receiver, key, a3, t0, t1, t2); | 682 masm, Code::STORE_IC, flags, false, receiver, key, a3, t0, t1, t2); |
| 669 // Cache miss. | 683 // Cache miss. |
| 670 __ Branch(&miss); | 684 __ Branch(&miss); |
| 671 | 685 |
| 672 // Extra capacity case: Check if there is extra capacity to | 686 // Extra capacity case: Check if there is extra capacity to |
| 673 // perform the store and update the length. Used for adding one | 687 // perform the store and update the length. Used for adding one |
| 674 // element to the array by writing to array[array.length]. | 688 // element to the array by writing to array[array.length]. |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 867 patcher.ChangeBranchCondition(ne); | 881 patcher.ChangeBranchCondition(ne); |
| 868 } else { | 882 } else { |
| 869 DCHECK(Assembler::IsBne(branch_instr)); | 883 DCHECK(Assembler::IsBne(branch_instr)); |
| 870 patcher.ChangeBranchCondition(eq); | 884 patcher.ChangeBranchCondition(eq); |
| 871 } | 885 } |
| 872 } | 886 } |
| 873 } // namespace internal | 887 } // namespace internal |
| 874 } // namespace v8 | 888 } // namespace v8 |
| 875 | 889 |
| 876 #endif // V8_TARGET_ARCH_MIPS | 890 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |