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_ARM | 7 #if V8_TARGET_ARCH_ARM |
8 | 8 |
9 #include "bootstrapper.h" | 9 #include "bootstrapper.h" |
10 #include "code-stubs.h" | 10 #include "code-stubs.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 descriptor->deoptimization_handler_ = | 51 descriptor->deoptimization_handler_ = |
52 Runtime::FunctionForId(Runtime::kHiddenNumberToString)->entry; | 52 Runtime::FunctionForId(Runtime::kHiddenNumberToString)->entry; |
53 } | 53 } |
54 | 54 |
55 | 55 |
56 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( | 56 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( |
57 CodeStubInterfaceDescriptor* descriptor) { | 57 CodeStubInterfaceDescriptor* descriptor) { |
58 static Register registers[] = { r3, r2, r1 }; | 58 static Register registers[] = { r3, r2, r1 }; |
59 descriptor->register_param_count_ = 3; | 59 descriptor->register_param_count_ = 3; |
60 descriptor->register_params_ = registers; | 60 descriptor->register_params_ = registers; |
| 61 static Representation representations[] = { |
| 62 Representation::Tagged(), |
| 63 Representation::Smi(), |
| 64 Representation::Tagged() }; |
| 65 descriptor->register_param_representations_ = representations; |
61 descriptor->deoptimization_handler_ = | 66 descriptor->deoptimization_handler_ = |
62 Runtime::FunctionForId( | 67 Runtime::FunctionForId( |
63 Runtime::kHiddenCreateArrayLiteralStubBailout)->entry; | 68 Runtime::kHiddenCreateArrayLiteralStubBailout)->entry; |
64 } | 69 } |
65 | 70 |
66 | 71 |
67 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( | 72 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( |
68 CodeStubInterfaceDescriptor* descriptor) { | 73 CodeStubInterfaceDescriptor* descriptor) { |
69 static Register registers[] = { r3, r2, r1, r0 }; | 74 static Register registers[] = { r3, r2, r1, r0 }; |
70 descriptor->register_param_count_ = 4; | 75 descriptor->register_param_count_ = 4; |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 | 199 |
195 if (constant_stack_parameter_count == 0) { | 200 if (constant_stack_parameter_count == 0) { |
196 descriptor->register_param_count_ = 2; | 201 descriptor->register_param_count_ = 2; |
197 descriptor->register_params_ = registers_no_args; | 202 descriptor->register_params_ = registers_no_args; |
198 } else { | 203 } else { |
199 // stack param count needs (constructor pointer, and single argument) | 204 // stack param count needs (constructor pointer, and single argument) |
200 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; | 205 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; |
201 descriptor->stack_parameter_count_ = r0; | 206 descriptor->stack_parameter_count_ = r0; |
202 descriptor->register_param_count_ = 3; | 207 descriptor->register_param_count_ = 3; |
203 descriptor->register_params_ = registers_variable_args; | 208 descriptor->register_params_ = registers_variable_args; |
| 209 static Representation representations[] = { |
| 210 Representation::Tagged(), |
| 211 Representation::Tagged(), |
| 212 Representation::Integer32() }; |
| 213 descriptor->register_param_representations_ = representations; |
204 } | 214 } |
205 | 215 |
206 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; | 216 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; |
207 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; | 217 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; |
208 descriptor->deoptimization_handler_ = | 218 descriptor->deoptimization_handler_ = |
209 Runtime::FunctionForId(Runtime::kHiddenArrayConstructor)->entry; | 219 Runtime::FunctionForId(Runtime::kHiddenArrayConstructor)->entry; |
210 } | 220 } |
211 | 221 |
212 | 222 |
213 static void InitializeInternalArrayConstructorDescriptor( | 223 static void InitializeInternalArrayConstructorDescriptor( |
214 CodeStubInterfaceDescriptor* descriptor, | 224 CodeStubInterfaceDescriptor* descriptor, |
215 int constant_stack_parameter_count) { | 225 int constant_stack_parameter_count) { |
216 // register state | 226 // register state |
217 // r0 -- number of arguments | 227 // r0 -- number of arguments |
218 // r1 -- constructor function | 228 // r1 -- constructor function |
219 static Register registers_variable_args[] = { r1, r0 }; | 229 static Register registers_variable_args[] = { r1, r0 }; |
220 static Register registers_no_args[] = { r1 }; | 230 static Register registers_no_args[] = { r1 }; |
221 | 231 |
222 if (constant_stack_parameter_count == 0) { | 232 if (constant_stack_parameter_count == 0) { |
223 descriptor->register_param_count_ = 1; | 233 descriptor->register_param_count_ = 1; |
224 descriptor->register_params_ = registers_no_args; | 234 descriptor->register_params_ = registers_no_args; |
225 } else { | 235 } else { |
226 // stack param count needs (constructor pointer, and single argument) | 236 // stack param count needs (constructor pointer, and single argument) |
227 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; | 237 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; |
228 descriptor->stack_parameter_count_ = r0; | 238 descriptor->stack_parameter_count_ = r0; |
229 descriptor->register_param_count_ = 2; | 239 descriptor->register_param_count_ = 2; |
230 descriptor->register_params_ = registers_variable_args; | 240 descriptor->register_params_ = registers_variable_args; |
| 241 static Representation representations[] = { |
| 242 Representation::Tagged(), |
| 243 Representation::Integer32() }; |
| 244 descriptor->register_param_representations_ = representations; |
231 } | 245 } |
232 | 246 |
233 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; | 247 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; |
234 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; | 248 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; |
235 descriptor->deoptimization_handler_ = | 249 descriptor->deoptimization_handler_ = |
236 Runtime::FunctionForId(Runtime::kHiddenInternalArrayConstructor)->entry; | 250 Runtime::FunctionForId(Runtime::kHiddenInternalArrayConstructor)->entry; |
237 } | 251 } |
238 | 252 |
239 | 253 |
240 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( | 254 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( |
(...skipping 4988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5229 MemOperand(fp, 6 * kPointerSize), | 5243 MemOperand(fp, 6 * kPointerSize), |
5230 NULL); | 5244 NULL); |
5231 } | 5245 } |
5232 | 5246 |
5233 | 5247 |
5234 #undef __ | 5248 #undef __ |
5235 | 5249 |
5236 } } // namespace v8::internal | 5250 } } // namespace v8::internal |
5237 | 5251 |
5238 #endif // V8_TARGET_ARCH_ARM | 5252 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |