| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
| 8 | 8 |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 int num_parameters = info->scope()->num_parameters(); | 262 int num_parameters = info->scope()->num_parameters(); |
| 263 int offset = num_parameters * kPointerSize; | 263 int offset = num_parameters * kPointerSize; |
| 264 if (has_new_target == ArgumentsAccessStub::HAS_NEW_TARGET) { | 264 if (has_new_target == ArgumentsAccessStub::HAS_NEW_TARGET) { |
| 265 --num_parameters; | 265 --num_parameters; |
| 266 ++rest_index; | 266 ++rest_index; |
| 267 } | 267 } |
| 268 | 268 |
| 269 __ Add(x3, fp, StandardFrameConstants::kCallerSPOffset + offset); | 269 __ Add(x3, fp, StandardFrameConstants::kCallerSPOffset + offset); |
| 270 __ Mov(x2, Smi::FromInt(num_parameters)); | 270 __ Mov(x2, Smi::FromInt(num_parameters)); |
| 271 __ Mov(x1, Smi::FromInt(rest_index)); | 271 __ Mov(x1, Smi::FromInt(rest_index)); |
| 272 __ Push(x3, x2, x1); | 272 __ Mov(x0, Smi::FromInt(language_mode())); |
| 273 __ Push(x3, x2, x1, x0); |
| 273 | 274 |
| 274 RestParamAccessStub stub(isolate()); | 275 RestParamAccessStub stub(isolate()); |
| 275 __ CallStub(&stub); | 276 __ CallStub(&stub); |
| 276 | 277 |
| 277 SetVar(rest_param, x0, x1, x2); | 278 SetVar(rest_param, x0, x1, x2); |
| 278 } | 279 } |
| 279 | 280 |
| 280 Variable* arguments = scope()->arguments(); | 281 Variable* arguments = scope()->arguments(); |
| 281 if (arguments != NULL) { | 282 if (arguments != NULL) { |
| 282 // Function uses arguments object. | 283 // Function uses arguments object. |
| (...skipping 5253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5536 } | 5537 } |
| 5537 } | 5538 } |
| 5538 | 5539 |
| 5539 return INTERRUPT; | 5540 return INTERRUPT; |
| 5540 } | 5541 } |
| 5541 | 5542 |
| 5542 | 5543 |
| 5543 } } // namespace v8::internal | 5544 } } // namespace v8::internal |
| 5544 | 5545 |
| 5545 #endif // V8_TARGET_ARCH_ARM64 | 5546 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |