| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 149 |
| 150 // Possibly allocate a local context. | 150 // Possibly allocate a local context. |
| 151 if (info()->scope()->NeedsContext()) { | 151 if (info()->scope()->NeedsContext()) { |
| 152 Comment(";;; Allocate local context"); | 152 Comment(";;; Allocate local context"); |
| 153 bool need_write_barrier = true; | 153 bool need_write_barrier = true; |
| 154 // Argument to NewContext is the function, which is in r3. | 154 // Argument to NewContext is the function, which is in r3. |
| 155 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; | 155 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
| 156 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; | 156 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; |
| 157 if (info()->scope()->is_script_scope()) { | 157 if (info()->scope()->is_script_scope()) { |
| 158 __ push(r3); | 158 __ push(r3); |
| 159 __ Push(info()->scope()->GetScopeInfo(info()->isolate())); | 159 __ Push(info()->scope()->scope_info()); |
| 160 __ CallRuntime(Runtime::kNewScriptContext); | 160 __ CallRuntime(Runtime::kNewScriptContext); |
| 161 deopt_mode = Safepoint::kLazyDeopt; | 161 deopt_mode = Safepoint::kLazyDeopt; |
| 162 } else { | 162 } else { |
| 163 FastNewFunctionContextStub stub(isolate()); | 163 FastNewFunctionContextStub stub(isolate()); |
| 164 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), Operand(slots)); | 164 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), Operand(slots)); |
| 165 __ CallStub(&stub); | 165 __ CallStub(&stub); |
| 166 // Result of FastNewFunctionContextStub is always in new space. | 166 // Result of FastNewFunctionContextStub is always in new space. |
| 167 need_write_barrier = false; | 167 need_write_barrier = false; |
| 168 } | 168 } |
| 169 RecordSafepoint(deopt_mode); | 169 RecordSafepoint(deopt_mode); |
| (...skipping 5495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5665 __ LoadP(result, | 5665 __ LoadP(result, |
| 5666 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5666 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
| 5667 __ bind(deferred->exit()); | 5667 __ bind(deferred->exit()); |
| 5668 __ bind(&done); | 5668 __ bind(&done); |
| 5669 } | 5669 } |
| 5670 | 5670 |
| 5671 #undef __ | 5671 #undef __ |
| 5672 | 5672 |
| 5673 } // namespace internal | 5673 } // namespace internal |
| 5674 } // namespace v8 | 5674 } // namespace v8 |
| OLD | NEW |