Skip to content

SVML Specification

martin-henz edited this page Feb 25, 2020 · 21 revisions

This page serves as a repository for preliminary specification of a virtual machine code (byte code) format for Virtual Machine implementations of Source.

Overall format

Let's have a few bytes in the beginning to indicate what kind of byte code it is, similar to the JVM, as well as a version number:

  • Something similar to JVM's 0xCAFEBABE
  • Version number: 2 bytes for minor, 2 bytes for major
  • Constant pool count
  • Constant pool
  • code

See here for comparison: https://en.wikipedia.org/wiki/Java_class_file

...

Clone this wiki locally