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

Unified Diff: src/compiler/compiler-source-position-table.cc

Issue 2451853002: Uniform and precise source positions for inlining (Closed)
Patch Set: fixed gcmole issue Created 4 years, 1 month 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
Index: src/compiler/compiler-source-position-table.cc
diff --git a/src/compiler/source-position.cc b/src/compiler/compiler-source-position-table.cc
similarity index 95%
rename from src/compiler/source-position.cc
rename to src/compiler/compiler-source-position-table.cc
index 80f180076dd5fada191122d11e649adb4cc7ed0e..c5520e7407638dcb946fc3360aa7e5592640660c 100644
--- a/src/compiler/source-position.cc
+++ b/src/compiler/compiler-source-position-table.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "src/compiler/source-position.h"
+#include "src/compiler/compiler-source-position-table.h"
#include "src/compiler/graph.h"
#include "src/compiler/node-aux-data.h"
@@ -24,28 +24,24 @@ class SourcePositionTable::Decorator final : public GraphDecorator {
SourcePositionTable* source_positions_;
};
-
SourcePositionTable::SourcePositionTable(Graph* graph)
: graph_(graph),
decorator_(nullptr),
current_position_(SourcePosition::Unknown()),
table_(graph->zone()) {}
-
void SourcePositionTable::AddDecorator() {
DCHECK_NULL(decorator_);
decorator_ = new (graph_->zone()) Decorator(this);
graph_->AddDecorator(decorator_);
}
-
void SourcePositionTable::RemoveDecorator() {
DCHECK_NOT_NULL(decorator_);
graph_->RemoveDecorator(decorator_);
decorator_ = nullptr;
}
-
SourcePosition SourcePositionTable::GetSourcePosition(Node* node) const {
return table_.Get(node);
}
@@ -65,7 +61,7 @@ void SourcePositionTable::Print(std::ostream& os) const {
os << ",";
}
os << "\"" << i.first << "\""
- << ":" << pos.raw();
+ << ":" << pos.ScriptOffset();
needs_comma = true;
}
}

Powered by Google App Engine
This is Rietveld 408576698