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

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

Issue 1581083009: Move SourcePosition into separate header file. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Include what you use. Created 4 years, 11 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/compiler.cc ('k') | src/ia32/assembler-ia32.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/lithium-codegen.h" 5 #include "src/crankshaft/lithium-codegen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #if V8_TARGET_ARCH_IA32 9 #if V8_TARGET_ARCH_IA32
10 #include "src/crankshaft/ia32/lithium-ia32.h" // NOLINT 10 #include "src/crankshaft/ia32/lithium-ia32.h" // NOLINT
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 // Copy the string before recording it in the assembler to avoid 147 // Copy the string before recording it in the assembler to avoid
148 // issues when the stack allocated buffer goes out of scope. 148 // issues when the stack allocated buffer goes out of scope.
149 size_t length = builder.position(); 149 size_t length = builder.position();
150 Vector<char> copy = Vector<char>::New(static_cast<int>(length) + 1); 150 Vector<char> copy = Vector<char>::New(static_cast<int>(length) + 1);
151 MemCopy(copy.start(), builder.Finalize(), copy.length()); 151 MemCopy(copy.start(), builder.Finalize(), copy.length());
152 masm()->RecordComment(copy.start()); 152 masm()->RecordComment(copy.start());
153 } 153 }
154 154
155 155
156 void LCodeGenBase::DeoptComment(const Deoptimizer::DeoptInfo& deopt_info) { 156 void LCodeGenBase::DeoptComment(const Deoptimizer::DeoptInfo& deopt_info) {
157 masm()->RecordDeoptReason(deopt_info.deopt_reason, deopt_info.position); 157 SourcePosition position = deopt_info.position;
158 int raw_position = position.IsUnknown() ? 0 : position.raw();
159 masm()->RecordDeoptReason(deopt_info.deopt_reason, raw_position);
158 } 160 }
159 161
160 162
161 int LCodeGenBase::GetNextEmittedBlock() const { 163 int LCodeGenBase::GetNextEmittedBlock() const {
162 for (int i = current_block_ + 1; i < graph()->blocks()->length(); ++i) { 164 for (int i = current_block_ + 1; i < graph()->blocks()->length(); ++i) {
163 if (!graph()->blocks()->at(i)->IsReachable()) continue; 165 if (!graph()->blocks()->at(i)->IsReachable()) continue;
164 if (!chunk_->GetLabel(i)->HasReplacement()) return i; 166 if (!chunk_->GetLabel(i)->HasReplacement()) return i;
165 } 167 }
166 return -1; 168 return -1;
167 } 169 }
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 Deoptimizer::DeoptInfo LCodeGenBase::MakeDeoptInfo( 351 Deoptimizer::DeoptInfo LCodeGenBase::MakeDeoptInfo(
350 LInstruction* instr, Deoptimizer::DeoptReason deopt_reason) { 352 LInstruction* instr, Deoptimizer::DeoptReason deopt_reason) {
351 Deoptimizer::DeoptInfo deopt_info(instr->hydrogen_value()->position(), 353 Deoptimizer::DeoptInfo deopt_info(instr->hydrogen_value()->position(),
352 instr->Mnemonic(), deopt_reason); 354 instr->Mnemonic(), deopt_reason);
353 HEnterInlined* enter_inlined = instr->environment()->entry(); 355 HEnterInlined* enter_inlined = instr->environment()->entry();
354 deopt_info.inlining_id = enter_inlined ? enter_inlined->inlining_id() : 0; 356 deopt_info.inlining_id = enter_inlined ? enter_inlined->inlining_id() : 0;
355 return deopt_info; 357 return deopt_info;
356 } 358 }
357 } // namespace internal 359 } // namespace internal
358 } // namespace v8 360 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698