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/arm/lithium-codegen-arm.h" | 5 #include "src/crankshaft/arm/lithium-codegen-arm.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" | 10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 __ mov(entry_offset, Operand(entry - base)); | 322 __ mov(entry_offset, Operand(entry - base)); |
323 | 323 |
324 if (table_entry->needs_frame) { | 324 if (table_entry->needs_frame) { |
325 DCHECK(!info()->saves_caller_doubles()); | 325 DCHECK(!info()->saves_caller_doubles()); |
326 Comment(";;; call deopt with frame"); | 326 Comment(";;; call deopt with frame"); |
327 __ PushCommonFrame(); | 327 __ PushCommonFrame(); |
328 __ bl(&needs_frame); | 328 __ bl(&needs_frame); |
329 } else { | 329 } else { |
330 __ bl(&call_deopt_entry); | 330 __ bl(&call_deopt_entry); |
331 } | 331 } |
332 LogDeoptCallPosition(masm()->pc_offset(), | |
333 table_entry->deopt_info.inlining_id); | |
334 masm()->CheckConstPool(false, false); | 332 masm()->CheckConstPool(false, false); |
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 __ mov(ip, Operand(Smi::FromInt(StackFrame::STUB))); | 340 __ mov(ip, Operand(Smi::FromInt(StackFrame::STUB))); |
343 __ push(ip); | 341 __ push(ip); |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
825 | 823 |
826 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason); | 824 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason); |
827 | 825 |
828 DCHECK(info()->IsStub() || frame_is_built_); | 826 DCHECK(info()->IsStub() || frame_is_built_); |
829 // Go through jump table if we need to handle condition, build frame, or | 827 // Go through jump table if we need to handle condition, build frame, or |
830 // restore caller doubles. | 828 // restore caller doubles. |
831 if (condition == al && frame_is_built_ && | 829 if (condition == al && frame_is_built_ && |
832 !info()->saves_caller_doubles()) { | 830 !info()->saves_caller_doubles()) { |
833 DeoptComment(deopt_info); | 831 DeoptComment(deopt_info); |
834 __ Call(entry, RelocInfo::RUNTIME_ENTRY); | 832 __ Call(entry, RelocInfo::RUNTIME_ENTRY); |
835 LogDeoptCallPosition(masm()->pc_offset(), deopt_info.inlining_id); | |
836 } else { | 833 } else { |
837 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, | 834 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, |
838 !frame_is_built_); | 835 !frame_is_built_); |
839 // We often have several deopts to the same entry, reuse the last | 836 // We often have several deopts to the same entry, reuse the last |
840 // jump entry if this is the case. | 837 // jump entry if this is the case. |
841 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || | 838 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || |
842 jump_table_.is_empty() || | 839 jump_table_.is_empty() || |
843 !table_entry.IsEquivalentTo(jump_table_.last())) { | 840 !table_entry.IsEquivalentTo(jump_table_.last())) { |
844 jump_table_.Add(table_entry, zone()); | 841 jump_table_.Add(table_entry, zone()); |
845 } | 842 } |
(...skipping 4740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5586 __ ldr(result, FieldMemOperand(scratch, | 5583 __ ldr(result, FieldMemOperand(scratch, |
5587 FixedArray::kHeaderSize - kPointerSize)); | 5584 FixedArray::kHeaderSize - kPointerSize)); |
5588 __ bind(deferred->exit()); | 5585 __ bind(deferred->exit()); |
5589 __ bind(&done); | 5586 __ bind(&done); |
5590 } | 5587 } |
5591 | 5588 |
5592 #undef __ | 5589 #undef __ |
5593 | 5590 |
5594 } // namespace internal | 5591 } // namespace internal |
5595 } // namespace v8 | 5592 } // namespace v8 |
OLD | NEW |