1. 24 Jun, 2016 1 commit
  2. 23 Jun, 2016 2 commits
  3. 22 Jun, 2016 1 commit
    • Kunshan Wang's avatar
      Map IR Builder functions to comminsts. · 8fb468bd
      Kunshan Wang authored
      Now the IR Builder API is also available as common instructions. We keep
      muapi.h as the canonical definition, and the semantics of common
      instructions maps to that of the API functions.
  4. 21 Jun, 2016 2 commits
  5. 17 Jun, 2016 1 commit
  6. 16 Jun, 2016 1 commit
  7. 14 Jun, 2016 2 commits
  8. 09 Jun, 2016 2 commits
    • Kunshan Wang's avatar
      Add cast to macros. · 831315bd
      Kunshan Wang authored
      Cast constant macros to their respective types so that they will have
      proper sizes and signedness.
      MuAtomicRMWOp is renamed to MuAtomicRMWOptr, in order not to confuse
      "operator" and "operand".
    • Kunshan Wang's avatar
      Modified new_thread API and annotated muapi.h · 7efae3f0
      Kunshan Wang authored
      The new_thread API call is split into two functions, one continues
      normally and the other throws exception. This interface will be more
      It will be convenient if there is a program that parses the muapi.h and
      generates language bindings (for Python, Scala, etc.). Some annotations
      are added in the muapi.h file to make this process easier. For example,
      when passing an array, C functions usually take two parameters: a
      pointer and a size. The param:array:sz annotation tells the parser that
      the "param" parameter points to an array whose size is determined by the
      "sz" parameter. "param:bool" tells the parser that the "int param"
      parameter holds a boolean value (non-zero or zero). "param:optional"
      tells the parser that the "T* param" parameter may be NULL.
  9. 06 Jun, 2016 1 commit
  10. 03 Jun, 2016 1 commit
  11. 01 Jun, 2016 1 commit
  12. 31 May, 2016 2 commits
    • Kunshan Wang's avatar
      Functions for building IR. · 725df50e
      Kunshan Wang authored
      The 'irbuilderref' type is no longer used. 'irnoderef' is the only newly
      introduced Mu type. A bundle node now works as a namespace. All other
      nodes are children of the bundle node. After a bundle node is loaded
      into Mu (or aborted), Mu may de-allocate the bundle node and all of its
      children for space efficiency.
    • Kunshan Wang's avatar
      Added irnoderef and some minor changes. · b22b04f4
      Kunshan Wang authored
      irnoderef refers to Mu IR nodes when constructing IR using the API.
      Pointer types should have been scalar types. Anything that is not
      composite types nor "void" should be scalar.
  13. 30 May, 2016 1 commit
  14. 26 May, 2016 1 commit
    • Kunshan Wang's avatar
      Deprecate binary form in favor for the IRBuilder. · 9900b7d7
      Kunshan Wang authored
      As we discussed, the bundle loading interface between the client and the
      micro VM should be a functional interface. The binary form is still a
      parsed format. This commit removes the binary format in the type system
      and the instruction set.
  15. 02 May, 2016 1 commit
    • Kunshan Wang's avatar
      THREADLOCAL clause in the NEWTHREAD inst. · 5422904a
      Kunshan Wang authored
      Like the `new_thread` API call, the NEWTHREAD instruction needs to take
      a thread-local objref as a parameter, too. This clause is optional. If
      omitted, it defaults to `NULL`.
  16. 29 Apr, 2016 1 commit
    • Kunshan Wang's avatar
      Added thread-local. · 94fe2b71
      Kunshan Wang authored
      The thread-local object reference gives each thread a reference to an
      arbitrary object, which can hold thread-local states. New API functions
      and new (common) instructions are added. It is also a thread states and
      a GC root.
  17. 13 Apr, 2016 1 commit
    • Kunshan Wang's avatar
      Added abstract types in muapi.h · 4e1c3202
      Kunshan Wang authored
      Added MuSeqValue and MuGenRefValue in the muapi.h. Although all MuValue
      subtypes are just aliases of void* in the C API, having some annotation
      makes the API more readable for the programmer as well as language
      binding makers.
  18. 05 Apr, 2016 1 commit
  19. 24 Mar, 2016 1 commit
  20. 12 Jan, 2016 1 commit
  21. 05 Jan, 2016 1 commit
    • Kunshan Wang's avatar
      Explicitly allow forward and cyclic references. · b2d648df
      Kunshan Wang authored
      Top-level definitions may refer to things defined later, or refer to
      each other recursively. It has always been allowed, but someone may
      think the following is forbidden:
          .typedef @longptr = uptr<@long> // @long is defined after this line
          .typedef @long = int<64>
  22. 14 Dec, 2015 1 commit
  23. 11 Dec, 2015 2 commits
  24. 09 Dec, 2015 1 commit
    • Kunshan Wang's avatar
      Note for C programmer · 8942ee5b
      Kunshan Wang authored
      In Mu, types, function signatures and constants cannot be written inline
      as in C, but must be defined at the top level. Global cells cannot be
      initialised like C, either.
  25. 03 Dec, 2015 1 commit
  26. 02 Dec, 2015 1 commit
    • Kunshan Wang's avatar
      Fixed trap handler and new_thread. · ce0b0d2e
      Kunshan Wang authored
      - Explicitly say in cmpxchg that "weak" is boolean.
      - The signature of the trap handler and the new_thread API are corrected
        so that input parameters are values and output parameters are pointers
        to values.
      - In trap handler, the "values" array is now a pointer to a
        client-allocated array. The client is also responsible for freeing it
        by providing a "freer". This is solely for working around the C
        programming language's limitation that "raw arrays (T*) do not know
        how to deallocate themselves". Garbage-collected languages (such as
        Haskell, Java, ...) and ownership-based languages (C++, rust) do not
        have such problems.
  27. 01 Dec, 2015 2 commits
  28. 26 Nov, 2015 1 commit
  29. 23 Nov, 2015 2 commits
  30. 13 Nov, 2015 1 commit
    • Kunshan Wang's avatar
      Use frame cursors in stack introspection. · 868f8fd4
      Kunshan Wang authored
      Introduced the framecursorref type. This is to solve performance problem
      when the stack is very deep. The API is still stateless, but a frame
      cursor is mutable. A frame cursor can only be created from a stack in
      the READY<Ts> state, may iterate downwards, and must be explicitly
      closed. Concurrent introspection that races with stack modification (pop
      frames/push frames/resuming a stack) has undefined behaviour.
      Also used "resumption point" to simplify the description of stack
      binding. The semantics is not changed. In the concrete syntax,
      resumption points are "beginning of function", "OSR point instruction"
      or "the appropriate place for native function". The Mu cases can be
      mapped to the resumption points in the formal model: entry of the %entry
      block, and the exit of the block where the OSR point instruction is in.
  31. 11 Nov, 2015 1 commit
  32. 10 Nov, 2015 1 commit