Index: src/compiler/source-position.h |
diff --git a/src/compiler/source-position.h b/src/compiler/source-position.h |
index 3033f74d173256d668dbdd351b460b932067de8d..81db1d2e3eff4f97d0f93e484b83d321b8115259 100644 |
--- a/src/compiler/source-position.h |
+++ b/src/compiler/source-position.h |
@@ -20,16 +20,12 @@ class SourcePosition final { |
static SourcePosition Unknown() { return SourcePosition(kUnknownPosition); } |
bool IsUnknown() const { return raw() == kUnknownPosition; } |
- |
- static SourcePosition Invalid() { return SourcePosition(kInvalidPosition); } |
- bool IsInvalid() const { return raw() == kInvalidPosition; } |
+ bool IsKnown() const { return raw() != kUnknownPosition; } |
int raw() const { return raw_; } |
private: |
- static const int kInvalidPosition = -2; |
static const int kUnknownPosition = RelocInfo::kNoPosition; |
- STATIC_ASSERT(kInvalidPosition != kUnknownPosition); |
int raw_; |
}; |
@@ -61,9 +57,7 @@ class SourcePositionTable final { |
private: |
void Init(SourcePosition position) { |
- if (!position.IsUnknown() || prev_position_.IsInvalid()) { |
- source_positions_->current_position_ = position; |
- } |
+ if (position.IsKnown()) source_positions_->current_position_ = position; |
} |
SourcePositionTable* const source_positions_; |