| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // | 2 // |
| 3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 5 | 5 |
| 6 #include "src/crankshaft/s390/lithium-codegen-s390.h" | 6 #include "src/crankshaft/s390/lithium-codegen-s390.h" |
| 7 | 7 |
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 Comment(";;; Allocate local context"); | 155 Comment(";;; Allocate local context"); |
| 156 bool need_write_barrier = true; | 156 bool need_write_barrier = true; |
| 157 // Argument to NewContext is the function, which is in r3. | 157 // Argument to NewContext is the function, which is in r3. |
| 158 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; | 158 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
| 159 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; | 159 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; |
| 160 if (info()->scope()->is_script_scope()) { | 160 if (info()->scope()->is_script_scope()) { |
| 161 __ push(r3); | 161 __ push(r3); |
| 162 __ Push(info()->scope()->GetScopeInfo(info()->isolate())); | 162 __ Push(info()->scope()->GetScopeInfo(info()->isolate())); |
| 163 __ CallRuntime(Runtime::kNewScriptContext); | 163 __ CallRuntime(Runtime::kNewScriptContext); |
| 164 deopt_mode = Safepoint::kLazyDeopt; | 164 deopt_mode = Safepoint::kLazyDeopt; |
| 165 } else if (slots <= FastNewContextStub::kMaximumSlots) { | 165 } else if (slots <= FastNewFunctionContextStub::kMaximumSlots) { |
| 166 FastNewContextStub stub(isolate(), slots); | 166 FastNewFunctionContextStub stub(isolate(), slots); |
| 167 __ CallStub(&stub); | 167 __ CallStub(&stub); |
| 168 // Result of FastNewContextStub is always in new space. | 168 // Result of FastNewFunctionContextStub is always in new space. |
| 169 need_write_barrier = false; | 169 need_write_barrier = false; |
| 170 } else { | 170 } else { |
| 171 __ push(r3); | 171 __ push(r3); |
| 172 __ CallRuntime(Runtime::kNewFunctionContext); | 172 __ CallRuntime(Runtime::kNewFunctionContext); |
| 173 } | 173 } |
| 174 RecordSafepoint(deopt_mode); | 174 RecordSafepoint(deopt_mode); |
| 175 | 175 |
| 176 // Context is returned in both r2 and cp. It replaces the context | 176 // Context is returned in both r2 and cp. It replaces the context |
| 177 // passed to us. It's saved in the stack and kept live in cp. | 177 // passed to us. It's saved in the stack and kept live in cp. |
| 178 __ LoadRR(cp, r2); | 178 __ LoadRR(cp, r2); |
| (...skipping 5494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5673 __ LoadP(result, | 5673 __ LoadP(result, |
| 5674 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5674 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
| 5675 __ bind(deferred->exit()); | 5675 __ bind(deferred->exit()); |
| 5676 __ bind(&done); | 5676 __ bind(&done); |
| 5677 } | 5677 } |
| 5678 | 5678 |
| 5679 #undef __ | 5679 #undef __ |
| 5680 | 5680 |
| 5681 } // namespace internal | 5681 } // namespace internal |
| 5682 } // namespace v8 | 5682 } // namespace v8 |
| OLD | NEW |