Skip to content

feat(decompiler): complete v1 response codec with the high_function tree (#34-5c)#219

Merged
CryptoJones merged 1 commit into
masterfrom
feat/34-5c-response-highfunction
May 31, 2026
Merged

feat(decompiler): complete v1 response codec with the high_function tree (#34-5c)#219
CryptoJones merged 1 commit into
masterfrom
feat/34-5c-response-highfunction

Conversation

@CryptoJones
Copy link
Copy Markdown
Owner

Closes #218.

Final additive growth of schema/ipc_response_codec.h, the worker-side codec for the v1 (FlatBuffers) decompile-function response. #34-5a landed the envelope, #34-5b the pcode body; #34-5c carries the last field — high_function — completing the worker-side DecompileFunctionResponse codec.

What this adds

  • 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. has_type / has_storage / 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 encode/decode factored into build_high_symbol / read_high_symbol (it appears in both the parameter and local lists). Child offsets are fully built before the parent CreateHighFunctionDirect, per FlatBuffers' build order.

Test plan

  • 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.
  • scripts/local-precheck.sh --full green 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/

…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>
@CryptoJones CryptoJones merged commit b5310fa into master May 31, 2026
16 checks passed
@CryptoJones CryptoJones deleted the feat/34-5c-response-highfunction branch May 31, 2026 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rec 34 #34-5c: complete v1 response codec with the high_function tree

1 participant