| 1475 | } |
| 1476 | |
| 1477 | Site* 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 | |
| 1502 | void propagateJunctionSites(Context* c, Event* e, Site** sites) |
| 1503 | { |
no test coverage detected