| 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/crankshaft/mips64/lithium-codegen-mips64.h" | 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" |
| 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" | 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 __ li(t9, Operand(entry - base)); | 308 __ li(t9, Operand(entry - base)); |
| 309 if (table_entry->needs_frame) { | 309 if (table_entry->needs_frame) { |
| 310 DCHECK(!info()->saves_caller_doubles()); | 310 DCHECK(!info()->saves_caller_doubles()); |
| 311 Comment(";;; call deopt with frame"); | 311 Comment(";;; call deopt with frame"); |
| 312 __ PushCommonFrame(); | 312 __ PushCommonFrame(); |
| 313 __ BranchAndLink(&needs_frame); | 313 __ BranchAndLink(&needs_frame); |
| 314 } else { | 314 } else { |
| 315 __ BranchAndLink(&call_deopt_entry); | 315 __ BranchAndLink(&call_deopt_entry); |
| 316 } | 316 } |
| 317 } | 317 } |
| 318 LogDeoptCallPosition(masm()->pc_offset(), | |
| 319 table_entry->deopt_info.inlining_id); | |
| 320 } | 318 } |
| 321 if (needs_frame.is_linked()) { | 319 if (needs_frame.is_linked()) { |
| 322 __ bind(&needs_frame); | 320 __ bind(&needs_frame); |
| 323 // This variant of deopt can only be used with stubs. Since we don't | 321 // This variant of deopt can only be used with stubs. Since we don't |
| 324 // have a function pointer to install in the stack frame that we're | 322 // have a function pointer to install in the stack frame that we're |
| 325 // building, install a special marker there instead. | 323 // building, install a special marker there instead. |
| 326 __ li(at, Operand(Smi::FromInt(StackFrame::STUB))); | 324 __ li(at, Operand(Smi::FromInt(StackFrame::STUB))); |
| 327 __ push(at); | 325 __ push(at); |
| 328 DCHECK(info()->IsStub()); | 326 DCHECK(info()->IsStub()); |
| 329 } | 327 } |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 778 | 776 |
| 779 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason); | 777 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason); |
| 780 | 778 |
| 781 DCHECK(info()->IsStub() || frame_is_built_); | 779 DCHECK(info()->IsStub() || frame_is_built_); |
| 782 // Go through jump table if we need to handle condition, build frame, or | 780 // Go through jump table if we need to handle condition, build frame, or |
| 783 // restore caller doubles. | 781 // restore caller doubles. |
| 784 if (condition == al && frame_is_built_ && | 782 if (condition == al && frame_is_built_ && |
| 785 !info()->saves_caller_doubles()) { | 783 !info()->saves_caller_doubles()) { |
| 786 DeoptComment(deopt_info); | 784 DeoptComment(deopt_info); |
| 787 __ Call(entry, RelocInfo::RUNTIME_ENTRY, condition, src1, src2); | 785 __ Call(entry, RelocInfo::RUNTIME_ENTRY, condition, src1, src2); |
| 788 LogDeoptCallPosition(masm()->pc_offset(), deopt_info.inlining_id); | |
| 789 } else { | 786 } else { |
| 790 Deoptimizer::JumpTableEntry* table_entry = | 787 Deoptimizer::JumpTableEntry* table_entry = |
| 791 new (zone()) Deoptimizer::JumpTableEntry( | 788 new (zone()) Deoptimizer::JumpTableEntry( |
| 792 entry, deopt_info, bailout_type, !frame_is_built_); | 789 entry, deopt_info, bailout_type, !frame_is_built_); |
| 793 // We often have several deopts to the same entry, reuse the last | 790 // We often have several deopts to the same entry, reuse the last |
| 794 // jump entry if this is the case. | 791 // jump entry if this is the case. |
| 795 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || | 792 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || |
| 796 jump_table_.is_empty() || | 793 jump_table_.is_empty() || |
| 797 !table_entry->IsEquivalentTo(*jump_table_.last())) { | 794 !table_entry->IsEquivalentTo(*jump_table_.last())) { |
| 798 jump_table_.Add(table_entry, zone()); | 795 jump_table_.Add(table_entry, zone()); |
| (...skipping 4990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5789 __ ld(result, FieldMemOperand(scratch, | 5786 __ ld(result, FieldMemOperand(scratch, |
| 5790 FixedArray::kHeaderSize - kPointerSize)); | 5787 FixedArray::kHeaderSize - kPointerSize)); |
| 5791 __ bind(deferred->exit()); | 5788 __ bind(deferred->exit()); |
| 5792 __ bind(&done); | 5789 __ bind(&done); |
| 5793 } | 5790 } |
| 5794 | 5791 |
| 5795 #undef __ | 5792 #undef __ |
| 5796 | 5793 |
| 5797 } // namespace internal | 5794 } // namespace internal |
| 5798 } // namespace v8 | 5795 } // namespace v8 |
| OLD | NEW |