| 196 | } |
| 197 | |
| 198 | void PushCallDeps(const CallExpr* call_expr, const Expr* expr, |
| 199 | std::stack<StackRecord>* stack) { |
| 200 | const int arg_size = call_expr->args().size(); |
| 201 | // Our contract is that we visit arguments in order. To do that, we need |
| 202 | // to push them onto the stack in reverse order. |
| 203 | for (int i = arg_size - 1; i >= 0; --i) { |
| 204 | stack->push(StackRecord(&call_expr->args()[i], expr, i)); |
| 205 | } |
| 206 | // Are we receiver-style? |
| 207 | if (call_expr->has_target()) { |
| 208 | stack->push(StackRecord(&call_expr->target(), expr, StackRecord::kTarget)); |
| 209 | } |
| 210 | } |
| 211 | |
| 212 | void PushListDeps(const ListExpr* list_expr, std::stack<StackRecord>* stack) { |
| 213 | const auto& elements = list_expr->elements(); |
no test coverage detected