0.7.4
-
motoko (
moc)-
Add new keywords
async*andawait*(note the*) for efficient abstraction of asynchronous code (#3609).<typ> ::= ... async* <typ> delayed, asynchronous computation <exp> ::= ... async* <block-or-exp> delay an asynchronous computation await* <block-or-exp> execute a delayed computation (only in async, async*)This avoids the resource consumption and latency of
async/awaitby only committing state and suspending execution
when necessary in theawait*-ed computation, not necessarily at theawait*itself.WARNING: Unlike
async/await:- an
async*value has no effect unlessawait*-ed; - each
await*of the sameasync*value repeats its effects.
This feature is experimental and may evolve in future. Use with discretion.
See the manual for details. - an
-
Suppress GC during IC
canister_heartbeat, deferring any GC to the scheduled Motokoheartbeatsystemmethod (#3623).
This is a temporary workaround, to be removed once DTS is supported forcanister_heartbeatitself (#3622). -
Add a new generational GC, enabled with new moc flag
--generational-gc(#3495).
The generational garbage collector optimizes for fast reclamation of short-lived objects.
New objects are allocated in a young generation that is more frequently collected than the older objects
that have already survived a GC run.For many cases, the generational GC is more efficient than the existing compacting GC and copying GCs:
- Lower runtimes: Less number of executed instructions on average.
- Shorter interruptions: Young generation collection entails shorter program interruptions.
To activate the generational GC under
dfx, the following command-line argument needs to be specified indfx.json:... "type" : "motoko" ... "args" : "--generational-gc" ... -
moc.js: add trampoline and step limiter to interpreter, avoiding (some) stackoverflows and
hangs (#3618, #3541).
Enables execution of larger examples on web pages. -
BREAKING CHANGE (Minor):
Consider records with mutable fields as non-static (#3586).
Consequently, an imported library declaring a mutable record is now
rejected, not accepted, to be consistent with the declarations of
mutable fields and mutable objects. -
Experimental Viper integration by compiling a very narrow subset of
Motoko to the verification intermediate language. Seesrc/viper/README.md
and the PR for details. (#3477).
-
-
motoko-base
-
Unit tests for Trie and fix for
disj(caffeinelabs/motoko-base#438). -
Respect Trie structure in
filter(caffeinelabs/motoko-base#431, caffeinelabs/motoko-base#438). -
Array module reimplementation, tests and documentation (caffeinelabs/motoko-base#425,caffeinelabs/motoko-base#432).
-