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

Unified Diff: src/compiler/code-generator.cc

Issue 1109763002: [turbofan] Treat uninitialized source positions as unknown. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/graph-visualizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/code-generator.cc
diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc
index 13087ec0aa1f76a4473fe11c5366eaceaae1851f..e3d2fc9c92b6124e151c1e1b3fa6af4ecfe5e7fa 100644
--- a/src/compiler/code-generator.cc
+++ b/src/compiler/code-generator.cc
@@ -38,7 +38,7 @@ CodeGenerator::CodeGenerator(Frame* frame, Linkage* linkage,
info_(info),
labels_(zone()->NewArray<Label>(code->InstructionBlockCount())),
current_block_(RpoNumber::Invalid()),
- current_source_position_(SourcePosition::Invalid()),
+ current_source_position_(SourcePosition::Unknown()),
masm_(info->isolate(), NULL, 0),
resolver_(this),
safepoints_(code->zone()),
@@ -256,11 +256,10 @@ void CodeGenerator::AssembleSourcePosition(Instruction* instr) {
SourcePosition source_position;
if (!code()->GetSourcePosition(instr, &source_position)) return;
if (source_position == current_source_position_) return;
- DCHECK(!source_position.IsInvalid());
current_source_position_ = source_position;
if (source_position.IsUnknown()) return;
int code_pos = source_position.raw();
- masm()->positions_recorder()->RecordPosition(source_position.raw());
+ masm()->positions_recorder()->RecordPosition(code_pos);
masm()->positions_recorder()->WriteRecordedPositions();
if (FLAG_code_comments) {
Vector<char> buffer = Vector<char>::New(256);
« no previous file with comments | « no previous file | src/compiler/graph-visualizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698