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

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

Issue 2101523003: Use source position table for crankshaft code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@sourcepos
Patch Set: rebase Created 4 years, 5 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 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 return GeneratePrologue() && GenerateBody() && GenerateDeferredCode() && 77 return GeneratePrologue() && GenerateBody() && GenerateDeferredCode() &&
78 GenerateJumpTable() && GenerateSafepointTable(); 78 GenerateJumpTable() && GenerateSafepointTable();
79 } 79 }
80 80
81 81
82 void LCodeGen::FinishCode(Handle<Code> code) { 82 void LCodeGen::FinishCode(Handle<Code> code) {
83 DCHECK(is_done()); 83 DCHECK(is_done());
84 code->set_stack_slots(GetTotalFrameSlotCount()); 84 code->set_stack_slots(GetTotalFrameSlotCount());
85 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); 85 code->set_safepoint_table_offset(safepoints_.GetCodeOffset());
86 Handle<ByteArray> source_positions =
87 source_position_table_builder_.ToSourcePositionTable();
88 code->set_source_position_table(*source_positions);
86 PopulateDeoptimizationData(code); 89 PopulateDeoptimizationData(code);
87 } 90 }
88 91
89 92
90 void LCodeGen::SaveCallerDoubles() { 93 void LCodeGen::SaveCallerDoubles() {
91 DCHECK(info()->saves_caller_doubles()); 94 DCHECK(info()->saves_caller_doubles());
92 DCHECK(NeedsEagerFrame()); 95 DCHECK(NeedsEagerFrame());
93 Comment(";;; Save clobbered callee double registers"); 96 Comment(";;; Save clobbered callee double registers");
94 int count = 0; 97 int count = 0;
95 BitVector* doubles = chunk()->allocated_double_registers(); 98 BitVector* doubles = chunk()->allocated_double_registers();
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 868
866 869
867 void LCodeGen::RecordSafepointWithRegisters(LPointerMap* pointers, 870 void LCodeGen::RecordSafepointWithRegisters(LPointerMap* pointers,
868 int arguments, 871 int arguments,
869 Safepoint::DeoptMode deopt_mode) { 872 Safepoint::DeoptMode deopt_mode) {
870 RecordSafepoint( 873 RecordSafepoint(
871 pointers, Safepoint::kWithRegisters, arguments, deopt_mode); 874 pointers, Safepoint::kWithRegisters, arguments, deopt_mode);
872 } 875 }
873 876
874 877
875 void LCodeGen::RecordAndWritePosition(int position) {
876 if (position == RelocInfo::kNoPosition) return;
877 masm()->positions_recorder()->RecordPosition(position);
878 }
879
880
881 static const char* LabelType(LLabel* label) { 878 static const char* LabelType(LLabel* label) {
882 if (label->is_loop_header()) return " (loop header)"; 879 if (label->is_loop_header()) return " (loop header)";
883 if (label->is_osr_entry()) return " (OSR entry)"; 880 if (label->is_osr_entry()) return " (OSR entry)";
884 return ""; 881 return "";
885 } 882 }
886 883
887 884
888 void LCodeGen::DoLabel(LLabel* label) { 885 void LCodeGen::DoLabel(LLabel* label) {
889 Comment(";;; <@%d,#%d> -------------------- B%d%s --------------------", 886 Comment(";;; <@%d,#%d> -------------------- B%d%s --------------------",
890 current_instruction_, 887 current_instruction_,
(...skipping 4653 matching lines...) Expand 10 before | Expand all | Expand 10 after
5544 __ lw(result, FieldMemOperand(scratch, 5541 __ lw(result, FieldMemOperand(scratch,
5545 FixedArray::kHeaderSize - kPointerSize)); 5542 FixedArray::kHeaderSize - kPointerSize));
5546 __ bind(deferred->exit()); 5543 __ bind(deferred->exit());
5547 __ bind(&done); 5544 __ bind(&done);
5548 } 5545 }
5549 5546
5550 #undef __ 5547 #undef __
5551 5548
5552 } // namespace internal 5549 } // namespace internal
5553 } // namespace v8 5550 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips/lithium-codegen-mips.h ('k') | src/crankshaft/mips64/lithium-codegen-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698