| 415 | } |
| 416 | |
| 417 | static void push_call_scope(WalkState *state, uint32_t depth, |
| 418 | const CBMInvocationDescriptor *invocation) { |
| 419 | if (!invocation || |
| 420 | (invocation->kind != CBM_INVOCATION_CALLABLE_REFERENCE && !invocation->raw_call_emitted) || |
| 421 | (ts_node_is_null(invocation->callee_expr) && ts_node_is_null(invocation->callee_leaf))) { |
| 422 | return; |
| 423 | } |
| 424 | if (!push_scope(state, SCOPE_CALL, depth, NULL)) { |
| 425 | return; |
| 426 | } |
| 427 | state->scopes[state->scope_top - SKIP_ONE].invocation_kind = invocation->kind; |
| 428 | state->scopes[state->scope_top - SKIP_ONE].callee_expr = invocation->callee_expr; |
| 429 | state->scopes[state->scope_top - SKIP_ONE].callee_leaf = invocation->callee_leaf; |
| 430 | /* Apply the CALL effect (push_scope saved the displaced tuple already; |
| 431 | * the frame fields had to be filled first). */ |
| 432 | state->invocation_kind = invocation->kind; |
| 433 | state->callee_expr = invocation->callee_expr; |
| 434 | state->callee_leaf = invocation->callee_leaf; |
| 435 | } |
| 436 | |
| 437 | // Pop scopes that we've ascended out of (depth >= current cursor depth), |
| 438 | // restoring the walk-state tuple each frame displaced. LIFO order keeps the |
no test coverage detected