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

Side by Side Diff: src/ic/x87/handler-compiler-x87.cc

Issue 513533003: X87: Move register conventions out of the IC classes. (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@bleeding_edge
Patch Set: Created 6 years, 3 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
« no previous file with comments | « src/ic/x87/access-compiler-x87.cc ('k') | src/ic/x87/ic-compiler-x87.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_X87 7 #if V8_TARGET_ARCH_X87
8 8
9 #include "src/ic/call-optimization.h" 9 #include "src/ic/call-optimization.h"
10 #include "src/ic/handler-compiler.h" 10 #include "src/ic/handler-compiler.h"
11 11
12 namespace v8 { 12 namespace v8 {
13 namespace internal { 13 namespace internal {
14 14
15 #define __ ACCESS_MASM(masm) 15 #define __ ACCESS_MASM(masm)
16 16
17 17
18 void ElementHandlerCompiler::GenerateLoadDictionaryElement( 18 void ElementHandlerCompiler::GenerateLoadDictionaryElement(
19 MacroAssembler* masm) { 19 MacroAssembler* masm) {
20 // ----------- S t a t e ------------- 20 // ----------- S t a t e -------------
21 // -- ecx : key 21 // -- ecx : key
22 // -- edx : receiver 22 // -- edx : receiver
23 // -- esp[0] : return address 23 // -- esp[0] : return address
24 // ----------------------------------- 24 // -----------------------------------
25 DCHECK(edx.is(LoadIC::ReceiverRegister())); 25 DCHECK(edx.is(LoadConvention::ReceiverRegister()));
26 DCHECK(ecx.is(LoadIC::NameRegister())); 26 DCHECK(ecx.is(LoadConvention::NameRegister()));
27 Label slow, miss; 27 Label slow, miss;
28 28
29 // This stub is meant to be tail-jumped to, the receiver must already 29 // This stub is meant to be tail-jumped to, the receiver must already
30 // have been verified by the caller to not be a smi. 30 // have been verified by the caller to not be a smi.
31 __ JumpIfNotSmi(ecx, &miss); 31 __ JumpIfNotSmi(ecx, &miss);
32 __ mov(ebx, ecx); 32 __ mov(ebx, ecx);
33 __ SmiUntag(ebx); 33 __ SmiUntag(ebx);
34 __ mov(eax, FieldOperand(edx, JSObject::kElementsOffset)); 34 __ mov(eax, FieldOperand(edx, JSObject::kElementsOffset));
35 35
36 // Push receiver on the stack to free up a register for the dictionary 36 // Push receiver on the stack to free up a register for the dictionary
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 static void CompileCallLoadPropertyWithInterceptor( 320 static void CompileCallLoadPropertyWithInterceptor(
321 MacroAssembler* masm, Register receiver, Register holder, Register name, 321 MacroAssembler* masm, Register receiver, Register holder, Register name,
322 Handle<JSObject> holder_obj, IC::UtilityId id) { 322 Handle<JSObject> holder_obj, IC::UtilityId id) {
323 PushInterceptorArguments(masm, receiver, holder, name, holder_obj); 323 PushInterceptorArguments(masm, receiver, holder, name, holder_obj);
324 __ CallExternalReference(ExternalReference(IC_Utility(id), masm->isolate()), 324 __ CallExternalReference(ExternalReference(IC_Utility(id), masm->isolate()),
325 NamedLoadHandlerCompiler::kInterceptorArgsLength); 325 NamedLoadHandlerCompiler::kInterceptorArgsLength);
326 } 326 }
327 327
328 328
329 static void StoreIC_PushArgs(MacroAssembler* masm) { 329 static void StoreIC_PushArgs(MacroAssembler* masm) {
330 Register receiver = StoreIC::ReceiverRegister(); 330 Register receiver = StoreConvention::ReceiverRegister();
331 Register name = StoreIC::NameRegister(); 331 Register name = StoreConvention::NameRegister();
332 Register value = StoreIC::ValueRegister(); 332 Register value = StoreConvention::ValueRegister();
333 333
334 DCHECK(!ebx.is(receiver) && !ebx.is(name) && !ebx.is(value)); 334 DCHECK(!ebx.is(receiver) && !ebx.is(name) && !ebx.is(value));
335 335
336 __ pop(ebx); 336 __ pop(ebx);
337 __ push(receiver); 337 __ push(receiver);
338 __ push(name); 338 __ push(name);
339 __ push(value); 339 __ push(value);
340 __ push(ebx); 340 __ push(ebx);
341 } 341 }
342 342
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 // Do tail-call to the runtime system. 847 // Do tail-call to the runtime system.
848 ExternalReference store_ic_property = ExternalReference( 848 ExternalReference store_ic_property = ExternalReference(
849 IC_Utility(IC::kStorePropertyWithInterceptor), isolate()); 849 IC_Utility(IC::kStorePropertyWithInterceptor), isolate());
850 __ TailCallExternalReference(store_ic_property, 3, 1); 850 __ TailCallExternalReference(store_ic_property, 3, 1);
851 851
852 // Return the generated code. 852 // Return the generated code.
853 return GetCode(kind(), Code::FAST, name); 853 return GetCode(kind(), Code::FAST, name);
854 } 854 }
855 855
856 856
857 Register NamedStoreHandlerCompiler::value() { return StoreIC::ValueRegister(); } 857 Register NamedStoreHandlerCompiler::value() {
858 return StoreConvention::ValueRegister();
859 }
858 860
859 861
860 Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal( 862 Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
861 Handle<PropertyCell> cell, Handle<Name> name, bool is_configurable) { 863 Handle<PropertyCell> cell, Handle<Name> name, bool is_configurable) {
862 Label miss; 864 Label miss;
863 865
864 FrontendHeader(receiver(), name, &miss); 866 FrontendHeader(receiver(), name, &miss);
865 // Get the value from the cell. 867 // Get the value from the cell.
866 Register result = StoreIC::ValueRegister(); 868 Register result = StoreConvention::ValueRegister();
867 if (masm()->serializer_enabled()) { 869 if (masm()->serializer_enabled()) {
868 __ mov(result, Immediate(cell)); 870 __ mov(result, Immediate(cell));
869 __ mov(result, FieldOperand(result, PropertyCell::kValueOffset)); 871 __ mov(result, FieldOperand(result, PropertyCell::kValueOffset));
870 } else { 872 } else {
871 __ mov(result, Operand::ForCell(cell)); 873 __ mov(result, Operand::ForCell(cell));
872 } 874 }
873 875
874 // Check for deleted property if property can actually be deleted. 876 // Check for deleted property if property can actually be deleted.
875 if (is_configurable) { 877 if (is_configurable) {
876 __ cmp(result, factory()->the_hole_value()); 878 __ cmp(result, factory()->the_hole_value());
(...skipping 13 matching lines...) Expand all
890 // Return the generated code. 892 // Return the generated code.
891 return GetCode(kind(), Code::NORMAL, name); 893 return GetCode(kind(), Code::NORMAL, name);
892 } 894 }
893 895
894 896
895 #undef __ 897 #undef __
896 } 898 }
897 } // namespace v8::internal 899 } // namespace v8::internal
898 900
899 #endif // V8_TARGET_ARCH_X87 901 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/ic/x87/access-compiler-x87.cc ('k') | src/ic/x87/ic-compiler-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698