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_MIPS64 | 8 #if V8_TARGET_ARCH_MIPS64 |
9 | 9 |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 __ LoadRoot(at, Heap::kHashTableMapRootIndex); | 417 __ LoadRoot(at, Heap::kHashTableMapRootIndex); |
418 __ Branch(&probe_dictionary, eq, a4, Operand(at)); | 418 __ Branch(&probe_dictionary, eq, a4, Operand(at)); |
419 | 419 |
420 // The handlers in the stub cache expect a vector and slot. Since we won't | 420 // The handlers in the stub cache expect a vector and slot. Since we won't |
421 // change the IC from any downstream misses, a dummy vector can be used. | 421 // change the IC from any downstream misses, a dummy vector can be used. |
422 Register vector = LoadWithVectorDescriptor::VectorRegister(); | 422 Register vector = LoadWithVectorDescriptor::VectorRegister(); |
423 Register slot = LoadWithVectorDescriptor::SlotRegister(); | 423 Register slot = LoadWithVectorDescriptor::SlotRegister(); |
424 DCHECK(!AreAliased(vector, slot, a4, a5, a6, t1)); | 424 DCHECK(!AreAliased(vector, slot, a4, a5, a6, t1)); |
425 Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast( | 425 Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast( |
426 masm->isolate()->factory()->keyed_load_dummy_vector()); | 426 masm->isolate()->factory()->keyed_load_dummy_vector()); |
427 int int_slot = dummy_vector->GetIndex(FeedbackVectorICSlot(0)); | 427 int slot_index = dummy_vector->GetIndex(FeedbackVectorICSlot(0)); |
428 __ LoadRoot(vector, Heap::kKeyedLoadDummyVectorRootIndex); | 428 __ LoadRoot(vector, Heap::kKeyedLoadDummyVectorRootIndex); |
429 __ li(slot, Operand(Smi::FromInt(int_slot))); | 429 __ li(slot, Operand(Smi::FromInt(slot_index))); |
430 | 430 |
431 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( | 431 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
432 Code::ComputeHandlerFlags(Code::LOAD_IC)); | 432 Code::ComputeHandlerFlags(Code::LOAD_IC)); |
433 masm->isolate()->stub_cache()->GenerateProbe( | 433 masm->isolate()->stub_cache()->GenerateProbe( |
434 masm, Code::LOAD_IC, flags, false, receiver, key, a4, a5, a6, t1); | 434 masm, Code::LOAD_IC, flags, false, receiver, key, a4, a5, a6, t1); |
435 // Cache miss. | 435 // Cache miss. |
436 GenerateMiss(masm); | 436 GenerateMiss(masm); |
437 | 437 |
438 // Do a quick inline probe of the receiver's dictionary, if it | 438 // Do a quick inline probe of the receiver's dictionary, if it |
439 // exists. | 439 // exists. |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 // a0: value. | 657 // a0: value. |
658 // a1: key. | 658 // a1: key. |
659 // a2: receiver. | 659 // a2: receiver. |
660 PropertyICCompiler::GenerateRuntimeSetProperty(masm, language_mode); | 660 PropertyICCompiler::GenerateRuntimeSetProperty(masm, language_mode); |
661 // Never returns to here. | 661 // Never returns to here. |
662 | 662 |
663 __ bind(&maybe_name_key); | 663 __ bind(&maybe_name_key); |
664 __ ld(a4, FieldMemOperand(key, HeapObject::kMapOffset)); | 664 __ ld(a4, FieldMemOperand(key, HeapObject::kMapOffset)); |
665 __ lb(a4, FieldMemOperand(a4, Map::kInstanceTypeOffset)); | 665 __ lb(a4, FieldMemOperand(a4, Map::kInstanceTypeOffset)); |
666 __ JumpIfNotUniqueNameInstanceType(a4, &slow); | 666 __ JumpIfNotUniqueNameInstanceType(a4, &slow); |
| 667 |
| 668 if (FLAG_vector_stores) { |
| 669 // The handlers in the stub cache expect a vector and slot. Since we won't |
| 670 // change the IC from any downstream misses, a dummy vector can be used. |
| 671 Register vector = LoadWithVectorDescriptor::VectorRegister(); |
| 672 Register slot = LoadWithVectorDescriptor::SlotRegister(); |
| 673 DCHECK(!AreAliased(vector, slot, a3, a4, a5, a6)); |
| 674 Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast( |
| 675 masm->isolate()->factory()->keyed_store_dummy_vector()); |
| 676 int slot_index = dummy_vector->GetIndex(FeedbackVectorICSlot(0)); |
| 677 __ LoadRoot(vector, Heap::kKeyedStoreDummyVectorRootIndex); |
| 678 __ li(slot, Operand(Smi::FromInt(slot_index))); |
| 679 } |
| 680 |
667 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( | 681 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
668 Code::ComputeHandlerFlags(Code::STORE_IC)); | 682 Code::ComputeHandlerFlags(Code::STORE_IC)); |
669 masm->isolate()->stub_cache()->GenerateProbe( | 683 masm->isolate()->stub_cache()->GenerateProbe( |
670 masm, Code::STORE_IC, flags, false, receiver, key, a3, a4, a5, a6); | 684 masm, Code::STORE_IC, flags, false, receiver, key, a3, a4, a5, a6); |
671 // Cache miss. | 685 // Cache miss. |
672 __ Branch(&miss); | 686 __ Branch(&miss); |
673 | 687 |
674 // Extra capacity case: Check if there is extra capacity to | 688 // Extra capacity case: Check if there is extra capacity to |
675 // perform the store and update the length. Used for adding one | 689 // perform the store and update the length. Used for adding one |
676 // element to the array by writing to array[array.length]. | 690 // element to the array by writing to array[array.length]. |
(...skipping 190 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_MIPS64 | 890 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |