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_X87 | 7 #if V8_TARGET_ARCH_X87 |
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 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1147 instr->Mnemonic(), deopt_reason); | 1147 instr->Mnemonic(), deopt_reason); |
1148 DCHECK(info()->IsStub() || frame_is_built_); | 1148 DCHECK(info()->IsStub() || frame_is_built_); |
1149 if (cc == no_condition && frame_is_built_) { | 1149 if (cc == no_condition && frame_is_built_) { |
1150 DeoptComment(deopt_info); | 1150 DeoptComment(deopt_info); |
1151 __ call(entry, RelocInfo::RUNTIME_ENTRY); | 1151 __ call(entry, RelocInfo::RUNTIME_ENTRY); |
1152 } else { | 1152 } else { |
1153 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, | 1153 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, |
1154 !frame_is_built_); | 1154 !frame_is_built_); |
1155 // We often have several deopts to the same entry, reuse the last | 1155 // We often have several deopts to the same entry, reuse the last |
1156 // jump entry if this is the case. | 1156 // jump entry if this is the case. |
1157 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || | 1157 if (jump_table_.is_empty() || |
1158 jump_table_.is_empty() || | |
1159 !table_entry.IsEquivalentTo(jump_table_.last())) { | 1158 !table_entry.IsEquivalentTo(jump_table_.last())) { |
1160 jump_table_.Add(table_entry, zone()); | 1159 jump_table_.Add(table_entry, zone()); |
1161 } | 1160 } |
1162 if (cc == no_condition) { | 1161 if (cc == no_condition) { |
1163 __ jmp(&jump_table_.last().label); | 1162 __ jmp(&jump_table_.last().label); |
1164 } else { | 1163 } else { |
1165 __ j(cc, &jump_table_.last().label); | 1164 __ j(cc, &jump_table_.last().label); |
1166 } | 1165 } |
1167 } | 1166 } |
1168 } | 1167 } |
(...skipping 5210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6379 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6378 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6380 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6379 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6381 } | 6380 } |
6382 | 6381 |
6383 | 6382 |
6384 #undef __ | 6383 #undef __ |
6385 | 6384 |
6386 } } // namespace v8::internal | 6385 } } // namespace v8::internal |
6387 | 6386 |
6388 #endif // V8_TARGET_ARCH_X87 | 6387 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |