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

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

Issue 480413008: Move PropertyAccessCompiler and CallOptimization to their own files (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 months 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 | Annotate | Revision Log
« no previous file with comments | « src/ic/ia32/access-compiler-ia32.cc ('k') | src/ic/ic.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/ic/call-optimization.h"
9 #include "src/ic/ic-compiler.h" 10 #include "src/ic/ic-compiler.h"
10 11
11 namespace v8 { 12 namespace v8 {
12 namespace internal { 13 namespace internal {
13 14
14 #define __ ACCESS_MASM(masm) 15 #define __ ACCESS_MASM(masm)
15 16
16 void PropertyHandlerCompiler::GenerateDictionaryNegativeLookup( 17 void PropertyHandlerCompiler::GenerateDictionaryNegativeLookup(
17 MacroAssembler* masm, Label* miss_label, Register receiver, 18 MacroAssembler* masm, Label* miss_label, Register receiver,
18 Handle<Name> name, Register scratch0, Register scratch1) { 19 Handle<Name> name, Register scratch0, Register scratch1) {
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 __ mov(scratch, Immediate(cell)); 200 __ mov(scratch, Immediate(cell));
200 __ cmp(FieldOperand(scratch, PropertyCell::kValueOffset), 201 __ cmp(FieldOperand(scratch, PropertyCell::kValueOffset),
201 Immediate(the_hole)); 202 Immediate(the_hole));
202 } else { 203 } else {
203 __ cmp(Operand::ForCell(cell), Immediate(the_hole)); 204 __ cmp(Operand::ForCell(cell), Immediate(the_hole));
204 } 205 }
205 __ j(not_equal, miss); 206 __ j(not_equal, miss);
206 } 207 }
207 208
208 209
209 void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm,
210 Handle<Code> code) {
211 __ jmp(code, RelocInfo::CODE_TARGET);
212 }
213
214
215 #undef __ 210 #undef __
216 #define __ ACCESS_MASM(masm()) 211 #define __ ACCESS_MASM(masm())
217 212
218 213
219 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, 214 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label,
220 Handle<Name> name) { 215 Handle<Name> name) {
221 if (!label->is_unused()) { 216 if (!label->is_unused()) {
222 __ bind(label); 217 __ bind(label);
223 __ mov(this->name(), Immediate(name)); 218 __ mov(this->name(), Immediate(name));
224 } 219 }
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 } 766 }
772 } 767 }
773 __ bind(&miss); 768 __ bind(&miss);
774 TailCallBuiltin(masm(), MissBuiltin(kind())); 769 TailCallBuiltin(masm(), MissBuiltin(kind()));
775 770
776 // Return the generated code. 771 // Return the generated code.
777 return GetCode(kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC); 772 return GetCode(kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC);
778 } 773 }
779 774
780 775
781 Register* PropertyAccessCompiler::load_calling_convention() {
782 // receiver, name, scratch1, scratch2, scratch3, scratch4.
783 Register receiver = LoadIC::ReceiverRegister();
784 Register name = LoadIC::NameRegister();
785 static Register registers[] = {receiver, name, ebx, eax, edi, no_reg};
786 return registers;
787 }
788
789
790 Register* PropertyAccessCompiler::store_calling_convention() {
791 // receiver, name, scratch1, scratch2, scratch3.
792 Register receiver = StoreIC::ReceiverRegister();
793 Register name = StoreIC::NameRegister();
794 DCHECK(ebx.is(KeyedStoreIC::MapRegister()));
795 static Register registers[] = {receiver, name, ebx, edi, no_reg};
796 return registers;
797 }
798
799
800 Register NamedStoreHandlerCompiler::value() { return StoreIC::ValueRegister(); } 776 Register NamedStoreHandlerCompiler::value() { return StoreIC::ValueRegister(); }
801 777
802 778
803 #undef __ 779 #undef __
804 #define __ ACCESS_MASM(masm) 780 #define __ ACCESS_MASM(masm)
805 781
806 782
807 void NamedLoadHandlerCompiler::GenerateLoadViaGetter( 783 void NamedLoadHandlerCompiler::GenerateLoadViaGetter(
808 MacroAssembler* masm, Handle<HeapType> type, Register receiver, 784 MacroAssembler* masm, Handle<HeapType> type, Register receiver,
809 Handle<JSFunction> getter) { 785 Handle<JSFunction> getter) {
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 // Do tail-call to runtime routine. 970 // Do tail-call to runtime routine.
995 __ TailCallRuntime(Runtime::kSetProperty, 4, 1); 971 __ TailCallRuntime(Runtime::kSetProperty, 4, 1);
996 } 972 }
997 973
998 974
999 #undef __ 975 #undef __
1000 } 976 }
1001 } // namespace v8::internal 977 } // namespace v8::internal
1002 978
1003 #endif // V8_TARGET_ARCH_IA32 979 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ic/ia32/access-compiler-ia32.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698