| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/arm64/lithium-codegen-arm64.h" | 5 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" |
| 6 | 6 |
| 7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 Comment(";;; call deopt with frame"); | 768 Comment(";;; call deopt with frame"); |
| 769 // Save lr before Bl, fp will be adjusted in the needs_frame code. | 769 // Save lr before Bl, fp will be adjusted in the needs_frame code. |
| 770 __ Push(lr, fp); | 770 __ Push(lr, fp); |
| 771 // Reuse the existing needs_frame code. | 771 // Reuse the existing needs_frame code. |
| 772 __ Bl(&needs_frame); | 772 __ Bl(&needs_frame); |
| 773 } else { | 773 } else { |
| 774 // There is nothing special to do, so just continue to the second-level | 774 // There is nothing special to do, so just continue to the second-level |
| 775 // table. | 775 // table. |
| 776 __ Bl(&call_deopt_entry); | 776 __ Bl(&call_deopt_entry); |
| 777 } | 777 } |
| 778 info()->LogDeoptCallPosition(masm()->pc_offset(), | 778 LogDeoptCallPosition(masm()->pc_offset(), |
| 779 table_entry->deopt_info.inlining_id); | 779 table_entry->deopt_info.inlining_id); |
| 780 | 780 |
| 781 masm()->CheckConstPool(false, false); | 781 masm()->CheckConstPool(false, false); |
| 782 } | 782 } |
| 783 | 783 |
| 784 if (needs_frame.is_linked()) { | 784 if (needs_frame.is_linked()) { |
| 785 // This variant of deopt can only be used with stubs. Since we don't | 785 // This variant of deopt can only be used with stubs. Since we don't |
| 786 // have a function pointer to install in the stack frame that we're | 786 // have a function pointer to install in the stack frame that we're |
| 787 // building, install a special marker there instead. | 787 // building, install a special marker there instead. |
| 788 DCHECK(info()->IsStub()); | 788 DCHECK(info()->IsStub()); |
| 789 | 789 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 } | 893 } |
| 894 | 894 |
| 895 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason); | 895 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason); |
| 896 | 896 |
| 897 DCHECK(info()->IsStub() || frame_is_built_); | 897 DCHECK(info()->IsStub() || frame_is_built_); |
| 898 // Go through jump table if we need to build frame, or restore caller doubles. | 898 // Go through jump table if we need to build frame, or restore caller doubles. |
| 899 if (branch_type == always && | 899 if (branch_type == always && |
| 900 frame_is_built_ && !info()->saves_caller_doubles()) { | 900 frame_is_built_ && !info()->saves_caller_doubles()) { |
| 901 DeoptComment(deopt_info); | 901 DeoptComment(deopt_info); |
| 902 __ Call(entry, RelocInfo::RUNTIME_ENTRY); | 902 __ Call(entry, RelocInfo::RUNTIME_ENTRY); |
| 903 info()->LogDeoptCallPosition(masm()->pc_offset(), deopt_info.inlining_id); | 903 LogDeoptCallPosition(masm()->pc_offset(), deopt_info.inlining_id); |
| 904 } else { | 904 } else { |
| 905 Deoptimizer::JumpTableEntry* table_entry = | 905 Deoptimizer::JumpTableEntry* table_entry = |
| 906 new (zone()) Deoptimizer::JumpTableEntry( | 906 new (zone()) Deoptimizer::JumpTableEntry( |
| 907 entry, deopt_info, bailout_type, !frame_is_built_); | 907 entry, deopt_info, bailout_type, !frame_is_built_); |
| 908 // We often have several deopts to the same entry, reuse the last | 908 // We often have several deopts to the same entry, reuse the last |
| 909 // jump entry if this is the case. | 909 // jump entry if this is the case. |
| 910 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || | 910 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || |
| 911 jump_table_.is_empty() || | 911 jump_table_.is_empty() || |
| 912 !table_entry->IsEquivalentTo(*jump_table_.last())) { | 912 !table_entry->IsEquivalentTo(*jump_table_.last())) { |
| 913 jump_table_.Add(table_entry, zone()); | 913 jump_table_.Add(table_entry, zone()); |
| (...skipping 4811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5725 // Index is equal to negated out of object property index plus 1. | 5725 // Index is equal to negated out of object property index plus 1. |
| 5726 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5726 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
| 5727 __ Ldr(result, FieldMemOperand(result, | 5727 __ Ldr(result, FieldMemOperand(result, |
| 5728 FixedArray::kHeaderSize - kPointerSize)); | 5728 FixedArray::kHeaderSize - kPointerSize)); |
| 5729 __ Bind(deferred->exit()); | 5729 __ Bind(deferred->exit()); |
| 5730 __ Bind(&done); | 5730 __ Bind(&done); |
| 5731 } | 5731 } |
| 5732 | 5732 |
| 5733 } // namespace internal | 5733 } // namespace internal |
| 5734 } // namespace v8 | 5734 } // namespace v8 |
| OLD | NEW |