| 231 | } |
| 232 | |
| 233 | void PushMapDeps(const MapExpr* map_expr, std::stack<StackRecord>* stack) { |
| 234 | const auto& entries = map_expr->entries(); |
| 235 | for (auto it = entries.rbegin(); it != entries.rend(); ++it) { |
| 236 | const auto& entry = *it; |
| 237 | // The contract is to visit key, then value. So put them on the stack |
| 238 | // in the opposite order. |
| 239 | if (entry.has_value()) { |
| 240 | stack->push(StackRecord(&entry.value())); |
| 241 | } |
| 242 | // The contract is to visit key, then value. So put them on the stack |
| 243 | // in the opposite order. |
| 244 | if (entry.has_key()) { |
| 245 | stack->push(StackRecord(&entry.key())); |
| 246 | } |
| 247 | } |
| 248 | } |
| 249 | |
| 250 | void PushComprehensionDeps(const ComprehensionExpr* c, const Expr* expr, |
| 251 | std::stack<StackRecord>* stack, |
no test coverage detected