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