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/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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 __ Push(x1, x10); | 196 __ Push(x1, x10); |
197 __ CallRuntime(Runtime::kNewScriptContext); | 197 __ CallRuntime(Runtime::kNewScriptContext); |
198 PrepareForBailoutForId(BailoutId::ScriptContext(), | 198 PrepareForBailoutForId(BailoutId::ScriptContext(), |
199 BailoutState::TOS_REGISTER); | 199 BailoutState::TOS_REGISTER); |
200 // The new target value is not used, clobbering is safe. | 200 // The new target value is not used, clobbering is safe. |
201 DCHECK_NULL(info->scope()->new_target_var()); | 201 DCHECK_NULL(info->scope()->new_target_var()); |
202 } else { | 202 } else { |
203 if (info->scope()->new_target_var() != nullptr) { | 203 if (info->scope()->new_target_var() != nullptr) { |
204 __ Push(x3); // Preserve new target. | 204 __ Push(x3); // Preserve new target. |
205 } | 205 } |
206 FastNewFunctionContextStub stub(isolate()); | 206 FastNewFunctionContextStub stub(isolate(), |
| 207 info->scope()->is_eval_scope()); |
207 __ Mov(FastNewFunctionContextDescriptor::SlotsRegister(), slots); | 208 __ Mov(FastNewFunctionContextDescriptor::SlotsRegister(), slots); |
208 __ CallStub(&stub); | 209 __ CallStub(&stub); |
209 // Result of FastNewFunctionContextStub is always in new space. | 210 // Result of FastNewFunctionContextStub is always in new space. |
210 need_write_barrier = false; | 211 need_write_barrier = false; |
211 if (info->scope()->new_target_var() != nullptr) { | 212 if (info->scope()->new_target_var() != nullptr) { |
212 __ Pop(x3); // Restore new target. | 213 __ Pop(x3); // Restore new target. |
213 } | 214 } |
214 } | 215 } |
215 function_in_register_x1 = false; | 216 function_in_register_x1 = false; |
216 // Context is returned in x0. It replaces the context passed to us. | 217 // Context is returned in x0. It replaces the context passed to us. |
(...skipping 3482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3699 } | 3700 } |
3700 | 3701 |
3701 return INTERRUPT; | 3702 return INTERRUPT; |
3702 } | 3703 } |
3703 | 3704 |
3704 | 3705 |
3705 } // namespace internal | 3706 } // namespace internal |
3706 } // namespace v8 | 3707 } // namespace v8 |
3707 | 3708 |
3708 #endif // V8_TARGET_ARCH_ARM64 | 3709 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |