CakeML / CakeML/cakeml

Add join points to compiler.

Open
#1,164 0 comments 0 reactions 0 assignees View on GitHub
code size medium effort
Dominant language
Standard ML
Stars
1.2k
Forks
104
Avg merge
2d 21h
Merged PRs (30d)
16

Description

Compilers like Haskell support the notion of join points.
Join points are continuations.
See examples like this
```
fun x =
let y () = z
in ... y()
```
where the closure compiles to a jump instruction.
This is useful in reducing duplicated code size in pattern matches
i.e.
```
(case x of
(x::x::y) | a
[x] | a
_ | b
-->
let A () = a
(case x of
(x::x::y) | A ()
[x] | A()
_ | b
```
This issue is just about making manually written join points written at source to compile to jump instructions.
Note that given that cakeml is direct style one would want to inline join points used once.
Another issue can be created for making the pmatch compiler generate join points.
Note that this issue is not talking about supporting haskell style recursive join points.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.