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

Side by Side Diff: src/arm/code-stubs-arm.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 | « no previous file | src/arm/full-codegen-arm.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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 descriptor->deoptimization_handler_ = 74 descriptor->deoptimization_handler_ =
75 Runtime::FunctionForId(Runtime::kHiddenNumberToString)->entry; 75 Runtime::FunctionForId(Runtime::kHiddenNumberToString)->entry;
76 } 76 }
77 77
78 78
79 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( 79 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor(
80 CodeStubInterfaceDescriptor* descriptor) { 80 CodeStubInterfaceDescriptor* descriptor) {
81 static Register registers[] = { r3, r2, r1 }; 81 static Register registers[] = { r3, r2, r1 };
82 descriptor->register_param_count_ = 3; 82 descriptor->register_param_count_ = 3;
83 descriptor->register_params_ = registers; 83 descriptor->register_params_ = registers;
84 static Representation representations[] = {
85 Representation::Tagged(),
86 Representation::Smi(),
87 Representation::Tagged() };
88 descriptor->register_param_representations_ = representations;
89 descriptor->deoptimization_handler_ = 84 descriptor->deoptimization_handler_ =
90 Runtime::FunctionForId( 85 Runtime::FunctionForId(
91 Runtime::kHiddenCreateArrayLiteralStubBailout)->entry; 86 Runtime::kHiddenCreateArrayLiteralStubBailout)->entry;
92 } 87 }
93 88
94 89
95 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( 90 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor(
96 CodeStubInterfaceDescriptor* descriptor) { 91 CodeStubInterfaceDescriptor* descriptor) {
97 static Register registers[] = { r3, r2, r1, r0 }; 92 static Register registers[] = { r3, r2, r1, r0 };
98 descriptor->register_param_count_ = 4; 93 descriptor->register_param_count_ = 4;
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 217
223 if (constant_stack_parameter_count == 0) { 218 if (constant_stack_parameter_count == 0) {
224 descriptor->register_param_count_ = 2; 219 descriptor->register_param_count_ = 2;
225 descriptor->register_params_ = registers_no_args; 220 descriptor->register_params_ = registers_no_args;
226 } else { 221 } else {
227 // stack param count needs (constructor pointer, and single argument) 222 // stack param count needs (constructor pointer, and single argument)
228 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; 223 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS;
229 descriptor->stack_parameter_count_ = r0; 224 descriptor->stack_parameter_count_ = r0;
230 descriptor->register_param_count_ = 3; 225 descriptor->register_param_count_ = 3;
231 descriptor->register_params_ = registers_variable_args; 226 descriptor->register_params_ = registers_variable_args;
232 static Representation representations[] = {
233 Representation::Tagged(),
234 Representation::Tagged(),
235 Representation::Integer32() };
236 descriptor->register_param_representations_ = representations;
237 } 227 }
238 228
239 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; 229 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count;
240 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; 230 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE;
241 descriptor->deoptimization_handler_ = 231 descriptor->deoptimization_handler_ =
242 Runtime::FunctionForId(Runtime::kHiddenArrayConstructor)->entry; 232 Runtime::FunctionForId(Runtime::kHiddenArrayConstructor)->entry;
243 } 233 }
244 234
245 235
246 static void InitializeInternalArrayConstructorDescriptor( 236 static void InitializeInternalArrayConstructorDescriptor(
247 CodeStubInterfaceDescriptor* descriptor, 237 CodeStubInterfaceDescriptor* descriptor,
248 int constant_stack_parameter_count) { 238 int constant_stack_parameter_count) {
249 // register state 239 // register state
250 // r0 -- number of arguments 240 // r0 -- number of arguments
251 // r1 -- constructor function 241 // r1 -- constructor function
252 static Register registers_variable_args[] = { r1, r0 }; 242 static Register registers_variable_args[] = { r1, r0 };
253 static Register registers_no_args[] = { r1 }; 243 static Register registers_no_args[] = { r1 };
254 244
255 if (constant_stack_parameter_count == 0) { 245 if (constant_stack_parameter_count == 0) {
256 descriptor->register_param_count_ = 1; 246 descriptor->register_param_count_ = 1;
257 descriptor->register_params_ = registers_no_args; 247 descriptor->register_params_ = registers_no_args;
258 } else { 248 } else {
259 // stack param count needs (constructor pointer, and single argument) 249 // stack param count needs (constructor pointer, and single argument)
260 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; 250 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS;
261 descriptor->stack_parameter_count_ = r0; 251 descriptor->stack_parameter_count_ = r0;
262 descriptor->register_param_count_ = 2; 252 descriptor->register_param_count_ = 2;
263 descriptor->register_params_ = registers_variable_args; 253 descriptor->register_params_ = registers_variable_args;
264 static Representation representations[] = {
265 Representation::Tagged(),
266 Representation::Integer32() };
267 descriptor->register_param_representations_ = representations;
268 } 254 }
269 255
270 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; 256 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count;
271 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; 257 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE;
272 descriptor->deoptimization_handler_ = 258 descriptor->deoptimization_handler_ =
273 Runtime::FunctionForId(Runtime::kHiddenInternalArrayConstructor)->entry; 259 Runtime::FunctionForId(Runtime::kHiddenInternalArrayConstructor)->entry;
274 } 260 }
275 261
276 262
277 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( 263 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor(
(...skipping 4884 matching lines...) Expand 10 before | Expand all | Expand 10 after
5162 MemOperand(fp, 6 * kPointerSize), 5148 MemOperand(fp, 6 * kPointerSize),
5163 NULL); 5149 NULL);
5164 } 5150 }
5165 5151
5166 5152
5167 #undef __ 5153 #undef __
5168 5154
5169 } } // namespace v8::internal 5155 } } // namespace v8::internal
5170 5156
5171 #endif // V8_TARGET_ARCH_ARM 5157 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698