| 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/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 MemOperand(r2, ConstructFrameConstants::kOriginalConstructorOffset)); | 270 MemOperand(r2, ConstructFrameConstants::kOriginalConstructorOffset)); |
| 271 __ b(&done); | 271 __ b(&done); |
| 272 | 272 |
| 273 __ bind(&non_construct_frame); | 273 __ bind(&non_construct_frame); |
| 274 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); | 274 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); |
| 275 __ bind(&done); | 275 __ bind(&done); |
| 276 | 276 |
| 277 SetVar(new_target_var, r0, r2, r3); | 277 SetVar(new_target_var, r0, r2, r3); |
| 278 } | 278 } |
| 279 | 279 |
| 280 // Possibly allocate RestParameters | |
| 281 int rest_index; | |
| 282 Variable* rest_param = scope()->rest_parameter(&rest_index); | |
| 283 if (rest_param) { | |
| 284 Comment cmnt(masm_, "[ Allocate rest parameter array"); | |
| 285 | |
| 286 int num_parameters = info->scope()->num_parameters(); | |
| 287 int offset = num_parameters * kPointerSize; | |
| 288 | |
| 289 __ add(r3, fp, Operand(StandardFrameConstants::kCallerSPOffset + offset)); | |
| 290 __ mov(r2, Operand(Smi::FromInt(num_parameters))); | |
| 291 __ mov(r1, Operand(Smi::FromInt(rest_index))); | |
| 292 __ mov(r0, Operand(Smi::FromInt(language_mode()))); | |
| 293 __ Push(r3, r2, r1, r0); | |
| 294 function_in_register_r1 = false; | |
| 295 | |
| 296 RestParamAccessStub stub(isolate()); | |
| 297 __ CallStub(&stub); | |
| 298 | |
| 299 SetVar(rest_param, r0, r1, r2); | |
| 300 } | |
| 301 | |
| 302 Variable* arguments = scope()->arguments(); | 280 Variable* arguments = scope()->arguments(); |
| 303 if (arguments != NULL) { | 281 if (arguments != NULL) { |
| 304 // Function uses arguments object. | 282 // Function uses arguments object. |
| 305 Comment cmnt(masm_, "[ Allocate arguments object"); | 283 Comment cmnt(masm_, "[ Allocate arguments object"); |
| 306 if (!function_in_register_r1) { | 284 if (!function_in_register_r1) { |
| 307 // Load this again, if it's used by the local context below. | 285 // Load this again, if it's used by the local context below. |
| 308 __ ldr(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 286 __ ldr(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
| 309 } else { | 287 } else { |
| 310 __ mov(r3, r1); | 288 __ mov(r3, r1); |
| 311 } | 289 } |
| (...skipping 5062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5374 DCHECK(interrupt_address == | 5352 DCHECK(interrupt_address == |
| 5375 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5353 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 5376 return OSR_AFTER_STACK_CHECK; | 5354 return OSR_AFTER_STACK_CHECK; |
| 5377 } | 5355 } |
| 5378 | 5356 |
| 5379 | 5357 |
| 5380 } // namespace internal | 5358 } // namespace internal |
| 5381 } // namespace v8 | 5359 } // namespace v8 |
| 5382 | 5360 |
| 5383 #endif // V8_TARGET_ARCH_ARM | 5361 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |