| 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" | 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 __ Push(info->scope()->scope_info()); | 191 __ Push(info->scope()->scope_info()); |
| 192 __ CallRuntime(Runtime::kNewScriptContext); | 192 __ CallRuntime(Runtime::kNewScriptContext); |
| 193 PrepareForBailoutForId(BailoutId::ScriptContext(), | 193 PrepareForBailoutForId(BailoutId::ScriptContext(), |
| 194 BailoutState::TOS_REGISTER); | 194 BailoutState::TOS_REGISTER); |
| 195 // The new target value is not used, clobbering is safe. | 195 // The new target value is not used, clobbering is safe. |
| 196 DCHECK_NULL(info->scope()->new_target_var()); | 196 DCHECK_NULL(info->scope()->new_target_var()); |
| 197 } else { | 197 } else { |
| 198 if (info->scope()->new_target_var() != nullptr) { | 198 if (info->scope()->new_target_var() != nullptr) { |
| 199 __ push(r3); // Preserve new target. | 199 __ push(r3); // Preserve new target. |
| 200 } | 200 } |
| 201 if (slots <= FastNewFunctionContextStub::kMaximumSlots) { | 201 if (slots <= FastNewFunctionContextStub::MaximumSlots()) { |
| 202 FastNewFunctionContextStub stub(isolate()); | 202 FastNewFunctionContextStub stub(isolate(), info->scope()->scope_type()); |
| 203 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), | 203 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), |
| 204 Operand(slots)); | 204 Operand(slots)); |
| 205 __ CallStub(&stub); | 205 __ CallStub(&stub); |
| 206 // Result of FastNewFunctionContextStub is always in new space. | 206 // Result of FastNewFunctionContextStub is always in new space. |
| 207 need_write_barrier = false; | 207 need_write_barrier = false; |
| 208 } else { | 208 } else { |
| 209 __ push(r1); | 209 __ push(r1); |
| 210 __ Push(Smi::FromInt(info->scope()->scope_type())); |
| 210 __ CallRuntime(Runtime::kNewFunctionContext); | 211 __ CallRuntime(Runtime::kNewFunctionContext); |
| 211 } | 212 } |
| 212 if (info->scope()->new_target_var() != nullptr) { | 213 if (info->scope()->new_target_var() != nullptr) { |
| 213 __ pop(r3); // Preserve new target. | 214 __ pop(r3); // Preserve new target. |
| 214 } | 215 } |
| 215 } | 216 } |
| 216 function_in_register_r1 = false; | 217 function_in_register_r1 = false; |
| 217 // Context is returned in r0. It replaces the context passed to us. | 218 // Context is returned in r0. It replaces the context passed to us. |
| 218 // It's saved in the stack and kept live in cp. | 219 // It's saved in the stack and kept live in cp. |
| 219 __ mov(cp, r0); | 220 __ mov(cp, r0); |
| (...skipping 2699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2919 DCHECK(interrupt_address == | 2920 DCHECK(interrupt_address == |
| 2920 isolate->builtins()->OnStackReplacement()->entry()); | 2921 isolate->builtins()->OnStackReplacement()->entry()); |
| 2921 return ON_STACK_REPLACEMENT; | 2922 return ON_STACK_REPLACEMENT; |
| 2922 } | 2923 } |
| 2923 | 2924 |
| 2924 | 2925 |
| 2925 } // namespace internal | 2926 } // namespace internal |
| 2926 } // namespace v8 | 2927 } // namespace v8 |
| 2927 | 2928 |
| 2928 #endif // V8_TARGET_ARCH_ARM | 2929 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |