MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / lexical_binding_lower_bound

Function lexical_binding_lower_bound

internal/cbm/extract_usages.c:2280–2293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2278}
2279
2280static int lexical_binding_lower_bound(const WalkState *state, uint32_t scope_id,
2281 const char *name) {
2282 int low = 0;
2283 int high = state->lexical_binding_count;
2284 while (low < high) {
2285 int middle = low + (high - low) / PAIR_LEN;
2286 if (compare_binding_key(&state->lexical_bindings[middle], scope_id, name) < 0) {
2287 low = middle + 1;
2288 } else {
2289 high = middle;
2290 }
2291 }
2292 return low;
2293}
2294
2295static bool lexical_binding_active_at(const WalkState *state, uint32_t scope_id, const char *name,
2296 uint32_t position) {

Callers 1

Calls 1

compare_binding_keyFunction · 0.85

Tested by

no test coverage detected