OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 } | 263 } |
264 | 264 |
265 // Possibly allocate RestParameters | 265 // Possibly allocate RestParameters |
266 int rest_index; | 266 int rest_index; |
267 Variable* rest_param = scope()->rest_parameter(&rest_index); | 267 Variable* rest_param = scope()->rest_parameter(&rest_index); |
268 if (rest_param) { | 268 if (rest_param) { |
269 Comment cmnt(masm_, "[ Allocate rest parameter array"); | 269 Comment cmnt(masm_, "[ Allocate rest parameter array"); |
270 | 270 |
271 int num_parameters = info->scope()->num_parameters(); | 271 int num_parameters = info->scope()->num_parameters(); |
272 int offset = num_parameters * kPointerSize; | 272 int offset = num_parameters * kPointerSize; |
| 273 __ Mov(RestParamAccessDescriptor::parameter_count(), |
| 274 Smi::FromInt(num_parameters)); |
| 275 __ Add(RestParamAccessDescriptor::parameter_pointer(), fp, |
| 276 StandardFrameConstants::kCallerSPOffset + offset); |
| 277 __ Mov(RestParamAccessDescriptor::rest_parameter_index(), |
| 278 Smi::FromInt(rest_index)); |
| 279 __ Mov(RestParamAccessDescriptor::language_mode(), |
| 280 Smi::FromInt(language_mode())); |
| 281 DCHECK(x1.is(RestParamAccessDescriptor::language_mode())); |
273 | 282 |
274 __ Add(x3, fp, StandardFrameConstants::kCallerSPOffset + offset); | |
275 __ Mov(x2, Smi::FromInt(num_parameters)); | |
276 __ Mov(x1, Smi::FromInt(rest_index)); | |
277 __ Mov(x0, Smi::FromInt(language_mode())); | |
278 __ Push(x3, x2, x1, x0); | |
279 function_in_register_x1 = false; | 283 function_in_register_x1 = false; |
280 | 284 |
281 RestParamAccessStub stub(isolate()); | 285 RestParamAccessStub stub(isolate()); |
282 __ CallStub(&stub); | 286 __ CallStub(&stub); |
283 | 287 |
284 SetVar(rest_param, x0, x1, x2); | 288 SetVar(rest_param, x0, x1, x2); |
285 } | 289 } |
286 | 290 |
287 Variable* arguments = scope()->arguments(); | 291 Variable* arguments = scope()->arguments(); |
288 if (arguments != NULL) { | 292 if (arguments != NULL) { |
(...skipping 4603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4892 } | 4896 } |
4893 | 4897 |
4894 return INTERRUPT; | 4898 return INTERRUPT; |
4895 } | 4899 } |
4896 | 4900 |
4897 | 4901 |
4898 } // namespace internal | 4902 } // namespace internal |
4899 } // namespace v8 | 4903 } // namespace v8 |
4900 | 4904 |
4901 #endif // V8_TARGET_ARCH_ARM64 | 4905 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |