| 258 | } |
| 259 | |
| 260 | void PushMapDeps(MapExpr* struct_expr, std::stack<StackRecord>* stack) { |
| 261 | auto& entries = struct_expr->mutable_entries(); |
| 262 | for (auto it = entries.rbegin(); it != entries.rend(); ++it) { |
| 263 | auto& entry = *it; |
| 264 | // The contract is to visit key, then value. So put them on the stack |
| 265 | // in the opposite order. |
| 266 | if (entry.has_value()) { |
| 267 | stack->push(StackRecord(&entry.mutable_value())); |
| 268 | } |
| 269 | // The contract is to visit key, then value. So put them on the stack |
| 270 | // in the opposite order. |
| 271 | if (entry.has_key()) { |
| 272 | stack->push(StackRecord(&entry.mutable_key())); |
| 273 | } |
| 274 | } |
| 275 | } |
| 276 | |
| 277 | void PushComprehensionDeps(ComprehensionExpr* c, Expr* expr, |
| 278 | std::stack<StackRecord>* stack, |
no test coverage detected