| 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_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 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 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 __ bind(&slow); | 687 __ bind(&slow); |
| 688 PropertyICCompiler::GenerateRuntimeSetProperty(masm, strict_mode); | 688 PropertyICCompiler::GenerateRuntimeSetProperty(masm, strict_mode); |
| 689 // Never returns to here. | 689 // Never returns to here. |
| 690 | 690 |
| 691 __ bind(&maybe_name_key); | 691 __ bind(&maybe_name_key); |
| 692 __ mov(ebx, FieldOperand(key, HeapObject::kMapOffset)); | 692 __ mov(ebx, FieldOperand(key, HeapObject::kMapOffset)); |
| 693 __ movzx_b(ebx, FieldOperand(ebx, Map::kInstanceTypeOffset)); | 693 __ movzx_b(ebx, FieldOperand(ebx, Map::kInstanceTypeOffset)); |
| 694 __ JumpIfNotUniqueNameInstanceType(ebx, &slow); | 694 __ JumpIfNotUniqueNameInstanceType(ebx, &slow); |
| 695 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( | 695 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
| 696 Code::ComputeHandlerFlags(Code::STORE_IC)); | 696 Code::ComputeHandlerFlags(Code::STORE_IC)); |
| 697 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, false, receiver, | 697 masm->isolate()->stub_cache()->GenerateProbe( |
| 698 key, ebx, no_reg); | 698 masm, Code::STORE_IC, flags, false, receiver, key, ebx, no_reg); |
| 699 // Cache miss. | 699 // Cache miss. |
| 700 __ jmp(&miss); | 700 __ jmp(&miss); |
| 701 | 701 |
| 702 // Extra capacity case: Check if there is extra capacity to | 702 // Extra capacity case: Check if there is extra capacity to |
| 703 // perform the store and update the length. Used for adding one | 703 // perform the store and update the length. Used for adding one |
| 704 // element to the array by writing to array[array.length]. | 704 // element to the array by writing to array[array.length]. |
| 705 __ bind(&extra); | 705 __ bind(&extra); |
| 706 // receiver is a JSArray. | 706 // receiver is a JSArray. |
| 707 // key is a smi. | 707 // key is a smi. |
| 708 // ebx: receiver->elements, a FixedArray | 708 // ebx: receiver->elements, a FixedArray |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 849 // Perform tail call to the entry. | 849 // Perform tail call to the entry. |
| 850 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); | 850 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); |
| 851 } | 851 } |
| 852 | 852 |
| 853 | 853 |
| 854 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { | 854 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { |
| 855 // Return address is on the stack. | 855 // Return address is on the stack. |
| 856 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( | 856 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
| 857 Code::ComputeHandlerFlags(Code::STORE_IC)); | 857 Code::ComputeHandlerFlags(Code::STORE_IC)); |
| 858 masm->isolate()->stub_cache()->GenerateProbe( | 858 masm->isolate()->stub_cache()->GenerateProbe( |
| 859 masm, flags, false, StoreDescriptor::ReceiverRegister(), | 859 masm, Code::STORE_IC, flags, false, StoreDescriptor::ReceiverRegister(), |
| 860 StoreDescriptor::NameRegister(), ebx, no_reg); | 860 StoreDescriptor::NameRegister(), ebx, no_reg); |
| 861 | 861 |
| 862 // Cache miss: Jump to runtime. | 862 // Cache miss: Jump to runtime. |
| 863 GenerateMiss(masm); | 863 GenerateMiss(masm); |
| 864 } | 864 } |
| 865 | 865 |
| 866 | 866 |
| 867 static void StoreIC_PushArgs(MacroAssembler* masm) { | 867 static void StoreIC_PushArgs(MacroAssembler* masm) { |
| 868 Register receiver = StoreDescriptor::ReceiverRegister(); | 868 Register receiver = StoreDescriptor::ReceiverRegister(); |
| 869 Register name = StoreDescriptor::NameRegister(); | 869 Register name = StoreDescriptor::NameRegister(); |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 995 Condition cc = | 995 Condition cc = |
| 996 (check == ENABLE_INLINED_SMI_CHECK) | 996 (check == ENABLE_INLINED_SMI_CHECK) |
| 997 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) | 997 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) |
| 998 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); | 998 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); |
| 999 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 999 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
| 1000 } | 1000 } |
| 1001 } | 1001 } |
| 1002 } // namespace v8::internal | 1002 } // namespace v8::internal |
| 1003 | 1003 |
| 1004 #endif // V8_TARGET_ARCH_X87 | 1004 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |