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

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

Issue 527093002: Make concrete classes for individual call descriptors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. 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 | Annotate | Revision Log
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/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(LoadConvention::ReceiverRegister())); 25 DCHECK(edx.is(LoadDescriptor::ReceiverRegister()));
26 DCHECK(ecx.is(LoadConvention::NameRegister())); 26 DCHECK(ecx.is(LoadDescriptor::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 = StoreConvention::ReceiverRegister(); 330 Register receiver = StoreDescriptor::ReceiverRegister();
331 Register name = StoreConvention::NameRegister(); 331 Register name = StoreDescriptor::NameRegister();
332 Register value = StoreConvention::ValueRegister(); 332 Register value = StoreDescriptor::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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 ExternalReference store_ic_property = ExternalReference( 846 ExternalReference store_ic_property = ExternalReference(
847 IC_Utility(IC::kStorePropertyWithInterceptor), isolate()); 847 IC_Utility(IC::kStorePropertyWithInterceptor), isolate());
848 __ TailCallExternalReference(store_ic_property, 3, 1); 848 __ TailCallExternalReference(store_ic_property, 3, 1);
849 849
850 // Return the generated code. 850 // Return the generated code.
851 return GetCode(kind(), Code::FAST, name); 851 return GetCode(kind(), Code::FAST, name);
852 } 852 }
853 853
854 854
855 Register NamedStoreHandlerCompiler::value() { 855 Register NamedStoreHandlerCompiler::value() {
856 return StoreConvention::ValueRegister(); 856 return StoreDescriptor::ValueRegister();
857 } 857 }
858 858
859 859
860 Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal( 860 Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
861 Handle<PropertyCell> cell, Handle<Name> name, bool is_configurable) { 861 Handle<PropertyCell> cell, Handle<Name> name, bool is_configurable) {
862 Label miss; 862 Label miss;
863 863
864 FrontendHeader(receiver(), name, &miss); 864 FrontendHeader(receiver(), name, &miss);
865 // Get the value from the cell. 865 // Get the value from the cell.
866 Register result = StoreConvention::ValueRegister(); 866 Register result = StoreDescriptor::ValueRegister();
867 if (masm()->serializer_enabled()) { 867 if (masm()->serializer_enabled()) {
868 __ mov(result, Immediate(cell)); 868 __ mov(result, Immediate(cell));
869 __ mov(result, FieldOperand(result, PropertyCell::kValueOffset)); 869 __ mov(result, FieldOperand(result, PropertyCell::kValueOffset));
870 } else { 870 } else {
871 __ mov(result, Operand::ForCell(cell)); 871 __ mov(result, Operand::ForCell(cell));
872 } 872 }
873 873
874 // Check for deleted property if property can actually be deleted. 874 // Check for deleted property if property can actually be deleted.
875 if (is_configurable) { 875 if (is_configurable) {
876 __ cmp(result, factory()->the_hole_value()); 876 __ cmp(result, factory()->the_hole_value());
(...skipping 13 matching lines...) Expand all
890 // Return the generated code. 890 // Return the generated code.
891 return GetCode(kind(), Code::NORMAL, name); 891 return GetCode(kind(), Code::NORMAL, name);
892 } 892 }
893 893
894 894
895 #undef __ 895 #undef __
896 } 896 }
897 } // namespace v8::internal 897 } // namespace v8::internal
898 898
899 #endif // V8_TARGET_ARCH_IA32 899 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698