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

Source from the content-addressed store, hash-verified

2248}
2249
2250static int lexical_binding_lower_bound(const WalkState *state, uint32_t scope_id,
2251 const char *name) {
2252 int low = 0;
2253 int high = state->lexical_binding_count;
2254 while (low < high) {
2255 int middle = low + (high - low) / PAIR_LEN;
2256 if (compare_binding_key(&state->lexical_bindings[middle], scope_id, name) < 0) {
2257 low = middle + 1;
2258 } else {
2259 high = middle;
2260 }
2261 }
2262 return low;
2263}
2264
2265static bool lexical_binding_active_at(const WalkState *state, uint32_t scope_id, const char *name,
2266 uint32_t position) {

Callers 1

Calls 1

compare_binding_keyFunction · 0.85

Tested by

no test coverage detected