Skip to content

Commit

Permalink
Comment out assertion for now.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdleary committed Aug 23, 2024
1 parent 9e018fe commit 2fda13b
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions xls/dslx/type_system/type_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,19 @@ void TypeInfo::NoteConstExpr(const AstNode* const_expr, InterpValue value) {
"noting node: `%s` (%p) has constexpr value: `%s`",
const_expr->ToString(), const_expr, value.ToString());

auto it = const_exprs_.find(const_expr);
if (it != const_exprs_.end() && it->second.has_value()) {
// If the tags are the same, assert they're the same value.
if (value.tag() == it->second->tag()) {
CHECK(value.Eq(it->second.value()))
<< "previous value: " << it->second->ToString()
<< " inserting value: " << value.ToString();
;
}
}
// Note: this assertion will generally hold as of 2024-08-23, except in the
// case of `UnrollFor` nodes, which https://github.com/richmckeever is
// actively working on alternative strategies for.
//
// auto it = const_exprs_.find(const_expr);
// if (it != const_exprs_.end() && it->second.has_value()) {
// // If the tags are the same, assert they're the same value.
// if (value.tag() == it->second->tag()) {
// CHECK(value.Eq(it->second.value()))
// << "previous value: " << it->second->ToString()
// << " inserting value: " << value.ToString();
// }
// }

const_exprs_.insert_or_assign(const_expr, std::move(value));
}
Expand Down

0 comments on commit 2fda13b

Please sign in to comment.