| 275 | } |
| 276 | |
| 277 | void PushComprehensionDeps(ComprehensionExpr* c, Expr* expr, |
| 278 | std::stack<StackRecord>* stack, |
| 279 | bool use_comprehension_callbacks) { |
| 280 | StackRecord iter_range(&c->mutable_iter_range(), c, expr, ITER_RANGE, |
| 281 | use_comprehension_callbacks); |
| 282 | StackRecord accu_init(&c->mutable_accu_init(), c, expr, ACCU_INIT, |
| 283 | use_comprehension_callbacks); |
| 284 | StackRecord loop_condition(&c->mutable_loop_condition(), c, expr, |
| 285 | LOOP_CONDITION, use_comprehension_callbacks); |
| 286 | StackRecord loop_step(&c->mutable_loop_step(), c, expr, LOOP_STEP, |
| 287 | use_comprehension_callbacks); |
| 288 | StackRecord result(&c->mutable_result(), c, expr, RESULT, |
| 289 | use_comprehension_callbacks); |
| 290 | // Push them in reverse order. |
| 291 | stack->push(result); |
| 292 | stack->push(loop_step); |
| 293 | stack->push(loop_condition); |
| 294 | stack->push(accu_init); |
| 295 | stack->push(iter_range); |
| 296 | } |
| 297 | |
| 298 | struct PushDepsVisitor { |
| 299 | void operator()(const ExprRecord& record) { |