MCPcopy Create free account
hub / github.com/N64Recomp/N64Recomp / emit_goto

Method emit_goto

LiveRecomp/live_generator.cpp:1445–1456  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1443}
1444
1445void N64Recomp::LiveGenerator::emit_goto(const std::string& target) const {
1446 sljit_jump* jump = sljit_emit_jump(compiler, SLJIT_JUMP);
1447 // Check if the label already exists.
1448 auto find_it = context->labels.find(target);
1449 if (find_it != context->labels.end()) {
1450 sljit_set_label(jump, find_it->second);
1451 }
1452 // It doesn't, so queue this as a pending jump to be resolved later.
1453 else {
1454 context->pending_jumps[target].push_back(jump);
1455 }
1456}
1457
1458void N64Recomp::LiveGenerator::emit_label(const std::string& label_name) const {
1459 sljit_label* label = sljit_emit_label(compiler);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected