|
@ -23,8 +23,12 @@ void Analyse::start_analyse(uint64_t code) { |
|
|
cache.emplace(&cases.emplace(code, analyse_t { |
|
|
cache.emplace(&cases.emplace(code, analyse_t { |
|
|
.code = code, |
|
|
.code = code, |
|
|
.mask = 0, |
|
|
.mask = 0, |
|
|
|
|
|
.step = 0, |
|
|
|
|
|
.src = std::move(std::set<analyse_t*>{}), |
|
|
}).first->second); |
|
|
}).first->second); |
|
|
|
|
|
|
|
|
|
|
|
// std::cout << "src size: " << cases[code].src.size() << std::endl;
|
|
|
|
|
|
|
|
|
while (!cache.empty()) { |
|
|
while (!cache.empty()) { |
|
|
|
|
|
|
|
|
core.next_step(cache.front()->code, cache.front()->mask); |
|
|
core.next_step(cache.front()->code, cache.front()->mask); |
|
@ -39,11 +43,20 @@ void Analyse::new_case(uint64_t code, uint64_t mask) { |
|
|
auto current = cases.find(code); |
|
|
auto current = cases.find(code); |
|
|
if (current != cases.end()) { // find existed case
|
|
|
if (current != cases.end()) { // find existed case
|
|
|
current->second.mask |= mask; // update mask info
|
|
|
current->second.mask |= mask; // update mask info
|
|
|
|
|
|
|
|
|
|
|
|
// current->second.src.emplace()
|
|
|
|
|
|
|
|
|
|
|
|
if (current->second.step != cache.front()->step) { |
|
|
|
|
|
current->second.src.emplace(cache.front()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
cache.emplace(&cases.emplace(code, analyse_t { |
|
|
cache.emplace(&cases.emplace(code, analyse_t { |
|
|
.code = code, |
|
|
.code = code, |
|
|
.mask = mask, |
|
|
.mask = mask, |
|
|
|
|
|
.step = cache.front()->step + 1, |
|
|
|
|
|
.src = std::move(std::set<analyse_t*>{cache.front()}), |
|
|
}).first->second); |
|
|
}).first->second); |
|
|
} |
|
|
} |
|
|