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

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

Issue 1944323002: [compiler] Move inline function tracing to Crankshaft. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
« no previous file with comments | « src/crankshaft/mips/lithium-codegen-mips.cc ('k') | src/crankshaft/ppc/lithium-codegen-ppc.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 info()->LogDeoptCallPosition(masm()->pc_offset(), 318 LogDeoptCallPosition(masm()->pc_offset(),
319 table_entry->deopt_info.inlining_id); 319 table_entry->deopt_info.inlining_id);
320 } 320 }
321 if (needs_frame.is_linked()) { 321 if (needs_frame.is_linked()) {
322 __ bind(&needs_frame); 322 __ bind(&needs_frame);
323 // This variant of deopt can only be used with stubs. Since we don't 323 // 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 324 // have a function pointer to install in the stack frame that we're
325 // building, install a special marker there instead. 325 // building, install a special marker there instead.
326 __ li(at, Operand(Smi::FromInt(StackFrame::STUB))); 326 __ li(at, Operand(Smi::FromInt(StackFrame::STUB)));
327 __ push(at); 327 __ push(at);
328 DCHECK(info()->IsStub()); 328 DCHECK(info()->IsStub());
329 } 329 }
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 778
779 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason); 779 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason);
780 780
781 DCHECK(info()->IsStub() || frame_is_built_); 781 DCHECK(info()->IsStub() || frame_is_built_);
782 // Go through jump table if we need to handle condition, build frame, or 782 // Go through jump table if we need to handle condition, build frame, or
783 // restore caller doubles. 783 // restore caller doubles.
784 if (condition == al && frame_is_built_ && 784 if (condition == al && frame_is_built_ &&
785 !info()->saves_caller_doubles()) { 785 !info()->saves_caller_doubles()) {
786 DeoptComment(deopt_info); 786 DeoptComment(deopt_info);
787 __ Call(entry, RelocInfo::RUNTIME_ENTRY, condition, src1, src2); 787 __ Call(entry, RelocInfo::RUNTIME_ENTRY, condition, src1, src2);
788 info()->LogDeoptCallPosition(masm()->pc_offset(), deopt_info.inlining_id); 788 LogDeoptCallPosition(masm()->pc_offset(), deopt_info.inlining_id);
789 } else { 789 } else {
790 Deoptimizer::JumpTableEntry* table_entry = 790 Deoptimizer::JumpTableEntry* table_entry =
791 new (zone()) Deoptimizer::JumpTableEntry( 791 new (zone()) Deoptimizer::JumpTableEntry(
792 entry, deopt_info, bailout_type, !frame_is_built_); 792 entry, deopt_info, bailout_type, !frame_is_built_);
793 // We often have several deopts to the same entry, reuse the last 793 // We often have several deopts to the same entry, reuse the last
794 // jump entry if this is the case. 794 // jump entry if this is the case.
795 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || 795 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() ||
796 jump_table_.is_empty() || 796 jump_table_.is_empty() ||
797 !table_entry->IsEquivalentTo(*jump_table_.last())) { 797 !table_entry->IsEquivalentTo(*jump_table_.last())) {
798 jump_table_.Add(table_entry, zone()); 798 jump_table_.Add(table_entry, zone());
(...skipping 4937 matching lines...) Expand 10 before | Expand all | Expand 10 after
5736 __ ld(result, FieldMemOperand(scratch, 5736 __ ld(result, FieldMemOperand(scratch,
5737 FixedArray::kHeaderSize - kPointerSize)); 5737 FixedArray::kHeaderSize - kPointerSize));
5738 __ bind(deferred->exit()); 5738 __ bind(deferred->exit());
5739 __ bind(&done); 5739 __ bind(&done);
5740 } 5740 }
5741 5741
5742 #undef __ 5742 #undef __
5743 5743
5744 } // namespace internal 5744 } // namespace internal
5745 } // namespace v8 5745 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips/lithium-codegen-mips.cc ('k') | src/crankshaft/ppc/lithium-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698