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_X64 | 7 #if V8_TARGET_ARCH_X64 |
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 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 __ bind(&slow_with_tagged_index); | 582 __ bind(&slow_with_tagged_index); |
583 PropertyICCompiler::GenerateRuntimeSetProperty(masm, strict_mode); | 583 PropertyICCompiler::GenerateRuntimeSetProperty(masm, strict_mode); |
584 // Never returns to here. | 584 // Never returns to here. |
585 | 585 |
586 __ bind(&maybe_name_key); | 586 __ bind(&maybe_name_key); |
587 __ movp(r9, FieldOperand(key, HeapObject::kMapOffset)); | 587 __ movp(r9, FieldOperand(key, HeapObject::kMapOffset)); |
588 __ movzxbp(r9, FieldOperand(r9, Map::kInstanceTypeOffset)); | 588 __ movzxbp(r9, FieldOperand(r9, Map::kInstanceTypeOffset)); |
589 __ JumpIfNotUniqueNameInstanceType(r9, &slow_with_tagged_index); | 589 __ JumpIfNotUniqueNameInstanceType(r9, &slow_with_tagged_index); |
590 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( | 590 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
591 Code::ComputeHandlerFlags(Code::STORE_IC)); | 591 Code::ComputeHandlerFlags(Code::STORE_IC)); |
592 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, false, receiver, | 592 masm->isolate()->stub_cache()->GenerateProbe( |
593 key, rbx, no_reg); | 593 masm, Code::STORE_IC, flags, false, receiver, key, rbx, no_reg); |
594 // Cache miss. | 594 // Cache miss. |
595 __ jmp(&miss); | 595 __ jmp(&miss); |
596 | 596 |
597 // Extra capacity case: Check if there is extra capacity to | 597 // Extra capacity case: Check if there is extra capacity to |
598 // perform the store and update the length. Used for adding one | 598 // perform the store and update the length. Used for adding one |
599 // element to the array by writing to array[array.length]. | 599 // element to the array by writing to array[array.length]. |
600 __ bind(&extra); | 600 __ bind(&extra); |
601 // receiver is a JSArray. | 601 // receiver is a JSArray. |
602 // rbx: receiver's elements array (a FixedArray) | 602 // rbx: receiver's elements array (a FixedArray) |
603 // flags: smicompare (receiver.length(), rbx) | 603 // flags: smicompare (receiver.length(), rbx) |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
851 } | 851 } |
852 | 852 |
853 | 853 |
854 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { | 854 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { |
855 // The return address is on the stack. | 855 // The return address is on the stack. |
856 | 856 |
857 // Get the receiver from the stack and probe the stub cache. | 857 // Get the receiver from the stack and probe the stub cache. |
858 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( | 858 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
859 Code::ComputeHandlerFlags(Code::STORE_IC)); | 859 Code::ComputeHandlerFlags(Code::STORE_IC)); |
860 masm->isolate()->stub_cache()->GenerateProbe( | 860 masm->isolate()->stub_cache()->GenerateProbe( |
861 masm, flags, false, StoreDescriptor::ReceiverRegister(), | 861 masm, Code::STORE_IC, flags, false, StoreDescriptor::ReceiverRegister(), |
862 StoreDescriptor::NameRegister(), rbx, no_reg); | 862 StoreDescriptor::NameRegister(), rbx, no_reg); |
863 | 863 |
864 // Cache miss: Jump to runtime. | 864 // Cache miss: Jump to runtime. |
865 GenerateMiss(masm); | 865 GenerateMiss(masm); |
866 } | 866 } |
867 | 867 |
868 | 868 |
869 static void StoreIC_PushArgs(MacroAssembler* masm) { | 869 static void StoreIC_PushArgs(MacroAssembler* masm) { |
870 Register receiver = StoreDescriptor::ReceiverRegister(); | 870 Register receiver = StoreDescriptor::ReceiverRegister(); |
871 Register name = StoreDescriptor::NameRegister(); | 871 Register name = StoreDescriptor::NameRegister(); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
990 Condition cc = | 990 Condition cc = |
991 (check == ENABLE_INLINED_SMI_CHECK) | 991 (check == ENABLE_INLINED_SMI_CHECK) |
992 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) | 992 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) |
993 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); | 993 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); |
994 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 994 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
995 } | 995 } |
996 } | 996 } |
997 } // namespace v8::internal | 997 } // namespace v8::internal |
998 | 998 |
999 #endif // V8_TARGET_ARCH_X64 | 999 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |