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/x64/code-stubs-x64.cc

Issue 28993003: Make stack_parameter_count a plain register. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Simplify Deoptimizer::SetPlatformCompiledStubRegisters. Created 7 years, 2 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/mips/deoptimizer-mips.cc ('k') | src/x64/deoptimizer-x64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 CodeStubInterfaceDescriptor* descriptor, 172 CodeStubInterfaceDescriptor* descriptor,
173 int constant_stack_parameter_count) { 173 int constant_stack_parameter_count) {
174 // register state 174 // register state
175 // rax -- number of arguments 175 // rax -- number of arguments
176 // rdi -- function 176 // rdi -- function
177 // rbx -- type info cell with elements kind 177 // rbx -- type info cell with elements kind
178 static Register registers[] = { rdi, rbx }; 178 static Register registers[] = { rdi, rbx };
179 descriptor->register_param_count_ = 2; 179 descriptor->register_param_count_ = 2;
180 if (constant_stack_parameter_count != 0) { 180 if (constant_stack_parameter_count != 0) {
181 // stack param count needs (constructor pointer, and single argument) 181 // stack param count needs (constructor pointer, and single argument)
182 descriptor->stack_parameter_count_ = &rax; 182 descriptor->stack_parameter_count_ = rax;
183 } 183 }
184 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; 184 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count;
185 descriptor->register_params_ = registers; 185 descriptor->register_params_ = registers;
186 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; 186 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE;
187 descriptor->deoptimization_handler_ = 187 descriptor->deoptimization_handler_ =
188 Runtime::FunctionForId(Runtime::kArrayConstructor)->entry; 188 Runtime::FunctionForId(Runtime::kArrayConstructor)->entry;
189 } 189 }
190 190
191 191
192 static void InitializeInternalArrayConstructorDescriptor( 192 static void InitializeInternalArrayConstructorDescriptor(
193 Isolate* isolate, 193 Isolate* isolate,
194 CodeStubInterfaceDescriptor* descriptor, 194 CodeStubInterfaceDescriptor* descriptor,
195 int constant_stack_parameter_count) { 195 int constant_stack_parameter_count) {
196 // register state 196 // register state
197 // rax -- number of arguments 197 // rax -- number of arguments
198 // rdi -- constructor function 198 // rdi -- constructor function
199 static Register registers[] = { rdi }; 199 static Register registers[] = { rdi };
200 descriptor->register_param_count_ = 1; 200 descriptor->register_param_count_ = 1;
201 201
202 if (constant_stack_parameter_count != 0) { 202 if (constant_stack_parameter_count != 0) {
203 // stack param count needs (constructor pointer, and single argument) 203 // stack param count needs (constructor pointer, and single argument)
204 descriptor->stack_parameter_count_ = &rax; 204 descriptor->stack_parameter_count_ = rax;
205 } 205 }
206 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; 206 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count;
207 descriptor->register_params_ = registers; 207 descriptor->register_params_ = registers;
208 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; 208 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE;
209 descriptor->deoptimization_handler_ = 209 descriptor->deoptimization_handler_ =
210 Runtime::FunctionForId(Runtime::kInternalArrayConstructor)->entry; 210 Runtime::FunctionForId(Runtime::kInternalArrayConstructor)->entry;
211 } 211 }
212 212
213 213
214 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( 214 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor(
(...skipping 5622 matching lines...) Expand 10 before | Expand all | Expand 10 after
5837 __ bind(&fast_elements_case); 5837 __ bind(&fast_elements_case);
5838 GenerateCase(masm, FAST_ELEMENTS); 5838 GenerateCase(masm, FAST_ELEMENTS);
5839 } 5839 }
5840 5840
5841 5841
5842 #undef __ 5842 #undef __
5843 5843
5844 } } // namespace v8::internal 5844 } } // namespace v8::internal
5845 5845
5846 #endif // V8_TARGET_ARCH_X64 5846 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/mips/deoptimizer-mips.cc ('k') | src/x64/deoptimizer-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698