Releases: dfinity/motoko
0.7.2
-
motoko-base
- Fix bugs in
Buffer
library affectingremove
andfilterEntries
(dfinity/motoko-base#419).
- Fix bugs in
0.7.1
-
motoko (
moc
)-
Halve (default ir-checking) compilation times by optimizing type comparison and hashing (#3463)
-
Add support for type components in object type syntax (#3457, also fixes #3449)
type Record = { type T = Nat; x : Nat};
is now legal.
Note the definition ofT
is neither recursive, nor bound inx : Nat
,
but can refer to an existing recursive type declared in an outer scope. -
-
motoko-base
- Optimized and extended
Buffer
library (dfinity/motoko-base#417).
- Optimized and extended
0.7.0
-
motoko (
moc
)-
BREAKING CHANGE (Minor):
Adds new syntax for merging records (objects) and
adding/overwriting fields. The expression{ baseA and baseB with field1 = val1; field2 = val2 }
creates a new record by joining all (statically known) fields from
baseA/B
and the explicitly specifiedfield1/2
.
This is a breaking change, as a new keywordwith
has been added.
Restrictions for ambiguous andvar
fields from bases apply. (#3084) -
Add new support for installing actor class instances on the IC,
enabling specification of canister settings, install, upgrade and
reinstall. (#3386)A new expression
(system <exp> . <id>)
where
<exp>
is an imported library and<id>
is the name of
an actor class, accesses a secondary constructor of the class
that takes an additional argument controlling the installation.For example,
await (system Lib.Node)(#upgrade a)(i);
upgrades actor
a
with the code for a new instance of classLib.Node
,
passing constructor argument(i)
. -
Performance improvements for assigment-heavy code (thanks to nomeata) (#3406)
-
0.6.30
-
motoko (
moc
)-
add primitives
shiftLeft : (Nat, Nat32) -> Nat shiftRight : (Nat, Nat32) -> Nat
for efficiently multiplying/dividing a
Nat
by a power of 2
(#3112) -
add primitives
rts_mutator_instructions : () -> Nat rts_collector_instructions : () -> Nat
to report approximate IC instruction costs of the last message
due to mutation (computation) and collection (GC), respectively (#3381)
-
-
motoko-base
-
Add
Buffer.fromArray Buffer.fromVarArray
for efficiently adding an array to a
Buffer
(dfinity/motoko-base#389) -
Add
Iter.sort : (xs : Iter<A>, compare : (A, A) -> Order) : Iter<A>
for sorting an
Iter
given a comparison function
(dfinity/motoko-base#406) -
Performance:
HashMap
now avoids re-computing hashes onresize
(dfinity/motoko-base#394)
-
0.6.29
-
motoko (
moc
)- The language server now supports explicit symbol imports (thanks
to rvanasa) (#3282) - The language server now has improved support for navigating to
definitions in external modules (thanks to rvanasa) (#3263) - Added a primitive
textCompare
allowing more efficient three-way
Text
comparisons (#3298) - Fixed a typing bug with annotated, recursive records (#3268)
- The language server now supports explicit symbol imports (thanks
-
motoko-base
-
Add
ExperimentalInternetComputer.countInstruction : (comp : () -> ()) -> Nat64
to count the Wasm instructions performed during execution of
comp()
(dfinity/motoko-base#381) -
Add
ExperimentalStableMemory.stableVarQuery : () -> (shared query () -> async {size : Nat64})
for estimating stable variable storage requirements during upgrade
(dfinity/motoko-base#365) -
Performance improvement to
Text.compare
(dfinity/motoko-base#382)
-
0.6.28
0.6.27
-
motoko (
moc
)- Importing modules by relative path is now more robust (#3215).
- Performance: persisting stable variables to stable memory is now
performed in streaming fashion, reducing heap consumption and
copying during an upgrade (#3149). - Performance: local 32- and 64-bit numeric values are now stored in
using unboxed form when possible (thanks to nomeata) (#3207).
-
motoko-base
- Fixed a bug in
Trie.filter
(andTrie.mapFilter
) which could
lead to missing matches in some cases (dfinity/motoko-base#371).
- Fixed a bug in
0.6.26
-
motoko (
moc
)- Performance: inline prim-wrapping functions (thanks to nomeata) (#3159)
- Improve type pretty printer to mirror type parser (avoids producing unparseable stable variable signatures) (#3190)
- Adds new flag
--omit-metadata
to omit certain metadata sections fromactor
(andactor class
) Wasm (#3164) - Performance: avoid redundant heap allocation when deserializing compact Candid
int
andnat
values (#3173) - Added a primitive to obtain stable variable memory footprint (#3049)
-
motoko-base
- Fixed the 32-bit range limitation of
Hash.hash: Nat -> Nat32
and
deprecate most functions inHash
(dfinity/motoko-base#366). - Add
List.toIter
(thanks to hoosan) (dfinity/motoko-base#336).
- Fixed the 32-bit range limitation of