| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
| 8 | 8 |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/ic/ic.h" | 10 #include "src/ic/ic.h" |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 __ cmp(r4, ip); | 412 __ cmp(r4, ip); |
| 413 __ b(eq, &probe_dictionary); | 413 __ b(eq, &probe_dictionary); |
| 414 | 414 |
| 415 // The handlers in the stub cache expect a vector and slot. Since we won't | 415 // The handlers in the stub cache expect a vector and slot. Since we won't |
| 416 // change the IC from any downstream misses, a dummy vector can be used. | 416 // change the IC from any downstream misses, a dummy vector can be used. |
| 417 Register vector = LoadWithVectorDescriptor::VectorRegister(); | 417 Register vector = LoadWithVectorDescriptor::VectorRegister(); |
| 418 Register slot = LoadWithVectorDescriptor::SlotRegister(); | 418 Register slot = LoadWithVectorDescriptor::SlotRegister(); |
| 419 DCHECK(!AreAliased(vector, slot, r4, r5, r6, r9)); | 419 DCHECK(!AreAliased(vector, slot, r4, r5, r6, r9)); |
| 420 Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast( | 420 Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast( |
| 421 masm->isolate()->factory()->keyed_load_dummy_vector()); | 421 masm->isolate()->factory()->keyed_load_dummy_vector()); |
| 422 int int_slot = dummy_vector->GetIndex(FeedbackVectorICSlot(0)); | 422 int slot_index = dummy_vector->GetIndex(FeedbackVectorICSlot(0)); |
| 423 __ LoadRoot(vector, Heap::kKeyedLoadDummyVectorRootIndex); | 423 __ LoadRoot(vector, Heap::kKeyedLoadDummyVectorRootIndex); |
| 424 __ mov(slot, Operand(Smi::FromInt(int_slot))); | 424 __ mov(slot, Operand(Smi::FromInt(slot_index))); |
| 425 | 425 |
| 426 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( | 426 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
| 427 Code::ComputeHandlerFlags(Code::LOAD_IC)); | 427 Code::ComputeHandlerFlags(Code::LOAD_IC)); |
| 428 masm->isolate()->stub_cache()->GenerateProbe( | 428 masm->isolate()->stub_cache()->GenerateProbe( |
| 429 masm, Code::KEYED_LOAD_IC, flags, false, receiver, key, r4, r5, r6, r9); | 429 masm, Code::KEYED_LOAD_IC, flags, false, receiver, key, r4, r5, r6, r9); |
| 430 // Cache miss. | 430 // Cache miss. |
| 431 GenerateMiss(masm); | 431 GenerateMiss(masm); |
| 432 | 432 |
| 433 // Do a quick inline probe of the receiver's dictionary, if it | 433 // Do a quick inline probe of the receiver's dictionary, if it |
| 434 // exists. | 434 // exists. |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 // r0: value. | 658 // r0: value. |
| 659 // r1: key. | 659 // r1: key. |
| 660 // r2: receiver. | 660 // r2: receiver. |
| 661 PropertyICCompiler::GenerateRuntimeSetProperty(masm, language_mode); | 661 PropertyICCompiler::GenerateRuntimeSetProperty(masm, language_mode); |
| 662 // Never returns to here. | 662 // Never returns to here. |
| 663 | 663 |
| 664 __ bind(&maybe_name_key); | 664 __ bind(&maybe_name_key); |
| 665 __ ldr(r4, FieldMemOperand(key, HeapObject::kMapOffset)); | 665 __ ldr(r4, FieldMemOperand(key, HeapObject::kMapOffset)); |
| 666 __ ldrb(r4, FieldMemOperand(r4, Map::kInstanceTypeOffset)); | 666 __ ldrb(r4, FieldMemOperand(r4, Map::kInstanceTypeOffset)); |
| 667 __ JumpIfNotUniqueNameInstanceType(r4, &slow); | 667 __ JumpIfNotUniqueNameInstanceType(r4, &slow); |
| 668 |
| 669 if (FLAG_vector_stores) { |
| 670 // The handlers in the stub cache expect a vector and slot. Since we won't |
| 671 // change the IC from any downstream misses, a dummy vector can be used. |
| 672 Register vector = VectorStoreICDescriptor::VectorRegister(); |
| 673 Register slot = VectorStoreICDescriptor::SlotRegister(); |
| 674 DCHECK(!AreAliased(vector, slot, r3, r4, r5, r6)); |
| 675 Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast( |
| 676 masm->isolate()->factory()->keyed_store_dummy_vector()); |
| 677 int slot_index = dummy_vector->GetIndex(FeedbackVectorICSlot(0)); |
| 678 __ LoadRoot(vector, Heap::kKeyedStoreDummyVectorRootIndex); |
| 679 __ mov(slot, Operand(Smi::FromInt(slot_index))); |
| 680 } |
| 681 |
| 668 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( | 682 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
| 669 Code::ComputeHandlerFlags(Code::STORE_IC)); | 683 Code::ComputeHandlerFlags(Code::STORE_IC)); |
| 670 masm->isolate()->stub_cache()->GenerateProbe( | 684 masm->isolate()->stub_cache()->GenerateProbe( |
| 671 masm, Code::STORE_IC, flags, false, receiver, key, r3, r4, r5, r6); | 685 masm, Code::STORE_IC, flags, false, receiver, key, r3, r4, r5, r6); |
| 672 // Cache miss. | 686 // Cache miss. |
| 673 __ b(&miss); | 687 __ b(&miss); |
| 674 | 688 |
| 675 // Extra capacity case: Check if there is extra capacity to | 689 // Extra capacity case: Check if there is extra capacity to |
| 676 // perform the store and update the length. Used for adding one | 690 // perform the store and update the length. Used for adding one |
| 677 // element to the array by writing to array[array.length]. | 691 // element to the array by writing to array[array.length]. |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 862 patcher.EmitCondition(ne); | 876 patcher.EmitCondition(ne); |
| 863 } else { | 877 } else { |
| 864 DCHECK(Assembler::GetCondition(branch_instr) == ne); | 878 DCHECK(Assembler::GetCondition(branch_instr) == ne); |
| 865 patcher.EmitCondition(eq); | 879 patcher.EmitCondition(eq); |
| 866 } | 880 } |
| 867 } | 881 } |
| 868 } // namespace internal | 882 } // namespace internal |
| 869 } // namespace v8 | 883 } // namespace v8 |
| 870 | 884 |
| 871 #endif // V8_TARGET_ARCH_ARM | 885 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |