| 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 __ Push(info->scope()->scope_info()); | 205 __ Push(info->scope()->scope_info()); |
| 206 __ CallRuntime(Runtime::kNewScriptContext); | 206 __ CallRuntime(Runtime::kNewScriptContext); |
| 207 PrepareForBailoutForId(BailoutId::ScriptContext(), | 207 PrepareForBailoutForId(BailoutId::ScriptContext(), |
| 208 BailoutState::TOS_REGISTER); | 208 BailoutState::TOS_REGISTER); |
| 209 // The new target value is not used, clobbering is safe. | 209 // The new target value is not used, clobbering is safe. |
| 210 DCHECK_NULL(info->scope()->new_target_var()); | 210 DCHECK_NULL(info->scope()->new_target_var()); |
| 211 } else { | 211 } else { |
| 212 if (info->scope()->new_target_var() != nullptr) { | 212 if (info->scope()->new_target_var() != nullptr) { |
| 213 __ push(r5); // Preserve new target. | 213 __ push(r5); // Preserve new target. |
| 214 } | 214 } |
| 215 FastNewFunctionContextStub stub(isolate()); | 215 if (slots <= FastNewFunctionContextStub::kMaximumSlots) { |
| 216 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), Operand(slots)); | 216 FastNewFunctionContextStub stub(isolate()); |
| 217 __ CallStub(&stub); | 217 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), |
| 218 // Result of FastNewFunctionContextStub is always in new space. | 218 Operand(slots)); |
| 219 need_write_barrier = false; | 219 __ CallStub(&stub); |
| 220 // Result of FastNewFunctionContextStub is always in new space. |
| 221 need_write_barrier = false; |
| 222 } else { |
| 223 __ push(r3); |
| 224 __ CallRuntime(Runtime::kNewFunctionContext); |
| 225 } |
| 220 if (info->scope()->new_target_var() != nullptr) { | 226 if (info->scope()->new_target_var() != nullptr) { |
| 221 __ pop(r5); // Preserve new target. | 227 __ pop(r5); // Preserve new target. |
| 222 } | 228 } |
| 223 } | 229 } |
| 224 function_in_register_r3 = false; | 230 function_in_register_r3 = false; |
| 225 // Context is returned in r2. It replaces the context passed to us. | 231 // Context is returned in r2. It replaces the context passed to us. |
| 226 // It's saved in the stack and kept live in cp. | 232 // It's saved in the stack and kept live in cp. |
| 227 __ LoadRR(cp, r2); | 233 __ LoadRR(cp, r2); |
| 228 __ StoreP(r2, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 234 __ StoreP(r2, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 229 // Copy any necessary parameters into the context. | 235 // Copy any necessary parameters into the context. |
| (...skipping 3344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3574 DCHECK(kOSRBranchInstruction == br_instr); | 3580 DCHECK(kOSRBranchInstruction == br_instr); |
| 3575 | 3581 |
| 3576 DCHECK(interrupt_address == | 3582 DCHECK(interrupt_address == |
| 3577 isolate->builtins()->OnStackReplacement()->entry()); | 3583 isolate->builtins()->OnStackReplacement()->entry()); |
| 3578 return ON_STACK_REPLACEMENT; | 3584 return ON_STACK_REPLACEMENT; |
| 3579 } | 3585 } |
| 3580 | 3586 |
| 3581 } // namespace internal | 3587 } // namespace internal |
| 3582 } // namespace v8 | 3588 } // namespace v8 |
| 3583 #endif // V8_TARGET_ARCH_S390 | 3589 #endif // V8_TARGET_ARCH_S390 |
| OLD | NEW |