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/v8.h" | 5 #include "src/v8.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/hydrogen-osr.h" | 10 #include "src/hydrogen-osr.h" |
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 // Go through jump table if we need to handle condition, build frame, or | 818 // Go through jump table if we need to handle condition, build frame, or |
819 // restore caller doubles. | 819 // restore caller doubles. |
820 if (cond == al && frame_is_built_ && !info()->saves_caller_doubles()) { | 820 if (cond == al && frame_is_built_ && !info()->saves_caller_doubles()) { |
821 DeoptComment(deopt_info); | 821 DeoptComment(deopt_info); |
822 __ Call(entry, RelocInfo::RUNTIME_ENTRY); | 822 __ Call(entry, RelocInfo::RUNTIME_ENTRY); |
823 } else { | 823 } else { |
824 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, | 824 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, |
825 !frame_is_built_); | 825 !frame_is_built_); |
826 // We often have several deopts to the same entry, reuse the last | 826 // We often have several deopts to the same entry, reuse the last |
827 // jump entry if this is the case. | 827 // jump entry if this is the case. |
828 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || | 828 if (jump_table_.is_empty() || |
829 jump_table_.is_empty() || | |
830 !table_entry.IsEquivalentTo(jump_table_.last())) { | 829 !table_entry.IsEquivalentTo(jump_table_.last())) { |
831 jump_table_.Add(table_entry, zone()); | 830 jump_table_.Add(table_entry, zone()); |
832 } | 831 } |
833 __ b(cond, &jump_table_.last().label, cr); | 832 __ b(cond, &jump_table_.last().label, cr); |
834 } | 833 } |
835 } | 834 } |
836 | 835 |
837 | 836 |
838 void LCodeGen::DeoptimizeIf(Condition condition, LInstruction* instr, | 837 void LCodeGen::DeoptimizeIf(Condition condition, LInstruction* instr, |
839 Deoptimizer::DeoptReason deopt_reason, | 838 Deoptimizer::DeoptReason deopt_reason, |
(...skipping 5402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6242 __ Push(scope_info); | 6241 __ Push(scope_info); |
6243 __ push(ToRegister(instr->function())); | 6242 __ push(ToRegister(instr->function())); |
6244 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6243 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6245 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6244 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6246 } | 6245 } |
6247 | 6246 |
6248 | 6247 |
6249 #undef __ | 6248 #undef __ |
6250 } | 6249 } |
6251 } // namespace v8::internal | 6250 } // namespace v8::internal |
OLD | NEW |