Tags: dfinity/motoko
Tags
experiment: implicit import all libs for dot&implicit resolution (#5561) Adds undocumented implicit libs flag that allows resolution for ctx dot and implicits even with missing imports. This flag adds all possible env.libs similarly to the --ai-errors flag. --------- Co-authored-by: Claudio Russo <claudio@dfinity.org>
feat: Deduplicate tagged blobs (#5512) This PR adds (tagged) blob deduplication support. The main issue it solves is that all external calls to a motoko canister go through candid deserialization and blobs passed as arguments end up as fresh blobs on the motoko heap. Calling multiple times with the same blob as argument creates multiple copies of the same blob. To achieve deduplication, this PR does the following: * in `internals.mo`, it creates a fixed-size hash-table which solves collisions via chaining. * sets up a thin RTS interface to set/get the hash-table allocated in `internals.mo` to be tracked by the RTS layer such that the table is not garbage collected and it survives upgrades. * to achieve deduplication, the hash table stores weak references pointing to the actual objects; once objects are garbage collected, the weak references will point to null. * a thin client interface (in `prim.mo`) to walk the hash table and check which deduplicated blobs are alive/dead and prune the dead ones if neeed.
feat: (over-)simplify type inference errors (#5552) * suppress reporting expected receiver when generic and dotted. * report *instantiated* types, reusing partial instantiation from receiver match if that's all that's available sofar. * report `.<funid>` in error * suppress implicit parameters/arguments when holes inserted * don't mention type parameter solutions at all. --------- Co-authored-by: Kamil Listopad <kamil.listopad@dfinity.org>
PreviousNext