| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 __ Push(info->scope()->GetScopeInfo(info->isolate())); | 177 __ Push(info->scope()->GetScopeInfo(info->isolate())); |
| 178 __ CallRuntime(Runtime::kNewScriptContext); | 178 __ CallRuntime(Runtime::kNewScriptContext); |
| 179 PrepareForBailoutForId(BailoutId::ScriptContext(), | 179 PrepareForBailoutForId(BailoutId::ScriptContext(), |
| 180 BailoutState::TOS_REGISTER); | 180 BailoutState::TOS_REGISTER); |
| 181 // The new target value is not used, clobbering is safe. | 181 // The new target value is not used, clobbering is safe. |
| 182 DCHECK_NULL(info->scope()->new_target_var()); | 182 DCHECK_NULL(info->scope()->new_target_var()); |
| 183 } else { | 183 } else { |
| 184 if (info->scope()->new_target_var() != nullptr) { | 184 if (info->scope()->new_target_var() != nullptr) { |
| 185 __ push(r3); // Preserve new target. | 185 __ push(r3); // Preserve new target. |
| 186 } | 186 } |
| 187 FastNewFunctionContextStub stub(isolate()); | 187 if (slots <= FastNewFunctionContextStub::kMaximumSlots) { |
| 188 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), Operand(slots)); | 188 FastNewFunctionContextStub stub(isolate()); |
| 189 __ CallStub(&stub); | 189 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), |
| 190 // Result of FastNewFunctionContextStub is always in new space. | 190 Operand(slots)); |
| 191 need_write_barrier = false; | 191 __ CallStub(&stub); |
| 192 // Result of FastNewFunctionContextStub is always in new space. |
| 193 need_write_barrier = false; |
| 194 } else { |
| 195 __ push(r1); |
| 196 __ CallRuntime(Runtime::kNewFunctionContext); |
| 197 } |
| 192 if (info->scope()->new_target_var() != nullptr) { | 198 if (info->scope()->new_target_var() != nullptr) { |
| 193 __ pop(r3); // Preserve new target. | 199 __ pop(r3); // Preserve new target. |
| 194 } | 200 } |
| 195 } | 201 } |
| 196 function_in_register_r1 = false; | 202 function_in_register_r1 = false; |
| 197 // Context is returned in r0. It replaces the context passed to us. | 203 // Context is returned in r0. It replaces the context passed to us. |
| 198 // It's saved in the stack and kept live in cp. | 204 // It's saved in the stack and kept live in cp. |
| 199 __ mov(cp, r0); | 205 __ mov(cp, r0); |
| 200 __ str(r0, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 206 __ str(r0, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 201 // Copy any necessary parameters into the context. | 207 // Copy any necessary parameters into the context. |
| (...skipping 3614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3816 DCHECK(interrupt_address == | 3822 DCHECK(interrupt_address == |
| 3817 isolate->builtins()->OnStackReplacement()->entry()); | 3823 isolate->builtins()->OnStackReplacement()->entry()); |
| 3818 return ON_STACK_REPLACEMENT; | 3824 return ON_STACK_REPLACEMENT; |
| 3819 } | 3825 } |
| 3820 | 3826 |
| 3821 | 3827 |
| 3822 } // namespace internal | 3828 } // namespace internal |
| 3823 } // namespace v8 | 3829 } // namespace v8 |
| 3824 | 3830 |
| 3825 #endif // V8_TARGET_ARCH_ARM | 3831 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |