feat(decompiler): Rec 34 #34-5b — extend v1 response codec with the pcode body#217
Merged
Merged
Conversation
Grow the worker-side response codec additively from the #34-5a envelope to carry DecompileFunctionResponse.pcode — the PcodeOp array. Each op carries an opcode, a sequence number, an optional output Varnode, and an inputs Varnode list. schema/ipc_response_codec.h gains VarnodeV1 / PcodeOpV1 native views and extends encode/decode to walk the pcode vector. The schema's output is an optional table, so PcodeOpV1.has_output distinguishes "no output varnode" from a zero-valued one; encode emits no output table when has_output is false and decode reports has_output from the table's presence, preserving the optional-table semantics rather than fabricating a varnode. Varnode is a flat leaf table; inputs round-trips in order, empty list included. testipc_response_codec.cc adds three cases — an op with an output and multiple inputs, an op with no output, and multiple ops including one with empty inputs — bringing the unit suite to 276 tests, all green. The HighFunction/HighSymbol/DataType/Storage tree is still deferred to #34-5c; a response encoded here leaves high_function unset and decode does not touch it. Test-only and inert: nothing in the production decompiler includes the codec yet — the command-loop wiring is the end-to-end-only change deferred per DD-0005. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #216.
Increment 2 of the Rec 34 response path (
#34-5b): extend the worker-side response codec additively from the#34-5aenvelope to carryDecompileFunctionResponse.pcode— thePcodeOparray.What
schema/ipc_response_codec.h—DecompileResponseV1gainsVarnodeV1/PcodeOpV1views and apcodelist;encode/decodewalk it.PcodeOp: opcode, sequence number, optional outputVarnode,inputsVarnodelist.PcodeOpV1.has_outputdistinguishes "no output varnode" from a zero-valued one —encodeemits no output table when false,decodereports presence — so the schema's optional-table semantics survive instead of fabricating a varnode.Scope
The
high_functiontree (HighFunction/HighSymbol/DataType/Storage) is still deferred to#34-5c; a response encoded here leaveshigh_functionunset and decode does not touch it. Test-only and inert: nothing in the production decompiler includes the codec yet — command-loop wiring deferred per DD-0005.Test plan
make decomp_test_dbg— clean compile, no warnings on the new TUscripts/local-precheck.sh --full— 677/677 datatests, OKProudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/