Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement low level VM #32

Closed
GraphR00t opened this issue Jan 9, 2024 · 0 comments
Closed

Implement low level VM #32

GraphR00t opened this issue Jan 9, 2024 · 0 comments

Comments

@GraphR00t
Copy link
Contributor

GraphR00t commented Jan 9, 2024

High Level VM (implemented)

  • Intended to execute business logic
  • []Value stack
  • Integer overflows are not allowed (checks have a cost)
  • All types are supported
  • Cannot execute struct methods
  • Can have side effects

Low Level VM

  • Intended to execute computation logic and utility logic
  • Faster than the high level VM
  • []byte stack
  • Integer overflows are not checked (no performance penalty)
  • Only a few types will be supported: int, bool, float, string, struct types, and a few more
  • Will be able to execute struct methods
  • Will have strictly limited side effects

The low level VM will be invoked by the high level VM.

  • Struct methods will always be compiled as low-level bytecode.
  • Inox functions whose declaration is prefixed with a specific keyword (lowlevel?) will be considered low level.
@GraphR00t GraphR00t added this to the Version 0.3 milestone Jan 9, 2024
@GraphR00t GraphR00t reopened this Mar 20, 2024
@GraphR00t GraphR00t closed this as not planned Won't fix, can't repro, duplicate, stale Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant