| 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 #if V8_TARGET_ARCH_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
| 6 | 6 |
| 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" | 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" |
| 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" |
| 11 #include "src/code-stubs.h" | 11 #include "src/code-stubs.h" |
| 12 #include "src/codegen.h" | 12 #include "src/codegen.h" |
| 13 #include "src/crankshaft/hydrogen-osr.h" | 13 #include "src/crankshaft/hydrogen-osr.h" |
| 14 #include "src/deoptimizer.h" | 14 #include "src/deoptimizer.h" |
| 15 #include "src/ia32/frames-ia32.h" | 15 #include "src/ia32/frames-ia32.h" |
| 16 #include "src/ic/ic.h" | 16 #include "src/ic/ic.h" |
| 17 #include "src/ic/stub-cache.h" | 17 #include "src/ic/stub-cache.h" |
| 18 #include "src/profiler/cpu-profiler.h" | |
| 19 | 18 |
| 20 namespace v8 { | 19 namespace v8 { |
| 21 namespace internal { | 20 namespace internal { |
| 22 | 21 |
| 23 // When invoking builtins, we need to record the safepoint in the middle of | 22 // When invoking builtins, we need to record the safepoint in the middle of |
| 24 // the invoke instruction sequence generated by the macro assembler. | 23 // the invoke instruction sequence generated by the macro assembler. |
| 25 class SafepointGenerator final : public CallWrapper { | 24 class SafepointGenerator final : public CallWrapper { |
| 26 public: | 25 public: |
| 27 SafepointGenerator(LCodeGen* codegen, | 26 SafepointGenerator(LCodeGen* codegen, |
| 28 LPointerMap* pointers, | 27 LPointerMap* pointers, |
| (...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 727 | 726 |
| 728 DCHECK(info()->IsStub() || frame_is_built_); | 727 DCHECK(info()->IsStub() || frame_is_built_); |
| 729 if (cc == no_condition && frame_is_built_) { | 728 if (cc == no_condition && frame_is_built_) { |
| 730 DeoptComment(deopt_info); | 729 DeoptComment(deopt_info); |
| 731 __ call(entry, RelocInfo::RUNTIME_ENTRY); | 730 __ call(entry, RelocInfo::RUNTIME_ENTRY); |
| 732 } else { | 731 } else { |
| 733 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, | 732 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, |
| 734 !frame_is_built_); | 733 !frame_is_built_); |
| 735 // We often have several deopts to the same entry, reuse the last | 734 // We often have several deopts to the same entry, reuse the last |
| 736 // jump entry if this is the case. | 735 // jump entry if this is the case. |
| 737 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || | 736 if (FLAG_trace_deopt || isolate()->is_profiling() || |
| 738 jump_table_.is_empty() || | 737 jump_table_.is_empty() || |
| 739 !table_entry.IsEquivalentTo(jump_table_.last())) { | 738 !table_entry.IsEquivalentTo(jump_table_.last())) { |
| 740 jump_table_.Add(table_entry, zone()); | 739 jump_table_.Add(table_entry, zone()); |
| 741 } | 740 } |
| 742 if (cc == no_condition) { | 741 if (cc == no_condition) { |
| 743 __ jmp(&jump_table_.last().label); | 742 __ jmp(&jump_table_.last().label); |
| 744 } else { | 743 } else { |
| 745 __ j(cc, &jump_table_.last().label); | 744 __ j(cc, &jump_table_.last().label); |
| 746 } | 745 } |
| 747 } | 746 } |
| (...skipping 4572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5320 __ bind(deferred->exit()); | 5319 __ bind(deferred->exit()); |
| 5321 __ bind(&done); | 5320 __ bind(&done); |
| 5322 } | 5321 } |
| 5323 | 5322 |
| 5324 #undef __ | 5323 #undef __ |
| 5325 | 5324 |
| 5326 } // namespace internal | 5325 } // namespace internal |
| 5327 } // namespace v8 | 5326 } // namespace v8 |
| 5328 | 5327 |
| 5329 #endif // V8_TARGET_ARCH_IA32 | 5328 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |