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

Method exec

tools/transform.cpp:922–930  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

returns_localFunction · 0.85
returns_nonlocalFunction · 0.85

Tested by

no test coverage detected