| 193 | } |
| 194 | |
| 195 | static bool py_param_stack_reserve(WalkState *state) { |
| 196 | if (state->py_param_stack_count < state->py_param_stack_capacity) { |
| 197 | return true; |
| 198 | } |
| 199 | int new_capacity = state->py_param_stack_capacity * PAIR_LEN; |
| 200 | if (new_capacity <= state->py_param_stack_capacity) { |
| 201 | return false; |
| 202 | } |
| 203 | const char **grown = |
| 204 | (const char **)cbm_arena_alloc(state->arena, (size_t)new_capacity * sizeof(*grown)); |
| 205 | if (!grown) { |
| 206 | return false; |
| 207 | } |
| 208 | memcpy(grown, state->py_param_stack, (size_t)state->py_param_stack_count * sizeof(*grown)); |
| 209 | state->py_param_stack = grown; |
| 210 | state->py_param_stack_capacity = new_capacity; |
| 211 | return true; |
| 212 | } |
| 213 | |
| 214 | /* Bind one parameter name for the lifetime of the frame currently on top. */ |
| 215 | static void py_param_bind(WalkState *state, const char *name) { |
no test coverage detected