| 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" | |
| 8 #include "src/ast/compile-time-value.h" | 7 #include "src/ast/compile-time-value.h" |
| 9 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
| 9 #include "src/builtins/builtins-constructor.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| 11 #include "src/code-stubs.h" | 11 #include "src/code-stubs.h" |
| 12 #include "src/codegen.h" | 12 #include "src/codegen.h" |
| 13 #include "src/compilation-info.h" | 13 #include "src/compilation-info.h" |
| 14 #include "src/compiler.h" | 14 #include "src/compiler.h" |
| 15 #include "src/debug/debug.h" | 15 #include "src/debug/debug.h" |
| 16 #include "src/full-codegen/full-codegen.h" |
| 16 #include "src/ic/ic.h" | 17 #include "src/ic/ic.h" |
| 17 | 18 |
| 18 #include "src/arm/code-stubs-arm.h" | 19 #include "src/arm/code-stubs-arm.h" |
| 19 #include "src/arm/macro-assembler-arm.h" | 20 #include "src/arm/macro-assembler-arm.h" |
| 20 | 21 |
| 21 namespace v8 { | 22 namespace v8 { |
| 22 namespace internal { | 23 namespace internal { |
| 23 | 24 |
| 24 #define __ ACCESS_MASM(masm()) | 25 #define __ ACCESS_MASM(masm()) |
| 25 | 26 |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 __ Push(info->scope()->scope_info()); | 192 __ Push(info->scope()->scope_info()); |
| 192 __ CallRuntime(Runtime::kNewScriptContext); | 193 __ CallRuntime(Runtime::kNewScriptContext); |
| 193 PrepareForBailoutForId(BailoutId::ScriptContext(), | 194 PrepareForBailoutForId(BailoutId::ScriptContext(), |
| 194 BailoutState::TOS_REGISTER); | 195 BailoutState::TOS_REGISTER); |
| 195 // The new target value is not used, clobbering is safe. | 196 // The new target value is not used, clobbering is safe. |
| 196 DCHECK_NULL(info->scope()->new_target_var()); | 197 DCHECK_NULL(info->scope()->new_target_var()); |
| 197 } else { | 198 } else { |
| 198 if (info->scope()->new_target_var() != nullptr) { | 199 if (info->scope()->new_target_var() != nullptr) { |
| 199 __ push(r3); // Preserve new target. | 200 __ push(r3); // Preserve new target. |
| 200 } | 201 } |
| 201 if (slots <= FastNewFunctionContextStub::MaximumSlots()) { | 202 if (slots <= |
| 202 FastNewFunctionContextStub stub(isolate(), info->scope()->scope_type()); | 203 ConstructorBuiltinsAssembler::MaximumFunctionContextSlots()) { |
| 204 Callable callable = CodeFactory::FastNewFunctionContext( |
| 205 isolate(), info->scope()->scope_type()); |
| 203 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), | 206 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), |
| 204 Operand(slots)); | 207 Operand(slots)); |
| 205 __ CallStub(&stub); | 208 __ Call(callable.code(), RelocInfo::CODE_TARGET); |
| 206 // Result of FastNewFunctionContextStub is always in new space. | 209 // Result of the FastNewFunctionContext builtin is always in new space. |
| 207 need_write_barrier = false; | 210 need_write_barrier = false; |
| 208 } else { | 211 } else { |
| 209 __ push(r1); | 212 __ push(r1); |
| 210 __ Push(Smi::FromInt(info->scope()->scope_type())); | 213 __ Push(Smi::FromInt(info->scope()->scope_type())); |
| 211 __ CallRuntime(Runtime::kNewFunctionContext); | 214 __ CallRuntime(Runtime::kNewFunctionContext); |
| 212 } | 215 } |
| 213 if (info->scope()->new_target_var() != nullptr) { | 216 if (info->scope()->new_target_var() != nullptr) { |
| 214 __ pop(r3); // Preserve new target. | 217 __ pop(r3); // Preserve new target. |
| 215 } | 218 } |
| 216 } | 219 } |
| (...skipping 2701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2918 DCHECK(interrupt_address == | 2921 DCHECK(interrupt_address == |
| 2919 isolate->builtins()->OnStackReplacement()->entry()); | 2922 isolate->builtins()->OnStackReplacement()->entry()); |
| 2920 return ON_STACK_REPLACEMENT; | 2923 return ON_STACK_REPLACEMENT; |
| 2921 } | 2924 } |
| 2922 | 2925 |
| 2923 | 2926 |
| 2924 } // namespace internal | 2927 } // namespace internal |
| 2925 } // namespace v8 | 2928 } // namespace v8 |
| 2926 | 2929 |
| 2927 #endif // V8_TARGET_ARCH_ARM | 2930 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |