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

Method end

ir/instr.cpp:3216–3228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3214}
3215
3216JumpInstr::target_iterator JumpInstr::it_helper::end() const {
3217 unsigned idx;
3218 if (!instr) {
3219 idx = 0;
3220 } else if (auto br = dynamic_cast<const Branch*>(instr)) {
3221 idx = br->getFalse() ? 2 : 1;
3222 } else if (auto sw = dynamic_cast<const Switch*>(instr)) {
3223 idx = sw->getNumTargets() + 1;
3224 } else {
3225 UNREACHABLE();
3226 }
3227 return { instr, idx };
3228}
3229
3230bool JumpInstr::isTerminator() const {
3231 return true;

Callers 15

mainFunction · 0.45
alive_parser.cppFile · 0.45
instantiate_undefFunction · 0.45
preprocessFunction · 0.45
check_refinementFunction · 0.45
get_base_ptrFunction · 0.45
may_be_nonlocalFunction · 0.45
mergeMethod · 0.45
verifyMethod · 0.45
can_remove_initFunction · 0.45
preprocessMethod · 0.45

Calls 2

getFalseMethod · 0.80
getNumTargetsMethod · 0.80

Tested by 3

tryParseIfCondFunction · 0.36
tryParseElseFunction · 0.36
parseTextFunction · 0.36