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

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 14847004: Turn the load field code stub into a hydrogen code stub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 7 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/compiler.cc ('k') | src/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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 CodeStubInterfaceDescriptor* descriptor) { 73 CodeStubInterfaceDescriptor* descriptor) {
74 static Register registers[] = { edx, ecx }; 74 static Register registers[] = { edx, ecx };
75 descriptor->register_param_count_ = 2; 75 descriptor->register_param_count_ = 2;
76 descriptor->register_params_ = registers; 76 descriptor->register_params_ = registers;
77 descriptor->stack_parameter_count_ = NULL; 77 descriptor->stack_parameter_count_ = NULL;
78 descriptor->deoptimization_handler_ = 78 descriptor->deoptimization_handler_ =
79 FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure); 79 FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure);
80 } 80 }
81 81
82 82
83 void LoadFieldStub::InitializeInterfaceDescriptor(
84 Isolate* isolate,
85 CodeStubInterfaceDescriptor* descriptor) {
86 static Register registers[] = { edx };
87 descriptor->register_param_count_ = 1;
88 descriptor->register_params_ = registers;
89 descriptor->stack_parameter_count_ = NULL;
90 descriptor->deoptimization_handler_ = NULL;
91 }
92
93
94 void KeyedLoadFieldStub::InitializeInterfaceDescriptor(
95 Isolate* isolate,
96 CodeStubInterfaceDescriptor* descriptor) {
97 static Register registers[] = { edx };
98 descriptor->register_param_count_ = 1;
99 descriptor->register_params_ = registers;
100 descriptor->stack_parameter_count_ = NULL;
101 descriptor->deoptimization_handler_ = NULL;
102 }
103
104
83 void KeyedStoreFastElementStub::InitializeInterfaceDescriptor( 105 void KeyedStoreFastElementStub::InitializeInterfaceDescriptor(
84 Isolate* isolate, 106 Isolate* isolate,
85 CodeStubInterfaceDescriptor* descriptor) { 107 CodeStubInterfaceDescriptor* descriptor) {
86 static Register registers[] = { edx, ecx, eax }; 108 static Register registers[] = { edx, ecx, eax };
87 descriptor->register_param_count_ = 3; 109 descriptor->register_param_count_ = 3;
88 descriptor->register_params_ = registers; 110 descriptor->register_params_ = registers;
89 descriptor->deoptimization_handler_ = 111 descriptor->deoptimization_handler_ =
90 FUNCTION_ADDR(KeyedStoreIC_MissFromStubFailure); 112 FUNCTION_ADDR(KeyedStoreIC_MissFromStubFailure);
91 } 113 }
92 114
(...skipping 3199 matching lines...) Expand 10 before | Expand all | Expand 10 after
3292 ExternalReference ref = 3314 ExternalReference ref =
3293 ExternalReference(IC_Utility(IC::kStoreIC_ArrayLength), masm->isolate()); 3315 ExternalReference(IC_Utility(IC::kStoreIC_ArrayLength), masm->isolate());
3294 __ TailCallExternalReference(ref, 2, 1); 3316 __ TailCallExternalReference(ref, 2, 1);
3295 3317
3296 __ bind(&miss); 3318 __ bind(&miss);
3297 3319
3298 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); 3320 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind()));
3299 } 3321 }
3300 3322
3301 3323
3302 void LoadFieldStub::Generate(MacroAssembler* masm) {
3303 StubCompiler::DoGenerateFastPropertyLoad(masm, eax, reg_, inobject_, index_);
3304 __ ret(0);
3305 }
3306
3307
3308 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { 3324 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
3309 // The key is in edx and the parameter count is in eax. 3325 // The key is in edx and the parameter count is in eax.
3310 3326
3311 // The displacement is used for skipping the frame pointer on the 3327 // The displacement is used for skipping the frame pointer on the
3312 // stack. It is the offset of the last parameter (if any) relative 3328 // stack. It is the offset of the last parameter (if any) relative
3313 // to the frame pointer. 3329 // to the frame pointer.
3314 static const int kDisplacement = 1 * kPointerSize; 3330 static const int kDisplacement = 1 * kPointerSize;
3315 3331
3316 // Check that the key is a smi. 3332 // Check that the key is a smi.
3317 Label slow; 3333 Label slow;
(...skipping 4609 matching lines...) Expand 10 before | Expand all | Expand 10 after
7927 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET); 7943 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET);
7928 } 7944 }
7929 } 7945 }
7930 7946
7931 7947
7932 #undef __ 7948 #undef __
7933 7949
7934 } } // namespace v8::internal 7950 } } // namespace v8::internal
7935 7951
7936 #endif // V8_TARGET_ARCH_IA32 7952 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698