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 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "src/arm64/macro-assembler-arm64-inl.h" | 7 #include "src/arm64/macro-assembler-arm64-inl.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/builtins/builtins-constructor.h" | 10 #include "src/builtins/builtins-constructor.h" |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 __ Push(x1, x10); | 197 __ Push(x1, x10); |
198 __ CallRuntime(Runtime::kNewScriptContext); | 198 __ CallRuntime(Runtime::kNewScriptContext); |
199 PrepareForBailoutForId(BailoutId::ScriptContext(), | 199 PrepareForBailoutForId(BailoutId::ScriptContext(), |
200 BailoutState::TOS_REGISTER); | 200 BailoutState::TOS_REGISTER); |
201 // The new target value is not used, clobbering is safe. | 201 // The new target value is not used, clobbering is safe. |
202 DCHECK_NULL(info->scope()->new_target_var()); | 202 DCHECK_NULL(info->scope()->new_target_var()); |
203 } else { | 203 } else { |
204 if (info->scope()->new_target_var() != nullptr) { | 204 if (info->scope()->new_target_var() != nullptr) { |
205 __ Push(x3); // Preserve new target. | 205 __ Push(x3); // Preserve new target. |
206 } | 206 } |
207 if (slots <= | 207 if (slots <= ConstructorBuiltins::MaximumFunctionContextSlots()) { |
208 ConstructorBuiltinsAssembler::MaximumFunctionContextSlots()) { | |
209 Callable callable = CodeFactory::FastNewFunctionContext( | 208 Callable callable = CodeFactory::FastNewFunctionContext( |
210 isolate(), info->scope()->scope_type()); | 209 isolate(), info->scope()->scope_type()); |
211 __ Mov(FastNewFunctionContextDescriptor::SlotsRegister(), slots); | 210 __ Mov(FastNewFunctionContextDescriptor::SlotsRegister(), slots); |
212 __ Call(callable.code(), RelocInfo::CODE_TARGET); | 211 __ Call(callable.code(), RelocInfo::CODE_TARGET); |
213 // Result of the FastNewFunctionContext builtin is always in new space. | 212 // Result of the FastNewFunctionContext builtin is always in new space. |
214 need_write_barrier = false; | 213 need_write_barrier = false; |
215 } else { | 214 } else { |
216 __ Push(x1); | 215 __ Push(x1); |
217 __ Push(Smi::FromInt(info->scope()->scope_type())); | 216 __ Push(Smi::FromInt(info->scope()->scope_type())); |
218 __ CallRuntime(Runtime::kNewFunctionContext); | 217 __ CallRuntime(Runtime::kNewFunctionContext); |
(...skipping 2618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2837 } | 2836 } |
2838 | 2837 |
2839 return INTERRUPT; | 2838 return INTERRUPT; |
2840 } | 2839 } |
2841 | 2840 |
2842 | 2841 |
2843 } // namespace internal | 2842 } // namespace internal |
2844 } // namespace v8 | 2843 } // namespace v8 |
2845 | 2844 |
2846 #endif // V8_TARGET_ARCH_ARM64 | 2845 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |