| 1711 | } |
| 1712 | |
| 1713 | void 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 | |
| 1724 | void Memory::markByVal(unsigned bid, bool is_const) { |
| 1725 | assert(is_globalvar(bid, false)); |
no test coverage detected