OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 __ li(entry_offset, Operand(entry - base)); | 323 __ li(entry_offset, Operand(entry - base)); |
324 | 324 |
325 if (table_entry->needs_frame) { | 325 if (table_entry->needs_frame) { |
326 DCHECK(!info()->saves_caller_doubles()); | 326 DCHECK(!info()->saves_caller_doubles()); |
327 Comment(";;; call deopt with frame"); | 327 Comment(";;; call deopt with frame"); |
328 __ PushCommonFrame(); | 328 __ PushCommonFrame(); |
329 __ Call(&needs_frame); | 329 __ Call(&needs_frame); |
330 } else { | 330 } else { |
331 __ Call(&call_deopt_entry); | 331 __ Call(&call_deopt_entry); |
332 } | 332 } |
333 LogDeoptCallPosition(masm()->pc_offset(), | |
334 table_entry->deopt_info.inlining_id); | |
335 } | 333 } |
336 | 334 |
337 if (needs_frame.is_linked()) { | 335 if (needs_frame.is_linked()) { |
338 __ bind(&needs_frame); | 336 __ bind(&needs_frame); |
339 // This variant of deopt can only be used with stubs. Since we don't | 337 // This variant of deopt can only be used with stubs. Since we don't |
340 // have a function pointer to install in the stack frame that we're | 338 // have a function pointer to install in the stack frame that we're |
341 // building, install a special marker there instead. | 339 // building, install a special marker there instead. |
342 __ li(at, Operand(Smi::FromInt(StackFrame::STUB))); | 340 __ li(at, Operand(Smi::FromInt(StackFrame::STUB))); |
343 __ push(at); | 341 __ push(at); |
344 DCHECK(info()->IsStub()); | 342 DCHECK(info()->IsStub()); |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 | 789 |
792 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason); | 790 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason); |
793 | 791 |
794 DCHECK(info()->IsStub() || frame_is_built_); | 792 DCHECK(info()->IsStub() || frame_is_built_); |
795 // Go through jump table if we need to handle condition, build frame, or | 793 // Go through jump table if we need to handle condition, build frame, or |
796 // restore caller doubles. | 794 // restore caller doubles. |
797 if (condition == al && frame_is_built_ && | 795 if (condition == al && frame_is_built_ && |
798 !info()->saves_caller_doubles()) { | 796 !info()->saves_caller_doubles()) { |
799 DeoptComment(deopt_info); | 797 DeoptComment(deopt_info); |
800 __ Call(entry, RelocInfo::RUNTIME_ENTRY, condition, src1, src2); | 798 __ Call(entry, RelocInfo::RUNTIME_ENTRY, condition, src1, src2); |
801 LogDeoptCallPosition(masm()->pc_offset(), deopt_info.inlining_id); | |
802 } else { | 799 } else { |
803 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, | 800 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, |
804 !frame_is_built_); | 801 !frame_is_built_); |
805 // We often have several deopts to the same entry, reuse the last | 802 // We often have several deopts to the same entry, reuse the last |
806 // jump entry if this is the case. | 803 // jump entry if this is the case. |
807 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || | 804 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || |
808 jump_table_.is_empty() || | 805 jump_table_.is_empty() || |
809 !table_entry.IsEquivalentTo(jump_table_.last())) { | 806 !table_entry.IsEquivalentTo(jump_table_.last())) { |
810 jump_table_.Add(table_entry, zone()); | 807 jump_table_.Add(table_entry, zone()); |
811 } | 808 } |
(...skipping 4772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5584 __ lw(result, FieldMemOperand(scratch, | 5581 __ lw(result, FieldMemOperand(scratch, |
5585 FixedArray::kHeaderSize - kPointerSize)); | 5582 FixedArray::kHeaderSize - kPointerSize)); |
5586 __ bind(deferred->exit()); | 5583 __ bind(deferred->exit()); |
5587 __ bind(&done); | 5584 __ bind(&done); |
5588 } | 5585 } |
5589 | 5586 |
5590 #undef __ | 5587 #undef __ |
5591 | 5588 |
5592 } // namespace internal | 5589 } // namespace internal |
5593 } // namespace v8 | 5590 } // namespace v8 |
OLD | NEW |