OLD | NEW |
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 Loading... |
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; | |
67 descriptor->deoptimization_handler_ = | 62 descriptor->deoptimization_handler_ = |
68 Runtime::FunctionForId( | 63 Runtime::FunctionForId( |
69 Runtime::kHiddenCreateArrayLiteralStubBailout)->entry; | 64 Runtime::kHiddenCreateArrayLiteralStubBailout)->entry; |
70 } | 65 } |
71 | 66 |
72 | 67 |
73 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( | 68 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( |
74 CodeStubInterfaceDescriptor* descriptor) { | 69 CodeStubInterfaceDescriptor* descriptor) { |
75 static Register registers[] = { a3, a2, a1, a0 }; | 70 static Register registers[] = { a3, a2, a1, a0 }; |
76 descriptor->register_param_count_ = 4; | 71 descriptor->register_param_count_ = 4; |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 | 195 |
201 if (constant_stack_parameter_count == 0) { | 196 if (constant_stack_parameter_count == 0) { |
202 descriptor->register_param_count_ = 2; | 197 descriptor->register_param_count_ = 2; |
203 descriptor->register_params_ = registers_no_args; | 198 descriptor->register_params_ = registers_no_args; |
204 } else { | 199 } else { |
205 // stack param count needs (constructor pointer, and single argument) | 200 // stack param count needs (constructor pointer, and single argument) |
206 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; | 201 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; |
207 descriptor->stack_parameter_count_ = a0; | 202 descriptor->stack_parameter_count_ = a0; |
208 descriptor->register_param_count_ = 3; | 203 descriptor->register_param_count_ = 3; |
209 descriptor->register_params_ = registers_variable_args; | 204 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; | |
215 } | 205 } |
216 | 206 |
217 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; | 207 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; |
218 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; | 208 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; |
219 descriptor->deoptimization_handler_ = | 209 descriptor->deoptimization_handler_ = |
220 Runtime::FunctionForId(Runtime::kHiddenArrayConstructor)->entry; | 210 Runtime::FunctionForId(Runtime::kHiddenArrayConstructor)->entry; |
221 } | 211 } |
222 | 212 |
223 | 213 |
224 static void InitializeInternalArrayConstructorDescriptor( | 214 static void InitializeInternalArrayConstructorDescriptor( |
225 CodeStubInterfaceDescriptor* descriptor, | 215 CodeStubInterfaceDescriptor* descriptor, |
226 int constant_stack_parameter_count) { | 216 int constant_stack_parameter_count) { |
227 // register state | 217 // register state |
228 // a0 -- number of arguments | 218 // a0 -- number of arguments |
229 // a1 -- constructor function | 219 // a1 -- constructor function |
230 static Register registers_variable_args[] = { a1, a0 }; | 220 static Register registers_variable_args[] = { a1, a0 }; |
231 static Register registers_no_args[] = { a1 }; | 221 static Register registers_no_args[] = { a1 }; |
232 | 222 |
233 if (constant_stack_parameter_count == 0) { | 223 if (constant_stack_parameter_count == 0) { |
234 descriptor->register_param_count_ = 1; | 224 descriptor->register_param_count_ = 1; |
235 descriptor->register_params_ = registers_no_args; | 225 descriptor->register_params_ = registers_no_args; |
236 } else { | 226 } else { |
237 // stack param count needs (constructor pointer, and single argument) | 227 // stack param count needs (constructor pointer, and single argument) |
238 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; | 228 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; |
239 descriptor->stack_parameter_count_ = a0; | 229 descriptor->stack_parameter_count_ = a0; |
240 descriptor->register_param_count_ = 2; | 230 descriptor->register_param_count_ = 2; |
241 descriptor->register_params_ = registers_variable_args; | 231 descriptor->register_params_ = registers_variable_args; |
242 static Representation representations[] = { | |
243 Representation::Tagged(), | |
244 Representation::Integer32() }; | |
245 descriptor->register_param_representations_ = representations; | |
246 } | 232 } |
247 | 233 |
248 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; | 234 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; |
249 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; | 235 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; |
250 descriptor->deoptimization_handler_ = | 236 descriptor->deoptimization_handler_ = |
251 Runtime::FunctionForId(Runtime::kHiddenInternalArrayConstructor)->entry; | 237 Runtime::FunctionForId(Runtime::kHiddenInternalArrayConstructor)->entry; |
252 } | 238 } |
253 | 239 |
254 | 240 |
255 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( | 241 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( |
(...skipping 5189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5445 MemOperand(fp, 6 * kPointerSize), | 5431 MemOperand(fp, 6 * kPointerSize), |
5446 NULL); | 5432 NULL); |
5447 } | 5433 } |
5448 | 5434 |
5449 | 5435 |
5450 #undef __ | 5436 #undef __ |
5451 | 5437 |
5452 } } // namespace v8::internal | 5438 } } // namespace v8::internal |
5453 | 5439 |
5454 #endif // V8_TARGET_ARCH_MIPS | 5440 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |