MCPcopy Create free account
hub / github.com/N64Recomp/N64Recomp / N64Recomp::LiveGeneratorContext

Class N64Recomp::LiveGeneratorContext

LiveRecomp/live_generator.cpp:54–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52};
53
54struct N64Recomp::LiveGeneratorContext {
55 std::string function_name;
56 std::unordered_map<std::string, sljit_label*> labels;
57 std::unordered_map<std::string, std::vector<sljit_jump*>> pending_jumps;
58 std::vector<sljit_label*> func_labels;
59 std::vector<InnerCall> inner_calls;
60 std::vector<std::vector<std::string>> switch_jump_labels;
61 // See LiveGeneratorOutput::jump_tables for info. Contains sljit labels so they can be linked after recompilation.
62 std::vector<std::pair<std::vector<sljit_label*>, std::unique_ptr<void*[]>>> unlinked_jump_tables;
63 // Jump tables for the current function being recompiled.
64 std::vector<std::unique_ptr<void*[]>> pending_jump_tables;
65 // See LiveGeneratorOutput::reference_symbol_jumps for info.
66 std::vector<std::pair<ReferenceJumpDetails, sljit_jump*>> reference_symbol_jumps;
67 // See LiveGeneratorOutput::import_jumps_by_index for info.
68 std::unordered_multimap<size_t, sljit_jump*> import_jumps_by_index;
69 std::vector<SwitchErrorJump> switch_error_jumps;
70 sljit_jump* cur_branch_jump;
71};
72
73N64Recomp::LiveGenerator::LiveGenerator(size_t num_funcs, const LiveGeneratorInputs& inputs) : inputs(inputs) {
74 compiler = sljit_create_compiler(nullptr);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected