| 304 | } |
| 305 | |
| 306 | bool ExprDecomposer::PopElseEntry(const IfNode& node) { |
| 307 | DCHECK_EQ(if_entries_stack_.empty(), false) << "PopElseEntry: found empty stack"; |
| 308 | |
| 309 | auto top = if_entries_stack_.top().get(); |
| 310 | DCHECK_EQ(top->entry_type_, kStackEntryElse) |
| 311 | << "PopElseEntry: found " << top->entry_type_ << " expected else"; |
| 312 | DCHECK_EQ(&top->if_node_, &node) << "PopElseEntry: found mismatched node"; |
| 313 | bool is_terminal_else = top->is_terminal_else_; |
| 314 | |
| 315 | if_entries_stack_.pop(); |
| 316 | return is_terminal_else; |
| 317 | } |
| 318 | |
| 319 | void ExprDecomposer::PushConditionEntry(const IfNode& node) { |
| 320 | std::unique_ptr<IfStackEntry> entry(new IfStackEntry(node, kStackEntryCondition)); |