OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
865 instr->Mnemonic(), deopt_reason); | 865 instr->Mnemonic(), deopt_reason); |
866 DCHECK(info()->IsStub() || frame_is_built_); | 866 DCHECK(info()->IsStub() || frame_is_built_); |
867 if (cc == no_condition && frame_is_built_) { | 867 if (cc == no_condition && frame_is_built_) { |
868 DeoptComment(deopt_info); | 868 DeoptComment(deopt_info); |
869 __ call(entry, RelocInfo::RUNTIME_ENTRY); | 869 __ call(entry, RelocInfo::RUNTIME_ENTRY); |
870 } else { | 870 } else { |
871 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, | 871 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, |
872 !frame_is_built_); | 872 !frame_is_built_); |
873 // We often have several deopts to the same entry, reuse the last | 873 // We often have several deopts to the same entry, reuse the last |
874 // jump entry if this is the case. | 874 // jump entry if this is the case. |
875 if (jump_table_.is_empty() || | 875 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || |
| 876 jump_table_.is_empty() || |
876 !table_entry.IsEquivalentTo(jump_table_.last())) { | 877 !table_entry.IsEquivalentTo(jump_table_.last())) { |
877 jump_table_.Add(table_entry, zone()); | 878 jump_table_.Add(table_entry, zone()); |
878 } | 879 } |
879 if (cc == no_condition) { | 880 if (cc == no_condition) { |
880 __ jmp(&jump_table_.last().label); | 881 __ jmp(&jump_table_.last().label); |
881 } else { | 882 } else { |
882 __ j(cc, &jump_table_.last().label); | 883 __ j(cc, &jump_table_.last().label); |
883 } | 884 } |
884 } | 885 } |
885 } | 886 } |
(...skipping 4886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5772 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5773 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5773 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5774 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5774 } | 5775 } |
5775 | 5776 |
5776 | 5777 |
5777 #undef __ | 5778 #undef __ |
5778 | 5779 |
5779 } } // namespace v8::internal | 5780 } } // namespace v8::internal |
5780 | 5781 |
5781 #endif // V8_TARGET_ARCH_IA32 | 5782 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |