| 52 | }; |
| 53 | |
| 54 | struct 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 | |
| 73 | N64Recomp::LiveGenerator::LiveGenerator(size_t num_funcs, const LiveGeneratorInputs& inputs) : inputs(inputs) { |
| 74 | compiler = sljit_create_compiler(nullptr); |
nothing calls this directly
no outgoing calls
no test coverage detected