| 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/full-codegen/full-codegen.h" | 7 #include "src/full-codegen/full-codegen.h" |
| 8 #include "src/ast/compile-time-value.h" | 8 #include "src/ast/compile-time-value.h" |
| 9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 __ Push(info->scope()->scope_info()); | 193 __ Push(info->scope()->scope_info()); |
| 194 __ CallRuntime(Runtime::kNewScriptContext); | 194 __ CallRuntime(Runtime::kNewScriptContext); |
| 195 PrepareForBailoutForId(BailoutId::ScriptContext(), | 195 PrepareForBailoutForId(BailoutId::ScriptContext(), |
| 196 BailoutState::TOS_REGISTER); | 196 BailoutState::TOS_REGISTER); |
| 197 // The new target value is not used, clobbering is safe. | 197 // The new target value is not used, clobbering is safe. |
| 198 DCHECK_NULL(info->scope()->new_target_var()); | 198 DCHECK_NULL(info->scope()->new_target_var()); |
| 199 } else { | 199 } else { |
| 200 if (info->scope()->new_target_var() != nullptr) { | 200 if (info->scope()->new_target_var() != nullptr) { |
| 201 __ push(r3); // Preserve new target. | 201 __ push(r3); // Preserve new target. |
| 202 } | 202 } |
| 203 FastNewFunctionContextStub stub(isolate()); | 203 if (slots <= FastNewFunctionContextStub::kMaximumSlots) { |
| 204 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), Operand(slots)); | 204 FastNewFunctionContextStub stub(isolate()); |
| 205 __ CallStub(&stub); | 205 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), |
| 206 // Result of FastNewFunctionContextStub is always in new space. | 206 Operand(slots)); |
| 207 need_write_barrier = false; | 207 __ CallStub(&stub); |
| 208 // Result of FastNewFunctionContextStub is always in new space. |
| 209 need_write_barrier = false; |
| 210 } else { |
| 211 __ push(r1); |
| 212 __ CallRuntime(Runtime::kNewFunctionContext); |
| 213 } |
| 208 if (info->scope()->new_target_var() != nullptr) { | 214 if (info->scope()->new_target_var() != nullptr) { |
| 209 __ pop(r3); // Preserve new target. | 215 __ pop(r3); // Preserve new target. |
| 210 } | 216 } |
| 211 } | 217 } |
| 212 function_in_register_r1 = false; | 218 function_in_register_r1 = false; |
| 213 // Context is returned in r0. It replaces the context passed to us. | 219 // Context is returned in r0. It replaces the context passed to us. |
| 214 // It's saved in the stack and kept live in cp. | 220 // It's saved in the stack and kept live in cp. |
| 215 __ mov(cp, r0); | 221 __ mov(cp, r0); |
| 216 __ str(r0, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 222 __ str(r0, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 217 // Copy any necessary parameters into the context. | 223 // Copy any necessary parameters into the context. |
| (...skipping 3480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3698 DCHECK(interrupt_address == | 3704 DCHECK(interrupt_address == |
| 3699 isolate->builtins()->OnStackReplacement()->entry()); | 3705 isolate->builtins()->OnStackReplacement()->entry()); |
| 3700 return ON_STACK_REPLACEMENT; | 3706 return ON_STACK_REPLACEMENT; |
| 3701 } | 3707 } |
| 3702 | 3708 |
| 3703 | 3709 |
| 3704 } // namespace internal | 3710 } // namespace internal |
| 3705 } // namespace v8 | 3711 } // namespace v8 |
| 3706 | 3712 |
| 3707 #endif // V8_TARGET_ARCH_ARM | 3713 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |