OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_S390 | 5 #if V8_TARGET_ARCH_S390 |
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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 __ Push(info->scope()->scope_info()); | 203 __ Push(info->scope()->scope_info()); |
204 __ CallRuntime(Runtime::kNewScriptContext); | 204 __ CallRuntime(Runtime::kNewScriptContext); |
205 PrepareForBailoutForId(BailoutId::ScriptContext(), | 205 PrepareForBailoutForId(BailoutId::ScriptContext(), |
206 BailoutState::TOS_REGISTER); | 206 BailoutState::TOS_REGISTER); |
207 // The new target value is not used, clobbering is safe. | 207 // The new target value is not used, clobbering is safe. |
208 DCHECK_NULL(info->scope()->new_target_var()); | 208 DCHECK_NULL(info->scope()->new_target_var()); |
209 } else { | 209 } else { |
210 if (info->scope()->new_target_var() != nullptr) { | 210 if (info->scope()->new_target_var() != nullptr) { |
211 __ push(r5); // Preserve new target. | 211 __ push(r5); // Preserve new target. |
212 } | 212 } |
213 if (slots <= FastNewFunctionContextStub::kMaximumSlots) { | 213 if (slots <= FastNewFunctionContextStub::MaximumSlots()) { |
214 FastNewFunctionContextStub stub(isolate()); | 214 FastNewFunctionContextStub stub(isolate(), info->scope()->scope_type()); |
215 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), | 215 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), |
216 Operand(slots)); | 216 Operand(slots)); |
217 __ CallStub(&stub); | 217 __ CallStub(&stub); |
218 // Result of FastNewFunctionContextStub is always in new space. | 218 // Result of FastNewFunctionContextStub is always in new space. |
219 need_write_barrier = false; | 219 need_write_barrier = false; |
220 } else { | 220 } else { |
221 __ push(r3); | 221 __ push(r3); |
| 222 __ Push(Smi::FromInt(info->scope()->scope_type())); |
222 __ CallRuntime(Runtime::kNewFunctionContext); | 223 __ CallRuntime(Runtime::kNewFunctionContext); |
223 } | 224 } |
224 if (info->scope()->new_target_var() != nullptr) { | 225 if (info->scope()->new_target_var() != nullptr) { |
225 __ pop(r5); // Preserve new target. | 226 __ pop(r5); // Preserve new target. |
226 } | 227 } |
227 } | 228 } |
228 function_in_register_r3 = false; | 229 function_in_register_r3 = false; |
229 // Context is returned in r2. It replaces the context passed to us. | 230 // Context is returned in r2. It replaces the context passed to us. |
230 // It's saved in the stack and kept live in cp. | 231 // It's saved in the stack and kept live in cp. |
231 __ LoadRR(cp, r2); | 232 __ LoadRR(cp, r2); |
(...skipping 2563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2795 DCHECK(kOSRBranchInstruction == br_instr); | 2796 DCHECK(kOSRBranchInstruction == br_instr); |
2796 | 2797 |
2797 DCHECK(interrupt_address == | 2798 DCHECK(interrupt_address == |
2798 isolate->builtins()->OnStackReplacement()->entry()); | 2799 isolate->builtins()->OnStackReplacement()->entry()); |
2799 return ON_STACK_REPLACEMENT; | 2800 return ON_STACK_REPLACEMENT; |
2800 } | 2801 } |
2801 | 2802 |
2802 } // namespace internal | 2803 } // namespace internal |
2803 } // namespace v8 | 2804 } // namespace v8 |
2804 #endif // V8_TARGET_ARCH_S390 | 2805 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |