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

Side by Side Diff: src/ia32/code-stubs-ia32.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/hydrogen.cc ('k') | src/ia32/full-codegen-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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 descriptor->deoptimization_handler_ = 79 descriptor->deoptimization_handler_ =
80 Runtime::FunctionForId(Runtime::kHiddenNumberToString)->entry; 80 Runtime::FunctionForId(Runtime::kHiddenNumberToString)->entry;
81 } 81 }
82 82
83 83
84 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( 84 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor(
85 CodeStubInterfaceDescriptor* descriptor) { 85 CodeStubInterfaceDescriptor* descriptor) {
86 static Register registers[] = { eax, ebx, ecx }; 86 static Register registers[] = { eax, ebx, ecx };
87 descriptor->register_param_count_ = 3; 87 descriptor->register_param_count_ = 3;
88 descriptor->register_params_ = registers; 88 descriptor->register_params_ = registers;
89 static Representation representations[] = {
90 Representation::Tagged(),
91 Representation::Smi(),
92 Representation::Tagged() };
93 descriptor->register_param_representations_ = representations;
94 descriptor->deoptimization_handler_ = 89 descriptor->deoptimization_handler_ =
95 Runtime::FunctionForId( 90 Runtime::FunctionForId(
96 Runtime::kHiddenCreateArrayLiteralStubBailout)->entry; 91 Runtime::kHiddenCreateArrayLiteralStubBailout)->entry;
97 } 92 }
98 93
99 94
100 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( 95 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor(
101 CodeStubInterfaceDescriptor* descriptor) { 96 CodeStubInterfaceDescriptor* descriptor) {
102 static Register registers[] = { eax, ebx, ecx, edx }; 97 static Register registers[] = { eax, ebx, ecx, edx };
103 descriptor->register_param_count_ = 4; 98 descriptor->register_param_count_ = 4;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 210
216 if (constant_stack_parameter_count == 0) { 211 if (constant_stack_parameter_count == 0) {
217 descriptor->register_param_count_ = 2; 212 descriptor->register_param_count_ = 2;
218 descriptor->register_params_ = registers_no_args; 213 descriptor->register_params_ = registers_no_args;
219 } else { 214 } else {
220 // stack param count needs (constructor pointer, and single argument) 215 // stack param count needs (constructor pointer, and single argument)
221 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; 216 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS;
222 descriptor->stack_parameter_count_ = eax; 217 descriptor->stack_parameter_count_ = eax;
223 descriptor->register_param_count_ = 3; 218 descriptor->register_param_count_ = 3;
224 descriptor->register_params_ = registers_variable_args; 219 descriptor->register_params_ = registers_variable_args;
225 static Representation representations[] = {
226 Representation::Tagged(),
227 Representation::Tagged(),
228 Representation::Integer32() };
229 descriptor->register_param_representations_ = representations;
230 } 220 }
231 221
232 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; 222 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count;
233 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; 223 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE;
234 descriptor->deoptimization_handler_ = 224 descriptor->deoptimization_handler_ =
235 Runtime::FunctionForId(Runtime::kHiddenArrayConstructor)->entry; 225 Runtime::FunctionForId(Runtime::kHiddenArrayConstructor)->entry;
236 } 226 }
237 227
238 228
239 static void InitializeInternalArrayConstructorDescriptor( 229 static void InitializeInternalArrayConstructorDescriptor(
240 CodeStubInterfaceDescriptor* descriptor, 230 CodeStubInterfaceDescriptor* descriptor,
241 int constant_stack_parameter_count) { 231 int constant_stack_parameter_count) {
242 // register state 232 // register state
243 // eax -- number of arguments 233 // eax -- number of arguments
244 // edi -- constructor function 234 // edi -- constructor function
245 static Register registers_variable_args[] = { edi, eax }; 235 static Register registers_variable_args[] = { edi, eax };
246 static Register registers_no_args[] = { edi }; 236 static Register registers_no_args[] = { edi };
247 237
248 if (constant_stack_parameter_count == 0) { 238 if (constant_stack_parameter_count == 0) {
249 descriptor->register_param_count_ = 1; 239 descriptor->register_param_count_ = 1;
250 descriptor->register_params_ = registers_no_args; 240 descriptor->register_params_ = registers_no_args;
251 } else { 241 } else {
252 // stack param count needs (constructor pointer, and single argument) 242 // stack param count needs (constructor pointer, and single argument)
253 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; 243 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS;
254 descriptor->stack_parameter_count_ = eax; 244 descriptor->stack_parameter_count_ = eax;
255 descriptor->register_param_count_ = 2; 245 descriptor->register_param_count_ = 2;
256 descriptor->register_params_ = registers_variable_args; 246 descriptor->register_params_ = registers_variable_args;
257 static Representation representations[] = {
258 Representation::Tagged(),
259 Representation::Integer32() };
260 descriptor->register_param_representations_ = representations;
261 } 247 }
262 248
263 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; 249 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count;
264 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; 250 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE;
265 descriptor->deoptimization_handler_ = 251 descriptor->deoptimization_handler_ =
266 Runtime::FunctionForId(Runtime::kHiddenInternalArrayConstructor)->entry; 252 Runtime::FunctionForId(Runtime::kHiddenInternalArrayConstructor)->entry;
267 } 253 }
268 254
269 255
270 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( 256 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor(
(...skipping 4789 matching lines...) Expand 10 before | Expand all | Expand 10 after
5060 Operand(ebp, 7 * kPointerSize), 5046 Operand(ebp, 7 * kPointerSize),
5061 NULL); 5047 NULL);
5062 } 5048 }
5063 5049
5064 5050
5065 #undef __ 5051 #undef __
5066 5052
5067 } } // namespace v8::internal 5053 } } // namespace v8::internal
5068 5054
5069 #endif // V8_TARGET_ARCH_IA32 5055 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698