Skip to content
duangsuse edited this page Jan 4, 2018 · 4 revisions

Min Virtual Machine Specification VM Language

MinVM is a Virtual Machine for Min Programming Language (which is still developing now)

that runs blazingly fast, prevents segfaults, and guarantees thread safety

that runs extreme slow, generate Exceptions, and has no multi-threading API not thread safe

and gives you extreme-small runtime for Min Programs(or other language that compiles to MinVM Assembly)

MinVM is a register-based Virtual Machine for Advanced Languages, like ParrotVM, BeamVM, and what MinVM depends on, the JVM.

Basic design

MinVM has 4 registers and 1 stack (for passing arguments) and 2 internal stack. MinVM also has a global ENV(Hashtable<int, Object>) to store Objects.

registers

  • ax: A Register <Object>
  • bx: B Register <Object>
  • rx: FFI Call Result Register <Object>
  • ex: Exception Register <Exception>
internal registers
  • pc: Program Counter <Integer>
  • asp: Argument Stack Pointer <Integer>
  • csp: Call Stack Pointer <Integer>
  • esp: Scope Stack Pointer <Integer>

stacks

  • as: Argument Stack <Array<Object>>
  • cs: Call Stack <Array<Integer>>
  • es: Scope Stack <Array<Scope>>

Other resources

See wiki

License

minized-lang/MVM is licensed under the GNU General Public License v3.0

LICENSE

Clone this wiki locally