| 223 | } |
| 224 | |
| 225 | void PushCallDeps(CallExpr* call_expr, Expr* expr, |
| 226 | std::stack<StackRecord>* stack) { |
| 227 | const int arg_size = call_expr->args().size(); |
| 228 | // Our contract is that we visit arguments in order. To do that, we need |
| 229 | // to push them onto the stack in reverse order. |
| 230 | for (int i = arg_size - 1; i >= 0; --i) { |
| 231 | stack->push(StackRecord(&call_expr->mutable_args()[i], expr, i)); |
| 232 | } |
| 233 | // Are we receiver-style? |
| 234 | if (call_expr->has_target()) { |
| 235 | stack->push( |
| 236 | StackRecord(&call_expr->mutable_target(), expr, StackRecord::kTarget)); |
| 237 | } |
| 238 | } |
| 239 | |
| 240 | void PushListDeps(ListExpr* list_expr, std::stack<StackRecord>* stack) { |
| 241 | auto& elements = list_expr->mutable_elements(); |
no test coverage detected