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

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

Issue 256873007: Revert r20974: Unify and simplify the FastCloneShallowArrayStub (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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/v8-counters.h ('k') | src/x64/full-codegen-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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 descriptor->deoptimization_handler_ = 75 descriptor->deoptimization_handler_ =
76 Runtime::FunctionForId(Runtime::kHiddenNumberToString)->entry; 76 Runtime::FunctionForId(Runtime::kHiddenNumberToString)->entry;
77 } 77 }
78 78
79 79
80 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( 80 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor(
81 CodeStubInterfaceDescriptor* descriptor) { 81 CodeStubInterfaceDescriptor* descriptor) {
82 static Register registers[] = { rax, rbx, rcx }; 82 static Register registers[] = { rax, rbx, rcx };
83 descriptor->register_param_count_ = 3; 83 descriptor->register_param_count_ = 3;
84 descriptor->register_params_ = registers; 84 descriptor->register_params_ = registers;
85 static Representation representations[] = {
86 Representation::Tagged(),
87 Representation::Smi(),
88 Representation::Tagged() };
89 descriptor->register_param_representations_ = representations;
90 descriptor->deoptimization_handler_ = 85 descriptor->deoptimization_handler_ =
91 Runtime::FunctionForId( 86 Runtime::FunctionForId(
92 Runtime::kHiddenCreateArrayLiteralStubBailout)->entry; 87 Runtime::kHiddenCreateArrayLiteralStubBailout)->entry;
93 } 88 }
94 89
95 90
96 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( 91 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor(
97 CodeStubInterfaceDescriptor* descriptor) { 92 CodeStubInterfaceDescriptor* descriptor) {
98 static Register registers[] = { rax, rbx, rcx, rdx }; 93 static Register registers[] = { rax, rbx, rcx, rdx };
99 descriptor->register_param_count_ = 4; 94 descriptor->register_param_count_ = 4;
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 static Register registers_no_args[] = { rdi, rbx }; 204 static Register registers_no_args[] = { rdi, rbx };
210 205
211 if (constant_stack_parameter_count == 0) { 206 if (constant_stack_parameter_count == 0) {
212 descriptor->register_param_count_ = 2; 207 descriptor->register_param_count_ = 2;
213 descriptor->register_params_ = registers_no_args; 208 descriptor->register_params_ = registers_no_args;
214 } else { 209 } else {
215 // stack param count needs (constructor pointer, and single argument) 210 // stack param count needs (constructor pointer, and single argument)
216 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; 211 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS;
217 descriptor->stack_parameter_count_ = rax; 212 descriptor->stack_parameter_count_ = rax;
218 descriptor->register_param_count_ = 3; 213 descriptor->register_param_count_ = 3;
219 static Representation representations[] = {
220 Representation::Tagged(),
221 Representation::Tagged(),
222 Representation::Integer32() };
223 descriptor->register_param_representations_ = representations;
224 descriptor->register_params_ = registers_variable_args; 214 descriptor->register_params_ = registers_variable_args;
225 } 215 }
226 216
227 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; 217 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count;
228 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; 218 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE;
229 descriptor->deoptimization_handler_ = 219 descriptor->deoptimization_handler_ =
230 Runtime::FunctionForId(Runtime::kHiddenArrayConstructor)->entry; 220 Runtime::FunctionForId(Runtime::kHiddenArrayConstructor)->entry;
231 } 221 }
232 222
233 223
234 static void InitializeInternalArrayConstructorDescriptor( 224 static void InitializeInternalArrayConstructorDescriptor(
235 CodeStubInterfaceDescriptor* descriptor, 225 CodeStubInterfaceDescriptor* descriptor,
236 int constant_stack_parameter_count) { 226 int constant_stack_parameter_count) {
237 // register state 227 // register state
238 // rax -- number of arguments 228 // rax -- number of arguments
239 // rdi -- constructor function 229 // rdi -- constructor function
240 static Register registers_variable_args[] = { rdi, rax }; 230 static Register registers_variable_args[] = { rdi, rax };
241 static Register registers_no_args[] = { rdi }; 231 static Register registers_no_args[] = { rdi };
242 232
243 if (constant_stack_parameter_count == 0) { 233 if (constant_stack_parameter_count == 0) {
244 descriptor->register_param_count_ = 1; 234 descriptor->register_param_count_ = 1;
245 descriptor->register_params_ = registers_no_args; 235 descriptor->register_params_ = registers_no_args;
246 } else { 236 } else {
247 // stack param count needs (constructor pointer, and single argument) 237 // stack param count needs (constructor pointer, and single argument)
248 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; 238 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS;
249 descriptor->stack_parameter_count_ = rax; 239 descriptor->stack_parameter_count_ = rax;
250 descriptor->register_param_count_ = 2; 240 descriptor->register_param_count_ = 2;
251 descriptor->register_params_ = registers_variable_args; 241 descriptor->register_params_ = registers_variable_args;
252 static Representation representations[] = {
253 Representation::Tagged(),
254 Representation::Integer32() };
255 descriptor->register_param_representations_ = representations;
256 } 242 }
257 243
258 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; 244 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count;
259 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; 245 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE;
260 descriptor->deoptimization_handler_ = 246 descriptor->deoptimization_handler_ =
261 Runtime::FunctionForId(Runtime::kHiddenInternalArrayConstructor)->entry; 247 Runtime::FunctionForId(Runtime::kHiddenInternalArrayConstructor)->entry;
262 } 248 }
263 249
264 250
265 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( 251 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor(
(...skipping 4670 matching lines...) Expand 10 before | Expand all | Expand 10 after
4936 return_value_operand, 4922 return_value_operand,
4937 NULL); 4923 NULL);
4938 } 4924 }
4939 4925
4940 4926
4941 #undef __ 4927 #undef __
4942 4928
4943 } } // namespace v8::internal 4929 } } // namespace v8::internal
4944 4930
4945 #endif // V8_TARGET_ARCH_X64 4931 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/v8-counters.h ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698