| 920 | set<pair<Value*, uint64_t>> nonlocal_cache; |
| 921 | |
| 922 | void exec(const Instr &i, CountMemBlock &glb_data) { |
| 923 | if (returns_local(i)) { |
| 924 | // TODO: can't be path sensitive yet |
| 925 | } else { |
| 926 | num_nonlocals += returns_nonlocal(i, nonlocal_cache); |
| 927 | glb_data.num_nonlocals += returns_nonlocal(i, glb_data.nonlocal_cache); |
| 928 | num_nonlocals = min(num_nonlocals, glb_data.num_nonlocals); |
| 929 | } |
| 930 | } |
| 931 | |
| 932 | void merge(const CountMemBlock &other) { |
| 933 | // if LHS has x more non-locals than RHS, then it gets to keep the first |
nothing calls this directly
no test coverage detected