Skip to content

feat: add bytecode dump for debugging#191

Merged
zharinov merged 2 commits intomasterfrom
feat/bytecode-dump
Dec 31, 2025
Merged

feat: add bytecode dump for debugging#191
zharinov merged 2 commits intomasterfrom
feat/bytecode-dump

Conversation

@zharinov
Copy link
Copy Markdown
Member

Summary

  • Add human-readable bytecode dump function dump(&Module) -> String
  • Add header flags infrastructure (flags::LINKED, is_linked(), set_linked())
  • Output format documented in docs/wip/bytecode.md

Format includes:

  • [header] - linked flag
  • [strings] - string table
  • [types.defs] - type definitions
  • [types.members] - struct/enum members
  • [types.names] - named type aliases
  • [entry] - entrypoints
  • [code] - instructions with symbolic formatting

Depends on: #190 (bytecode IR)

Note: Tests will be added with query compilation PR (requires emit path).

Test plan

  • cargo check -p plotnik-lib passes
  • cargo test -p plotnik-lib header passes (7 tests)

@zharinov zharinov enabled auto-merge (squash) December 31, 2025 12:19
@zharinov zharinov merged commit 3188347 into master Dec 31, 2025
4 checks passed
@zharinov zharinov deleted the feat/bytecode-dump branch December 31, 2025 12:20
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.

1 participant