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/assembler-inl.h" | 7 #include "src/assembler-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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 __ Push(info->scope()->scope_info()); | 195 __ Push(info->scope()->scope_info()); |
196 __ CallRuntime(Runtime::kNewScriptContext); | 196 __ CallRuntime(Runtime::kNewScriptContext); |
197 PrepareForBailoutForId(BailoutId::ScriptContext(), | 197 PrepareForBailoutForId(BailoutId::ScriptContext(), |
198 BailoutState::TOS_REGISTER); | 198 BailoutState::TOS_REGISTER); |
199 // The new target value is not used, clobbering is safe. | 199 // The new target value is not used, clobbering is safe. |
200 DCHECK_NULL(info->scope()->new_target_var()); | 200 DCHECK_NULL(info->scope()->new_target_var()); |
201 } else { | 201 } else { |
202 if (info->scope()->new_target_var() != nullptr) { | 202 if (info->scope()->new_target_var() != nullptr) { |
203 __ push(r3); // Preserve new target. | 203 __ push(r3); // Preserve new target. |
204 } | 204 } |
205 if (slots <= | 205 if (slots <= ConstructorBuiltins::MaximumFunctionContextSlots()) { |
206 ConstructorBuiltinsAssembler::MaximumFunctionContextSlots()) { | |
207 Callable callable = CodeFactory::FastNewFunctionContext( | 206 Callable callable = CodeFactory::FastNewFunctionContext( |
208 isolate(), info->scope()->scope_type()); | 207 isolate(), info->scope()->scope_type()); |
209 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), | 208 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), |
210 Operand(slots)); | 209 Operand(slots)); |
211 __ Call(callable.code(), RelocInfo::CODE_TARGET); | 210 __ Call(callable.code(), RelocInfo::CODE_TARGET); |
212 // Result of the FastNewFunctionContext builtin is always in new space. | 211 // Result of the FastNewFunctionContext builtin is always in new space. |
213 need_write_barrier = false; | 212 need_write_barrier = false; |
214 } else { | 213 } else { |
215 __ push(r1); | 214 __ push(r1); |
216 __ Push(Smi::FromInt(info->scope()->scope_type())); | 215 __ Push(Smi::FromInt(info->scope()->scope_type())); |
(...skipping 2624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2841 DCHECK(interrupt_address == | 2840 DCHECK(interrupt_address == |
2842 isolate->builtins()->OnStackReplacement()->entry()); | 2841 isolate->builtins()->OnStackReplacement()->entry()); |
2843 return ON_STACK_REPLACEMENT; | 2842 return ON_STACK_REPLACEMENT; |
2844 } | 2843 } |
2845 | 2844 |
2846 | 2845 |
2847 } // namespace internal | 2846 } // namespace internal |
2848 } // namespace v8 | 2847 } // namespace v8 |
2849 | 2848 |
2850 #endif // V8_TARGET_ARCH_ARM | 2849 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |