OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #include "src/crankshaft/ppc/lithium-codegen-ppc.h" | 5 #include "src/crankshaft/ppc/lithium-codegen-ppc.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/crankshaft/hydrogen-osr.h" | 10 #include "src/crankshaft/hydrogen-osr.h" |
11 #include "src/crankshaft/ppc/lithium-gap-resolver-ppc.h" | 11 #include "src/crankshaft/ppc/lithium-gap-resolver-ppc.h" |
12 #include "src/ic/ic.h" | 12 #include "src/ic/ic.h" |
13 #include "src/ic/stub-cache.h" | 13 #include "src/ic/stub-cache.h" |
14 #include "src/profiler/cpu-profiler.h" | |
15 | 14 |
16 namespace v8 { | 15 namespace v8 { |
17 namespace internal { | 16 namespace internal { |
18 | 17 |
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) {} |
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
759 // Go through jump table if we need to handle condition, build frame, or | 758 // Go through jump table if we need to handle condition, build frame, or |
760 // restore caller doubles. | 759 // restore caller doubles. |
761 if (cond == al && frame_is_built_ && !info()->saves_caller_doubles()) { | 760 if (cond == al && frame_is_built_ && !info()->saves_caller_doubles()) { |
762 DeoptComment(deopt_info); | 761 DeoptComment(deopt_info); |
763 __ Call(entry, RelocInfo::RUNTIME_ENTRY); | 762 __ Call(entry, RelocInfo::RUNTIME_ENTRY); |
764 } else { | 763 } else { |
765 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, | 764 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, |
766 !frame_is_built_); | 765 !frame_is_built_); |
767 // We often have several deopts to the same entry, reuse the last | 766 // We often have several deopts to the same entry, reuse the last |
768 // jump entry if this is the case. | 767 // jump entry if this is the case. |
769 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || | 768 if (FLAG_trace_deopt || isolate()->is_profiling() || |
770 jump_table_.is_empty() || | 769 jump_table_.is_empty() || |
771 !table_entry.IsEquivalentTo(jump_table_.last())) { | 770 !table_entry.IsEquivalentTo(jump_table_.last())) { |
772 jump_table_.Add(table_entry, zone()); | 771 jump_table_.Add(table_entry, zone()); |
773 } | 772 } |
774 __ b(cond, &jump_table_.last().label, cr); | 773 __ b(cond, &jump_table_.last().label, cr); |
775 } | 774 } |
776 } | 775 } |
777 | 776 |
778 | 777 |
779 void LCodeGen::DeoptimizeIf(Condition condition, LInstruction* instr, | 778 void LCodeGen::DeoptimizeIf(Condition condition, LInstruction* instr, |
(...skipping 5039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5819 __ LoadP(result, | 5818 __ LoadP(result, |
5820 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5819 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
5821 __ bind(deferred->exit()); | 5820 __ bind(deferred->exit()); |
5822 __ bind(&done); | 5821 __ bind(&done); |
5823 } | 5822 } |
5824 | 5823 |
5825 #undef __ | 5824 #undef __ |
5826 | 5825 |
5827 } // namespace internal | 5826 } // namespace internal |
5828 } // namespace v8 | 5827 } // namespace v8 |
OLD | NEW |