| 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" |
| 11 #include "src/crankshaft/hydrogen-osr.h" | 11 #include "src/crankshaft/hydrogen-osr.h" |
| 12 #include "src/crankshaft/s390/lithium-gap-resolver-s390.h" | 12 #include "src/crankshaft/s390/lithium-gap-resolver-s390.h" |
| 13 #include "src/ic/ic.h" | 13 #include "src/ic/ic.h" |
| 14 #include "src/ic/stub-cache.h" | 14 #include "src/ic/stub-cache.h" |
| 15 #include "src/profiler/cpu-profiler.h" | |
| 16 | 15 |
| 17 namespace v8 { | 16 namespace v8 { |
| 18 namespace internal { | 17 namespace internal { |
| 19 | 18 |
| 20 class SafepointGenerator final : public CallWrapper { | 19 class SafepointGenerator final : public CallWrapper { |
| 21 public: | 20 public: |
| 22 SafepointGenerator(LCodeGen* codegen, LPointerMap* pointers, | 21 SafepointGenerator(LCodeGen* codegen, LPointerMap* pointers, |
| 23 Safepoint::DeoptMode mode) | 22 Safepoint::DeoptMode mode) |
| 24 : codegen_(codegen), pointers_(pointers), deopt_mode_(mode) {} | 23 : codegen_(codegen), pointers_(pointers), deopt_mode_(mode) {} |
| 25 virtual ~SafepointGenerator() {} | 24 virtual ~SafepointGenerator() {} |
| (...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 DCHECK(info()->IsStub() || frame_is_built_); | 748 DCHECK(info()->IsStub() || frame_is_built_); |
| 750 // Go through jump table if we need to handle condition, build frame, or | 749 // Go through jump table if we need to handle condition, build frame, or |
| 751 // restore caller doubles. | 750 // restore caller doubles. |
| 752 if (cond == al && frame_is_built_ && !info()->saves_caller_doubles()) { | 751 if (cond == al && frame_is_built_ && !info()->saves_caller_doubles()) { |
| 753 __ Call(entry, RelocInfo::RUNTIME_ENTRY); | 752 __ Call(entry, RelocInfo::RUNTIME_ENTRY); |
| 754 } else { | 753 } else { |
| 755 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, | 754 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, |
| 756 !frame_is_built_); | 755 !frame_is_built_); |
| 757 // We often have several deopts to the same entry, reuse the last | 756 // We often have several deopts to the same entry, reuse the last |
| 758 // jump entry if this is the case. | 757 // jump entry if this is the case. |
| 759 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || | 758 if (FLAG_trace_deopt || isolate()->is_profiling() || |
| 760 jump_table_.is_empty() || | 759 jump_table_.is_empty() || |
| 761 !table_entry.IsEquivalentTo(jump_table_.last())) { | 760 !table_entry.IsEquivalentTo(jump_table_.last())) { |
| 762 jump_table_.Add(table_entry, zone()); | 761 jump_table_.Add(table_entry, zone()); |
| 763 } | 762 } |
| 764 __ b(cond, &jump_table_.last().label /*, cr*/); | 763 __ b(cond, &jump_table_.last().label /*, cr*/); |
| 765 } | 764 } |
| 766 } | 765 } |
| 767 | 766 |
| 768 void LCodeGen::DeoptimizeIf(Condition cond, LInstruction* instr, | 767 void LCodeGen::DeoptimizeIf(Condition cond, LInstruction* instr, |
| 769 Deoptimizer::DeoptReason deopt_reason, | 768 Deoptimizer::DeoptReason deopt_reason, |
| (...skipping 4933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5703 __ LoadP(result, | 5702 __ LoadP(result, |
| 5704 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5703 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
| 5705 __ bind(deferred->exit()); | 5704 __ bind(deferred->exit()); |
| 5706 __ bind(&done); | 5705 __ bind(&done); |
| 5707 } | 5706 } |
| 5708 | 5707 |
| 5709 #undef __ | 5708 #undef __ |
| 5710 | 5709 |
| 5711 } // namespace internal | 5710 } // namespace internal |
| 5712 } // namespace v8 | 5711 } // namespace v8 |
| OLD | NEW |