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

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

Issue 273103002: MIPS: Reland r20974: Unify and simplify the FastCloneShallowArrayStub. (Closed) Base URL: https://github.com/v8/v8.git@gbl
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
« no previous file with comments | « no previous file | src/mips/full-codegen-mips.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "v8.h" 5 #include "v8.h"
6 6
7 #if V8_TARGET_ARCH_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 #include "bootstrapper.h" 9 #include "bootstrapper.h"
10 #include "code-stubs.h" 10 #include "code-stubs.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 descriptor->deoptimization_handler_ = 52 descriptor->deoptimization_handler_ =
53 Runtime::FunctionForId(Runtime::kHiddenNumberToString)->entry; 53 Runtime::FunctionForId(Runtime::kHiddenNumberToString)->entry;
54 } 54 }
55 55
56 56
57 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( 57 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor(
58 CodeStubInterfaceDescriptor* descriptor) { 58 CodeStubInterfaceDescriptor* descriptor) {
59 static Register registers[] = { a3, a2, a1 }; 59 static Register registers[] = { a3, a2, a1 };
60 descriptor->register_param_count_ = 3; 60 descriptor->register_param_count_ = 3;
61 descriptor->register_params_ = registers; 61 descriptor->register_params_ = registers;
62 static Representation representations[] = {
63 Representation::Tagged(),
64 Representation::Smi(),
65 Representation::Tagged() };
66 descriptor->register_param_representations_ = representations;
62 descriptor->deoptimization_handler_ = 67 descriptor->deoptimization_handler_ =
63 Runtime::FunctionForId( 68 Runtime::FunctionForId(
64 Runtime::kHiddenCreateArrayLiteralStubBailout)->entry; 69 Runtime::kHiddenCreateArrayLiteralStubBailout)->entry;
65 } 70 }
66 71
67 72
68 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( 73 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor(
69 CodeStubInterfaceDescriptor* descriptor) { 74 CodeStubInterfaceDescriptor* descriptor) {
70 static Register registers[] = { a3, a2, a1, a0 }; 75 static Register registers[] = { a3, a2, a1, a0 };
71 descriptor->register_param_count_ = 4; 76 descriptor->register_param_count_ = 4;
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 200
196 if (constant_stack_parameter_count == 0) { 201 if (constant_stack_parameter_count == 0) {
197 descriptor->register_param_count_ = 2; 202 descriptor->register_param_count_ = 2;
198 descriptor->register_params_ = registers_no_args; 203 descriptor->register_params_ = registers_no_args;
199 } else { 204 } else {
200 // stack param count needs (constructor pointer, and single argument) 205 // stack param count needs (constructor pointer, and single argument)
201 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; 206 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS;
202 descriptor->stack_parameter_count_ = a0; 207 descriptor->stack_parameter_count_ = a0;
203 descriptor->register_param_count_ = 3; 208 descriptor->register_param_count_ = 3;
204 descriptor->register_params_ = registers_variable_args; 209 descriptor->register_params_ = registers_variable_args;
210 static Representation representations[] = {
211 Representation::Tagged(),
212 Representation::Tagged(),
213 Representation::Integer32() };
214 descriptor->register_param_representations_ = representations;
205 } 215 }
206 216
207 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; 217 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count;
208 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; 218 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE;
209 descriptor->deoptimization_handler_ = 219 descriptor->deoptimization_handler_ =
210 Runtime::FunctionForId(Runtime::kHiddenArrayConstructor)->entry; 220 Runtime::FunctionForId(Runtime::kHiddenArrayConstructor)->entry;
211 } 221 }
212 222
213 223
214 static void InitializeInternalArrayConstructorDescriptor( 224 static void InitializeInternalArrayConstructorDescriptor(
215 CodeStubInterfaceDescriptor* descriptor, 225 CodeStubInterfaceDescriptor* descriptor,
216 int constant_stack_parameter_count) { 226 int constant_stack_parameter_count) {
217 // register state 227 // register state
218 // a0 -- number of arguments 228 // a0 -- number of arguments
219 // a1 -- constructor function 229 // a1 -- constructor function
220 static Register registers_variable_args[] = { a1, a0 }; 230 static Register registers_variable_args[] = { a1, a0 };
221 static Register registers_no_args[] = { a1 }; 231 static Register registers_no_args[] = { a1 };
222 232
223 if (constant_stack_parameter_count == 0) { 233 if (constant_stack_parameter_count == 0) {
224 descriptor->register_param_count_ = 1; 234 descriptor->register_param_count_ = 1;
225 descriptor->register_params_ = registers_no_args; 235 descriptor->register_params_ = registers_no_args;
226 } else { 236 } else {
227 // stack param count needs (constructor pointer, and single argument) 237 // stack param count needs (constructor pointer, and single argument)
228 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; 238 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS;
229 descriptor->stack_parameter_count_ = a0; 239 descriptor->stack_parameter_count_ = a0;
230 descriptor->register_param_count_ = 2; 240 descriptor->register_param_count_ = 2;
231 descriptor->register_params_ = registers_variable_args; 241 descriptor->register_params_ = registers_variable_args;
242 static Representation representations[] = {
243 Representation::Tagged(),
244 Representation::Integer32() };
245 descriptor->register_param_representations_ = representations;
232 } 246 }
233 247
234 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; 248 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count;
235 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; 249 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE;
236 descriptor->deoptimization_handler_ = 250 descriptor->deoptimization_handler_ =
237 Runtime::FunctionForId(Runtime::kHiddenInternalArrayConstructor)->entry; 251 Runtime::FunctionForId(Runtime::kHiddenInternalArrayConstructor)->entry;
238 } 252 }
239 253
240 254
241 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( 255 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor(
(...skipping 5189 matching lines...) Expand 10 before | Expand all | Expand 10 after
5431 MemOperand(fp, 6 * kPointerSize), 5445 MemOperand(fp, 6 * kPointerSize),
5432 NULL); 5446 NULL);
5433 } 5447 }
5434 5448
5435 5449
5436 #undef __ 5450 #undef __
5437 5451
5438 } } // namespace v8::internal 5452 } } // namespace v8::internal
5439 5453
5440 #endif // V8_TARGET_ARCH_MIPS 5454 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698