mpl
mpl copied to clipboard
The MaPLe compiler for efficient and scalable parallel functional programming
**Location**: `runtime/gc/concurrent-stack.c` **Function**: `CC_stack_try_close()` **Lines**: 199-205 **Bug Pattern**: Lock acquired in loop, early `break` without unlock #### The Code ```c bool CC_stack_try_close(CC_stack* stack, HM_chunkList removed) { // First, do a...
The type `bool` is a 32-bit type, which makes it inefficient for use in arrays of flags. Ideally, it would be an 8-bit type. In our benchmarks, we have been...
Introduced in 456c9c265418d6774ed933a97518c3feda7ab2ac, the function `ForkJoin.alloc: int -> 'a array` performs GC-safe parallel initialization of a polymorphic array. The implementation relies on monomorphization as well as an "uninitialization" primitive introduced...
The idea would be to revive MLton-based support for compiling code into a library format. See [MLton LibrarySupport](http://mlton.org/LibrarySupport). This would be a significantly different use-case for MaPLe. It would allow...
(Known about this for a while but forgot to raise an issue. Trying to be better about bug tracking...) Our implementation of path compression in the hierarchical heap union-find tree...
I believe there is a space leak in the `else` branch here: https://github.com/MPLLang/mpl/blob/a71659b091661ec6da14d6d155ea01f0ed4df336/runtime/gc/hierarchical-heap.c#L1337-L1341 The space leak is never materializing because at the moment this branch is unused. `HM_HH_freeAllDependants` is called...
MaPLe currently only tracks allocations in a very coarse-grained manner, specifically by tracking chunk allocations and deallocations. As a consequence, the functions [MPL.GC.{bytesAllocated,bytesAllocatedOfProc}](https://github.com/MPLLang/mpl/blob/a71659b091661ec6da14d6d155ea01f0ed4df336/basis-library/mpl/gc.sig#L46-L47) are fairly inaccurate. Our current scheduling of...
Some thoughts: * Currently, we have MPL.File (see [here](https://github.com/MPLLang/mpl/tree/main/basis-library/mpl)), backed by mmap, which is useful for efficiently reading an entire file into memory in parallel. * See e.g. [ReadFile](https://github.com/MPLLang/mpllib/blob/b0a478b060e20ca715c26dd564a127ac8dcc3a24/lib/github.com/mpllang/mpllib/compat/mpl.sml#L17-L51) in...
- [x] Added some comments on where spork gets added as a prim and lowered into IR - [x] Created a unified interface for unrolled and regular loops in `ForkJoin`...
Just keeping track of this, we should pull it into MaPLe too: https://github.com/MLton/mlton/pull/627