Skip to content

Multi-section bytecode support#31

Open
robpatterson13 wants to merge 11 commits into
mainfrom
rob/multi-section
Open

Multi-section bytecode support#31
robpatterson13 wants to merge 11 commits into
mainfrom
rob/multi-section

Conversation

@robpatterson13

@robpatterson13 robpatterson13 commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Changes:

  • Adds multi-section bytecode support for vihaco. The sections in a file match the tree structure of vihaco composites, with macro-generated delegation to automatically load child devices marked #[loadable] with its section
  • Provides both text based and binary based bytecode formats in TextBytecodeFile and BinaryBytecodeFile, with parsing of specific sections left to the implementation of the instruction set
  • Provides API users with a lightweight generic SectionView for each section's ranges, backed by the file structs above
  • Updated docs to describe multi-section support

The general shape of a bytecode file is as follows:

  1. vihaco magic number: for text files, this is vihaco version <num>; for binary, this is b"VHBC<num>"
  2. global program context: information that is shared across sections, like constants, string tables, symbol tables, etc., defined by the author of the composite
  3. root section: the top level composite's section, with its own header, bytecode, and nested child sections

robpatterson13 and others added 6 commits June 23, 2026 18:42
…ng section scaffolding to accommodate text in addition to raw bytes
…ly resolved strings on binary side, already existing strings in text side
…26)

Per release-plz's official quickstart, switch release-plz/action from a commit
SHA back to the version tag (v0.5.130) -- consistent with the action's own docs
and the other version-pinned actions in this repo. A comment flags that the
"name@version" ref can be mangled by email-obfuscation tooling, so the ref must
be verified after automated edits.

Also add `pull-requests: read` to the release job, matching the recommended
setup (release-plz uses it to link merged PRs in the generated release notes).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@robpatterson13 robpatterson13 linked an issue Jun 25, 2026 that may be closed by this pull request
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://QuEraComputing.github.io/vihaco/pr-preview/pr-31/

Built to branch gh-pages at 2026-06-30 15:45 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@robpatterson13 robpatterson13 marked this pull request as ready for review June 30, 2026 17:35
@robpatterson13 robpatterson13 requested a review from kaihsin June 30, 2026 17:35
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.

Bytecode format definition and parser

2 participants