feat(decompiler): complete v1 response codec with the high_function tree (#34-5c)#219
Merged
Merged
Conversation
…ree (#34-5c) Final additive growth of schema/ipc_response_codec.h, the worker-side codec for the v1 (FlatBuffers) decompile-function response. This increment carries DecompileFunctionResponse.high_function — the HighFunction table and its nested HighSymbol return value, parameter, and local lists, each symbol optionally bearing a DataType and a Storage location. DecompileResponseV1 gains DataTypeV1 / StorageV1 / HighSymbolV1 / HighFunctionV1 views and a has_high_function flag; HighSymbolV1.has_type / has_storage and HighFunctionV1.has_return_type mirror the schema's optional-table semantics so encode/decode distinguish an absent nested table from a zero-valued one rather than fabricating one. HighSymbol appears in both the parameter and local lists, so its encode (build_high_symbol) and decode (read_high_symbol) are factored out rather than duplicated. The child offsets are fully built before the parent CreateHighFunctionDirect call, per FlatBuffers' build order. With this the worker-side DecompileFunctionResponse codec covers every field in the schema (envelope + pcode + high_function). testipc_response_codec.cc adds three cases — a full HighFunction round-trip (return type, params, locals, storage), a HighFunction whose symbols omit the optional type/storage, and a response with no HighFunction at all (279 unit tests total). Test-only and inert, like the rest of #34-5: 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 #218.
Final additive growth of
schema/ipc_response_codec.h, the worker-side codec for the v1 (FlatBuffers) decompile-function response.#34-5alanded the envelope,#34-5bthepcodebody;#34-5ccarries the last field —high_function— completing the worker-sideDecompileFunctionResponsecodec.What this adds
DecompileFunctionResponse.high_function: theHighFunctiontable and its nestedHighSymbolreturn value, parameter, and local lists, each symbol optionally bearing aDataTypeand aStoragelocation.DecompileResponseV1gainsDataTypeV1/StorageV1/HighSymbolV1/HighFunctionV1views and ahas_high_functionflag.has_type/has_storage/has_return_typemirror the schema's optional-table semantics so encode/decode distinguish an absent nested table from a zero-valued one rather than fabricating one.HighSymbolencode/decode factored intobuild_high_symbol/read_high_symbol(it appears in both the parameter and local lists). Child offsets are fully built before the parentCreateHighFunctionDirect, per FlatBuffers' build order.Test plan
testipc_response_codec.ccadds three cases: a full HighFunction round-trip (return type, params, locals, storage), a HighFunction whose symbols omit the optional type/storage, and a response with no HighFunction at all.scripts/local-precheck.sh --fullgreen locally: 677/677 datatests; full C++ unit suite 279/279.Test-only and inert, like the rest of
#34-5: nothing in the production decompiler includes the codec yet — the command-loop wiring is the end-to-end-only change deferred per DD-0005.Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/