Skip to content

GBC: Gengo Bytecode Cache — implementation #5

Description

@ganehag

The GBC spec is complete (docs/gbc-spec.md). Implementation has not started. GBC is a compiled module artifact that lets the runtime skip parsing and code generation for a known source file. It is not a heap snapshot.

Suggested first milestone

A minimal round-trip: writer + reader for a simple script with:

  • No imports
  • One bytecode section
  • Constants
  • Functions
  • Empty types table
  • Empty dependency table

Then add validation failures one by one until the full spec is covered.

Why it matters

  • Eliminates parse + compile overhead on repeated loads of the same module
  • Enables ahead-of-time compilation workflows (compile on dev machine, ship .gbc to constrained host)
  • Required foundation for any future caching or separate compilation story

Notes

  • GBC is not a memory snapshot — the VM still allocates and initialises objects at load time
  • The spec covers magic bytes, version field, section table, and a dependency hash for invalidation
  • See docs/gbc-spec.md for the full format

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low priorityarea:runtimeVM, heap, GC, runtimeenhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions