Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(618)

Side by Side Diff: src/crankshaft/ppc/lithium-codegen-ppc.cc

Issue 1956693002: [compiler] Pass inlining_id via relocation info. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/ppc/lithium-codegen-ppc.h" 5 #include "src/crankshaft/ppc/lithium-codegen-ppc.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/hydrogen-osr.h" 10 #include "src/crankshaft/hydrogen-osr.h"
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 __ mov(entry_offset, Operand(entry - base)); 319 __ mov(entry_offset, Operand(entry - base));
320 320
321 if (table_entry->needs_frame) { 321 if (table_entry->needs_frame) {
322 DCHECK(!info()->saves_caller_doubles()); 322 DCHECK(!info()->saves_caller_doubles());
323 Comment(";;; call deopt with frame"); 323 Comment(";;; call deopt with frame");
324 __ PushCommonFrame(); 324 __ PushCommonFrame();
325 __ b(&needs_frame, SetLK); 325 __ b(&needs_frame, SetLK);
326 } else { 326 } else {
327 __ b(&call_deopt_entry, SetLK); 327 __ b(&call_deopt_entry, SetLK);
328 } 328 }
329 LogDeoptCallPosition(masm()->pc_offset(),
330 table_entry->deopt_info.inlining_id);
331 } 329 }
332 330
333 if (needs_frame.is_linked()) { 331 if (needs_frame.is_linked()) {
334 __ bind(&needs_frame); 332 __ bind(&needs_frame);
335 // This variant of deopt can only be used with stubs. Since we don't 333 // This variant of deopt can only be used with stubs. Since we don't
336 // have a function pointer to install in the stack frame that we're 334 // have a function pointer to install in the stack frame that we're
337 // building, install a special marker there instead. 335 // building, install a special marker there instead.
338 __ LoadSmiLiteral(ip, Smi::FromInt(StackFrame::STUB)); 336 __ LoadSmiLiteral(ip, Smi::FromInt(StackFrame::STUB));
339 __ push(ip); 337 __ push(ip);
340 DCHECK(info()->IsStub()); 338 DCHECK(info()->IsStub());
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 } 754 }
757 755
758 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason); 756 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason);
759 757
760 DCHECK(info()->IsStub() || frame_is_built_); 758 DCHECK(info()->IsStub() || frame_is_built_);
761 // Go through jump table if we need to handle condition, build frame, or 759 // Go through jump table if we need to handle condition, build frame, or
762 // restore caller doubles. 760 // restore caller doubles.
763 if (cond == al && frame_is_built_ && !info()->saves_caller_doubles()) { 761 if (cond == al && frame_is_built_ && !info()->saves_caller_doubles()) {
764 DeoptComment(deopt_info); 762 DeoptComment(deopt_info);
765 __ Call(entry, RelocInfo::RUNTIME_ENTRY); 763 __ Call(entry, RelocInfo::RUNTIME_ENTRY);
766 LogDeoptCallPosition(masm()->pc_offset(), deopt_info.inlining_id);
767 } else { 764 } else {
768 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, 765 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type,
769 !frame_is_built_); 766 !frame_is_built_);
770 // We often have several deopts to the same entry, reuse the last 767 // We often have several deopts to the same entry, reuse the last
771 // jump entry if this is the case. 768 // jump entry if this is the case.
772 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || 769 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() ||
773 jump_table_.is_empty() || 770 jump_table_.is_empty() ||
774 !table_entry.IsEquivalentTo(jump_table_.last())) { 771 !table_entry.IsEquivalentTo(jump_table_.last())) {
775 jump_table_.Add(table_entry, zone()); 772 jump_table_.Add(table_entry, zone());
776 } 773 }
(...skipping 5009 matching lines...) Expand 10 before | Expand all | Expand 10 after
5786 __ LoadP(result, 5783 __ LoadP(result,
5787 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); 5784 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize));
5788 __ bind(deferred->exit()); 5785 __ bind(deferred->exit());
5789 __ bind(&done); 5786 __ bind(&done);
5790 } 5787 }
5791 5788
5792 #undef __ 5789 #undef __
5793 5790
5794 } // namespace internal 5791 } // namespace internal
5795 } // namespace v8 5792 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips64/lithium-codegen-mips64.cc ('k') | src/crankshaft/s390/lithium-codegen-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698