Skip to content

Releases: dfinity/motoko

0.9.3

19 Jun 15:55
efec74d
Compare
Choose a tag to compare
  • motoko (moc)

    • Added fields sender_canister_version for actor class version tracking (#4036).

0.9.2

10 Jun 00:45
9ce2e5a
Compare
Choose a tag to compare
  • motoko (moc)

    • BREAKING CHANGE (Minor):

      or-patterns in function definitions cannot be inferred any more. The new error
      message suggests to add a type annotation instead. This became necessary in order
      to avoid potentially unsound types (#4012).

    • Added implementation for ic0.canister_version as a primitive (#4027).

    • Added a more efficient Prim.blobCompare (thanks to nomeata) (#4009).

    • bugfix: minor error in grammar for async* expressions (#4005).

  • motoko-base

0.9.1

15 May 18:11
69fd8c6
Compare
Choose a tag to compare
  • motoko (moc)

    • Added implementation for ic0.is_controller as a primitive (#3935).

    • Added ability to enable the new incremental GC in the Motoko Playground (#3976).

0.9.0

12 May 22:21
fa8c9be
Compare
Choose a tag to compare
  • motoko (moc)

    • For beta testing: Add a new incremental GC, enabled with new moc flag --incremental-gc (#3837).
      The incremental garbage collector is designed to scale for large program heap sizes.

      The GC distributes its workload across multiple steps, called increments, that each pause the mutator
      (user's program) for only a limited amount of time. As a result, the GC work can fit within the instruction-limited
      IC messages, regardless of the heap size and the object structures.

      According to GC benchmark measurements, the incremental GC is more efficient than the existing copying, compacting,
      and generational GC in the following regards:

      • Scalability: Able to use the full heap space, 3x more object allocations on average.
      • Shorter interruptions: The GC pause has a maximum limit that is up to 10x shorter.
      • Lower runtimes: The number of executed instructions is reduced by 10% on average (compared to the copying GC).
      • Less GC overhead: The amount of GC work in proportion to the user's program work drops by 10-16%.

      The GC incurs a moderate memory overhead: The allocated WASM memory has been measured to be 9% higher
      on average compared to the copying GC, which is the current default GC.

      To activate the incremental GC under dfx, the following command-line argument needs to be specified in dfx.json:

      ...
        "type" : "motoko"
        ...
        "args" : "--incremental-gc"
      ...
      
    • bugfix: array.vals() now returns a working iterator for mutable arrays (#3497, #3967).

0.8.8

02 May 09:38
0bdb1d6
Compare
Choose a tag to compare
  • motoko (moc)

    • Performance improvement: optimised code generation for pattern matching that cannot fail (#3957).

0.8.7

06 Apr 12:08
c5a81a4
Compare
Choose a tag to compare
  • motoko (moc)

    • Added ability to mo-doc for rendering documentation of nested modules (#3918).

    • bugfix: when re-adding recurrent timers, skip over past expirations (#3871).

    • bugfix: eliminated crash compiling local async functions that pattern match on arguments (#3910, #3916).

0.8.6

01 Apr 11:52
f8974d5
Compare
Choose a tag to compare
  • motoko (moc)

    • bugfix: avoid compiler crash (regression) when let-matching on constant variants (#3901, #3903).

    • Performance improvement: reduced cycle usage when receiving messages (#3893).

0.8.5

20 Mar 15:47
5fc5632
Compare
Choose a tag to compare
  • motoko (moc)

    • Performance improvement: Values of variant type that are compile-time known
      are relegated to the static heap now and don't get allocated each time (#3878).

    • bugfix: the global timer expiration callback was called unnecessarily in the
      default mechanism (#3883).

0.8.4

11 Mar 13:42
9f9ea33
Compare
Choose a tag to compare
  • motoko (moc)

    • Performance improvement: UTF-8 coding and validation is now properly tail recursive (#3842).

    • Performance improvement: eliminated bounds checking for certain array accesses (thanks to nomeata) (#3853).

    • Performance improvement: optimized {array, blob, text}.size() operations (thanks to nomeata) (#3863).

    • Performance improvement: efficient tuple results in switch statements (thanks to nomeata) (#3865).

    • Performance improvement: more efficient untagging operation (#3873).

    • bugfix: restored a grammar regression caused by let-else (#3869).

  • motoko-base

0.8.3

24 Feb 16:39
73330dd
Compare
Choose a tag to compare
  • motoko (moc)

    • new 'let-else' construct for handling pattern-match failure (#3836).
      This is a frequently asked-for feature that allows to change the control-flow
      of programs when pattern-match failure occurs, thus providing a means against
      the famous "pyramid of doom" issue. A common example is look-ups:

      shared func getUser(user : Text) : async Id {
        let ?id = Map.get(users, user) else { throw Error.reject("no such user") };
        id
      }

      Similarly, an expression like

      (label v : Bool { let <pat> = <exp> else break v false; true })

      evaluates to a Bool, signifying whether <pat> matches <exp>.

    • Improve recursive deserialization capacity to match recursive serialization capacity by reducing
      Wasm stack consumption (#3809).
      Because of the bounds on recursion depth imposed by fixed-size stack, the
      advice remains the same: avoid deeply nested recursive data structures.
      Think "shallow trees good, very long lists bad".

    • bugfix: stack overflow in UTF-8 encode/decode for moc.js (#3825).

  • motoko-base

    • add missing unshare : Tree<K, V> -> () method to class RBTree<K, V>
      to restore objects from saved state (dfinity/motoko-base#532).