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:2384–2397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2382}
2383
2384static int lexical_binding_lower_bound(const WalkState *state, uint32_t scope_id,
2385 const char *name) {
2386 int low = 0;
2387 int high = state->lexical_binding_count;
2388 while (low < high) {
2389 int middle = low + (high - low) / PAIR_LEN;
2390 if (compare_binding_key(&state->lexical_bindings[middle], scope_id, name) < 0) {
2391 low = middle + 1;
2392 } else {
2393 high = middle;
2394 }
2395 }
2396 return low;
2397}
2398
2399static bool lexical_binding_active_at(const WalkState *state, uint32_t scope_id, const char *name,
2400 uint32_t position) {

Callers 1

Calls 1

compare_binding_keyFunction · 0.85

Tested by

no test coverage detected