MCPcopy Create free account
hub / github.com/AliveToolkit/alive2 / syncWithSrc

Method syncWithSrc

ir/memory.cpp:1713–1722  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1711}
1712
1713void Memory::syncWithSrc(const Memory &src) {
1714 assert(src.state->isSource() && !state->isSource());
1715 resetGlobals();
1716 next_const_bid = num_nonlocals_src; // tgt consts start after all src vars
1717 // tgt can only have new const globals, but it allocates input ptrs
1718 next_global_bid = num_nonlocals_src;
1719 next_nonlocal_bid = src.next_nonlocal_bid;
1720 ptr_alias = src.ptr_alias;
1721 // TODO: copy alias info for fn return ptrs from src?
1722}
1723
1724void Memory::markByVal(unsigned bid, bool is_const) {
1725 assert(is_globalvar(bid, false));

Callers 1

syncSEdataWithSrcMethod · 0.80

Calls 1

isSourceMethod · 0.80

Tested by

no test coverage detected