Skip to content

Commit

Permalink
more informative assertion
Browse files Browse the repository at this point in the history
Reviewed By: beicy

Differential Revision: D52372737

fbshipit-source-id: c940ccf8be9357f80d27a0ebf14b5018da23ba76
  • Loading branch information
Nikolai Tillmann authored and facebook-github-bot committed Dec 28, 2023
1 parent a77e4ba commit e974559
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions opt/object-escape-analysis/ObjectEscapeAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -559,9 +559,20 @@ class RootMethodReducer {
}

auto* insn = find_incomplete_marker_methods();
always_assert_log(!insn,
"Incomplete marker {%s} present after reduction in\n%s",
SHOW(insn), SHOW(m_method->get_code()->cfg()));
auto describe = [&]() {
std::ostringstream oss;
for (auto [type, kind] : m_types) {
oss << show(type) << ":"
<< (kind == InlinableTypeKind::Incomplete ? "incomplete" : "")
<< ", ";
}
return oss.str();
};
always_assert_log(
!insn,
"Incomplete marker {%s} present in {%s} after reduction of %s in\n%s",
SHOW(insn), SHOW(m_method), describe().c_str(),
SHOW(m_method->get_code()->cfg()));

shrink();
return (ReducedMethod){
Expand Down

0 comments on commit e974559

Please sign in to comment.