OLD | NEW |
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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[] = { a3, a2, a1 }; | 82 static Register registers[] = { a3, a2, a1 }; |
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; |
85 descriptor->deoptimization_handler_ = | 90 descriptor->deoptimization_handler_ = |
86 Runtime::FunctionForId( | 91 Runtime::FunctionForId( |
87 Runtime::kHiddenCreateArrayLiteralStubBailout)->entry; | 92 Runtime::kHiddenCreateArrayLiteralStubBailout)->entry; |
88 } | 93 } |
89 | 94 |
90 | 95 |
91 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( | 96 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( |
92 CodeStubInterfaceDescriptor* descriptor) { | 97 CodeStubInterfaceDescriptor* descriptor) { |
93 static Register registers[] = { a3, a2, a1, a0 }; | 98 static Register registers[] = { a3, a2, a1, a0 }; |
94 descriptor->register_param_count_ = 4; | 99 descriptor->register_param_count_ = 4; |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 223 |
219 if (constant_stack_parameter_count == 0) { | 224 if (constant_stack_parameter_count == 0) { |
220 descriptor->register_param_count_ = 2; | 225 descriptor->register_param_count_ = 2; |
221 descriptor->register_params_ = registers_no_args; | 226 descriptor->register_params_ = registers_no_args; |
222 } else { | 227 } else { |
223 // stack param count needs (constructor pointer, and single argument) | 228 // stack param count needs (constructor pointer, and single argument) |
224 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; | 229 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; |
225 descriptor->stack_parameter_count_ = a0; | 230 descriptor->stack_parameter_count_ = a0; |
226 descriptor->register_param_count_ = 3; | 231 descriptor->register_param_count_ = 3; |
227 descriptor->register_params_ = registers_variable_args; | 232 descriptor->register_params_ = registers_variable_args; |
| 233 static Representation representations[] = { |
| 234 Representation::Tagged(), |
| 235 Representation::Tagged(), |
| 236 Representation::Integer32() }; |
| 237 descriptor->register_param_representations_ = representations; |
228 } | 238 } |
229 | 239 |
230 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; | 240 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; |
231 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; | 241 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; |
232 descriptor->deoptimization_handler_ = | 242 descriptor->deoptimization_handler_ = |
233 Runtime::FunctionForId(Runtime::kHiddenArrayConstructor)->entry; | 243 Runtime::FunctionForId(Runtime::kHiddenArrayConstructor)->entry; |
234 } | 244 } |
235 | 245 |
236 | 246 |
237 static void InitializeInternalArrayConstructorDescriptor( | 247 static void InitializeInternalArrayConstructorDescriptor( |
238 CodeStubInterfaceDescriptor* descriptor, | 248 CodeStubInterfaceDescriptor* descriptor, |
239 int constant_stack_parameter_count) { | 249 int constant_stack_parameter_count) { |
240 // register state | 250 // register state |
241 // a0 -- number of arguments | 251 // a0 -- number of arguments |
242 // a1 -- constructor function | 252 // a1 -- constructor function |
243 static Register registers_variable_args[] = { a1, a0 }; | 253 static Register registers_variable_args[] = { a1, a0 }; |
244 static Register registers_no_args[] = { a1 }; | 254 static Register registers_no_args[] = { a1 }; |
245 | 255 |
246 if (constant_stack_parameter_count == 0) { | 256 if (constant_stack_parameter_count == 0) { |
247 descriptor->register_param_count_ = 1; | 257 descriptor->register_param_count_ = 1; |
248 descriptor->register_params_ = registers_no_args; | 258 descriptor->register_params_ = registers_no_args; |
249 } else { | 259 } else { |
250 // stack param count needs (constructor pointer, and single argument) | 260 // stack param count needs (constructor pointer, and single argument) |
251 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; | 261 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; |
252 descriptor->stack_parameter_count_ = a0; | 262 descriptor->stack_parameter_count_ = a0; |
253 descriptor->register_param_count_ = 2; | 263 descriptor->register_param_count_ = 2; |
254 descriptor->register_params_ = registers_variable_args; | 264 descriptor->register_params_ = registers_variable_args; |
| 265 static Representation representations[] = { |
| 266 Representation::Tagged(), |
| 267 Representation::Integer32() }; |
| 268 descriptor->register_param_representations_ = representations; |
255 } | 269 } |
256 | 270 |
257 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; | 271 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; |
258 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; | 272 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; |
259 descriptor->deoptimization_handler_ = | 273 descriptor->deoptimization_handler_ = |
260 Runtime::FunctionForId(Runtime::kHiddenInternalArrayConstructor)->entry; | 274 Runtime::FunctionForId(Runtime::kHiddenInternalArrayConstructor)->entry; |
261 } | 275 } |
262 | 276 |
263 | 277 |
264 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( | 278 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( |
(...skipping 5088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5353 MemOperand(fp, 6 * kPointerSize), | 5367 MemOperand(fp, 6 * kPointerSize), |
5354 NULL); | 5368 NULL); |
5355 } | 5369 } |
5356 | 5370 |
5357 | 5371 |
5358 #undef __ | 5372 #undef __ |
5359 | 5373 |
5360 } } // namespace v8::internal | 5374 } } // namespace v8::internal |
5361 | 5375 |
5362 #endif // V8_TARGET_ARCH_MIPS | 5376 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |