Skip to content

CFG Part 1: ProcDecoder Refactor#2596

Open
ike709 wants to merge 17 commits into
OpenDreamProject:masterfrom
ike709:cfg_part_1
Open

CFG Part 1: ProcDecoder Refactor#2596
ike709 wants to merge 17 commits into
OpenDreamProject:masterfrom
ike709:cfg_part_1

Conversation

@ike709
Copy link
Copy Markdown
Collaborator

@ike709 ike709 commented May 26, 2026

Please merge #2561 first since this PR is branched off of that. This PR is just the last couple commits.

This is the much more atomized next PR in the series of changes to implement a control flow graph. This PR focuses on ripping ProcDecoder out of the runtime and throwing it into the DMCompiler project so the control flow graph can share it with the debugger and disassembler. It also changes the ITuple to a new ProcInstruction struct comprised of ProcOperands.

I tested it by doing before & after disassembler dumps of TG between CFG Part 0 and this PR. They were identical except for the removal of some trailing whitespace on some of the N-variant opcodes.

@boring-cyborg boring-cyborg Bot added Compiler Involves the OpenDream compiler Runtime Involves the OpenDream server/runtime labels May 26, 2026
@ike709
Copy link
Copy Markdown
Collaborator Author

ike709 commented May 26, 2026

We could eliminate the switch() in GetBranchTarget() by being consistent about operand ordering in the opcodes, but I'll leave that for a future PR.

@github-actions
Copy link
Copy Markdown

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Compiler Involves the OpenDream compiler Merge Conflict Runtime Involves the OpenDream server/runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant