Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Side by Side Diff: src/ic/ia32/ic-ia32.cc

Issue 767743002: Hydrogen code stubs for vector-based ICs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ic/ia32/ic-compiler-ia32.cc ('k') | src/ic/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_IA32 7 #if V8_TARGET_ARCH_IA32
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 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 __ bind(&slow); 685 __ bind(&slow);
686 PropertyICCompiler::GenerateRuntimeSetProperty(masm, strict_mode); 686 PropertyICCompiler::GenerateRuntimeSetProperty(masm, strict_mode);
687 // Never returns to here. 687 // Never returns to here.
688 688
689 __ bind(&maybe_name_key); 689 __ bind(&maybe_name_key);
690 __ mov(ebx, FieldOperand(key, HeapObject::kMapOffset)); 690 __ mov(ebx, FieldOperand(key, HeapObject::kMapOffset));
691 __ movzx_b(ebx, FieldOperand(ebx, Map::kInstanceTypeOffset)); 691 __ movzx_b(ebx, FieldOperand(ebx, Map::kInstanceTypeOffset));
692 __ JumpIfNotUniqueNameInstanceType(ebx, &slow); 692 __ JumpIfNotUniqueNameInstanceType(ebx, &slow);
693 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 693 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
694 Code::ComputeHandlerFlags(Code::STORE_IC)); 694 Code::ComputeHandlerFlags(Code::STORE_IC));
695 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, false, receiver, 695 masm->isolate()->stub_cache()->GenerateProbe(
696 key, ebx, no_reg); 696 masm, Code::STORE_IC, flags, false, receiver, key, ebx, no_reg);
697 // Cache miss. 697 // Cache miss.
698 __ jmp(&miss); 698 __ jmp(&miss);
699 699
700 // Extra capacity case: Check if there is extra capacity to 700 // Extra capacity case: Check if there is extra capacity to
701 // perform the store and update the length. Used for adding one 701 // perform the store and update the length. Used for adding one
702 // element to the array by writing to array[array.length]. 702 // element to the array by writing to array[array.length].
703 __ bind(&extra); 703 __ bind(&extra);
704 // receiver is a JSArray. 704 // receiver is a JSArray.
705 // key is a smi. 705 // key is a smi.
706 // ebx: receiver->elements, a FixedArray 706 // ebx: receiver->elements, a FixedArray
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 // Perform tail call to the entry. 847 // Perform tail call to the entry.
848 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); 848 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1);
849 } 849 }
850 850
851 851
852 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { 852 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
853 // Return address is on the stack. 853 // Return address is on the stack.
854 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 854 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
855 Code::ComputeHandlerFlags(Code::STORE_IC)); 855 Code::ComputeHandlerFlags(Code::STORE_IC));
856 masm->isolate()->stub_cache()->GenerateProbe( 856 masm->isolate()->stub_cache()->GenerateProbe(
857 masm, flags, false, StoreDescriptor::ReceiverRegister(), 857 masm, Code::STORE_IC, flags, false, StoreDescriptor::ReceiverRegister(),
858 StoreDescriptor::NameRegister(), ebx, no_reg); 858 StoreDescriptor::NameRegister(), ebx, no_reg);
859 859
860 // Cache miss: Jump to runtime. 860 // Cache miss: Jump to runtime.
861 GenerateMiss(masm); 861 GenerateMiss(masm);
862 } 862 }
863 863
864 864
865 static void StoreIC_PushArgs(MacroAssembler* masm) { 865 static void StoreIC_PushArgs(MacroAssembler* masm) {
866 Register receiver = StoreDescriptor::ReceiverRegister(); 866 Register receiver = StoreDescriptor::ReceiverRegister();
867 Register name = StoreDescriptor::NameRegister(); 867 Register name = StoreDescriptor::NameRegister();
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
993 Condition cc = 993 Condition cc =
994 (check == ENABLE_INLINED_SMI_CHECK) 994 (check == ENABLE_INLINED_SMI_CHECK)
995 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) 995 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero)
996 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); 996 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry);
997 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 997 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
998 } 998 }
999 } 999 }
1000 } // namespace v8::internal 1000 } // namespace v8::internal
1001 1001
1002 #endif // V8_TARGET_ARCH_IA32 1002 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ic/ia32/ic-compiler-ia32.cc ('k') | src/ic/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698