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

Function readSource

src/codegen/compiler.cpp:1477–1500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1475}
1476
1477Site* readSource(Context* c, Read* r)
1478{
1479 Value* v = r->value;
1480
1481 if (DebugReads) {
1482 char buffer[1024];
1483 sitesToString(c, v, buffer, 1024);
1484 fprintf(stderr, "read source for %p from %s\n", v, buffer);
1485 }
1486
1487 if (not v->hasSite(c)) {
1488 if (DebugReads) {
1489 fprintf(stderr, "no sites found for %p\n", v);
1490 }
1491 return 0;
1492 }
1493
1494 Value* high = r->high(c);
1495 if (high) {
1496 return pickMatchOrMove(c, r, high->source, 0, true);
1497 } else {
1498 return pickSiteOrMove(c, r, true, true);
1499 }
1500}
1501
1502void propagateJunctionSites(Context* c, Event* e, Site** sites)
1503{

Callers 1

populateSourcesFunction · 0.85

Calls 5

sitesToStringFunction · 0.85
pickMatchOrMoveFunction · 0.85
pickSiteOrMoveFunction · 0.85
hasSiteMethod · 0.80
highMethod · 0.45

Tested by

no test coverage detected