Coder Social home page Coder Social logo

type-v's Introduction

Type-V is a virtual machine and runtime environment for type-c programs. While the VM can be used for generic purposes, its instructions are heavily optimized for type-c source code, such as offset-based data types (structs, arrays, classes, interfaces, shadow structs, etc), built-in concurrency, etc.

Status

As for the right now, the VM is still experimental and lacking major features.

Progress:

  • Assembler
  • Instruction set specification
  • Processes (not to be confused with OS processes)
  • VM API passes valgrind checks (doesn't count bytecode allocated memory since it's supposed to be handled by GC)
  • Non-blocking I/O
  • Garbage collection
  • Unit tests

Bytecode example:

As of the right now, the instructions themselves are solid, however the instruction names in the assembler are subject to change.

VERSION: 1

CONST:

GLOBAL:
    x: u64 = 0
CODE:
    p_queue_size r0
    debug_reg r0

    ; spawn
    p_alloc r1 proc1
    p_alloc r2 proc1
    mv_reg_i r15 10
    p_emit r1 r15
    p_emit r2 r15
    p_send_sig r1 2   ; KILL signal
    p_send_sig r2 1   ; TERMINATE signal
    halt


proc1:
    p_wait_queue
    p_dequeue r14
    p_cid r1
    add_u32 r1 r14 r1
    debug_reg r1
    j proc1

Licenses

Name License Usage Link
libtable MIT Table printing https://github.com/marchelzo/libtable

License

type-v's People

Contributors

praisethemoon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.