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

Function rival_implementation

src/pipeline/doc_links_cs.c:2011–2022  ·  view source on GitHub ↗

True when an assembly among tops[lo, hi) -- the assemblies' types of the * shared declaration `shared`'s name -- holds an implementation of the name * that is no part of that declaration: a complete type, or parts where the * shared declaration is no partial type. Every contract of the name asks; * the assemblies are walked for the first, and the answer is kept with the * shared declaration.

Source from the content-addressed store, hash-verified

2009 * the assemblies are walked for the first, and the answer is kept with the
2010 * shared declaration. */
2011static bool rival_implementation(cs_index_t *ix, int lo, int hi, int shared) {
2012 cs_entity_t *s = &ix->ents[shared];
2013 if (!s->rival_known) {
2014 bool pool = s->owner == CS_POOL;
2015 for (int i = lo; !s->rival && i < hi; i++) {
2016 const cs_entity_t *e = &ix->ents[ix->tops[i].ent];
2017 s->rival = e->has_impl && !(pool && e->impl_partial);
2018 }
2019 s->rival_known = true;
2020 }
2021 return s->rival;
2022}
2023
2024/* The shared trees' declaration that belongs to an assembly's type: its
2025 * twin. Two rules give a top-level type one:

Callers 1

entity_twinsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected