MCPcopy Create free account
hub / github.com/ReadyTalk/avian / pickMatchOrMove

Function pickMatchOrMove

src/codegen/compiler.cpp:975–995  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

973}
974
975Site* pickMatchOrMove(Context* c,
976 Read* r,
977 Site* nextWord,
978 unsigned index,
979 bool intersectRead)
980{
981 Site* s = pickSite(c, r->value, nextWord, index, true);
982 SiteMask mask;
983 if (intersectRead) {
984 r->intersect(&mask);
985 }
986 if (s and s->match(c, mask)) {
987 return s;
988 }
989
990 return pickSiteOrMove(c,
991 r->value,
992 mask.intersectionWith(nextWord->nextWordMask(c, index)),
993 true,
994 true);
995}
996
997Site* pickSiteOrMove(Context* c,
998 Value* src,

Callers 2

pickSiteOrMoveFunction · 0.85
readSourceFunction · 0.85

Calls 6

pickSiteFunction · 0.85
pickSiteOrMoveFunction · 0.85
intersectionWithMethod · 0.80
intersectMethod · 0.45
matchMethod · 0.45
nextWordMaskMethod · 0.45

Tested by

no test coverage detected