| 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 #if V8_TARGET_ARCH_ARM | 5 #if V8_TARGET_ARCH_ARM |
| 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 } | 246 } |
| 247 | 247 |
| 248 // Possibly set up a local binding to the new target value. | 248 // Possibly set up a local binding to the new target value. |
| 249 Variable* new_target_var = info->scope()->new_target_var(); | 249 Variable* new_target_var = info->scope()->new_target_var(); |
| 250 if (new_target_var != nullptr) { | 250 if (new_target_var != nullptr) { |
| 251 Comment cmnt(masm_, "[ new.target"); | 251 Comment cmnt(masm_, "[ new.target"); |
| 252 SetVar(new_target_var, r3, r0, r2); | 252 SetVar(new_target_var, r3, r0, r2); |
| 253 } | 253 } |
| 254 | 254 |
| 255 // Possibly allocate RestParameters | 255 // Possibly allocate RestParameters |
| 256 int rest_index; | 256 Variable* rest_param = info->scope()->rest_parameter(); |
| 257 Variable* rest_param = info->scope()->rest_parameter(&rest_index); | 257 if (rest_param != nullptr) { |
| 258 if (rest_param) { | |
| 259 Comment cmnt(masm_, "[ Allocate rest parameter array"); | 258 Comment cmnt(masm_, "[ Allocate rest parameter array"); |
| 260 if (!function_in_register_r1) { | 259 if (!function_in_register_r1) { |
| 261 __ ldr(r1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 260 __ ldr(r1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
| 262 } | 261 } |
| 263 FastNewRestParameterStub stub(isolate()); | 262 FastNewRestParameterStub stub(isolate()); |
| 264 __ CallStub(&stub); | 263 __ CallStub(&stub); |
| 265 function_in_register_r1 = false; | 264 function_in_register_r1 = false; |
| 266 SetVar(rest_param, r0, r1, r2); | 265 SetVar(rest_param, r0, r1, r2); |
| 267 } | 266 } |
| 268 | 267 |
| (...skipping 3547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3816 DCHECK(interrupt_address == | 3815 DCHECK(interrupt_address == |
| 3817 isolate->builtins()->OnStackReplacement()->entry()); | 3816 isolate->builtins()->OnStackReplacement()->entry()); |
| 3818 return ON_STACK_REPLACEMENT; | 3817 return ON_STACK_REPLACEMENT; |
| 3819 } | 3818 } |
| 3820 | 3819 |
| 3821 | 3820 |
| 3822 } // namespace internal | 3821 } // namespace internal |
| 3823 } // namespace v8 | 3822 } // namespace v8 |
| 3824 | 3823 |
| 3825 #endif // V8_TARGET_ARCH_ARM | 3824 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |