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

Unified Diff: src/compiler/source-position.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 | « src/compiler/source-position.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/source-position.cc
diff --git a/src/compiler/source-position.cc b/src/compiler/source-position.cc
index 97577c7966692e281fd0d0d57c60d25767ed5887..93f89e03bc0c20c541b8537302fd387ac57904e5 100644
--- a/src/compiler/source-position.cc
+++ b/src/compiler/source-position.cc
@@ -16,7 +16,6 @@ class SourcePositionTable::Decorator final : public GraphDecorator {
: source_positions_(source_positions) {}
void Decorate(Node* node, bool incomplete) final {
- DCHECK(!source_positions_->current_position_.IsInvalid());
source_positions_->table_.Set(node, source_positions_->current_position_);
}
@@ -28,7 +27,7 @@ class SourcePositionTable::Decorator final : public GraphDecorator {
SourcePositionTable::SourcePositionTable(Graph* graph)
: graph_(graph),
decorator_(nullptr),
- current_position_(SourcePosition::Invalid()),
+ current_position_(SourcePosition::Unknown()),
table_(graph->zone()) {}
@@ -56,7 +55,7 @@ void SourcePositionTable::Print(std::ostream& os) const {
bool needs_comma = false;
for (auto i : table_) {
SourcePosition pos = i.second;
- if (!pos.IsUnknown()) {
+ if (pos.IsKnown()) {
if (needs_comma) {
os << ",";
}
« no previous file with comments | « src/compiler/source-position.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698