CakeML / CakeML/cakeml

Platform for unverified assembly-level experiments

Open
#798 1 comment 0 reactions 0 assignees View on GitHub
dev experience enhancement good first issue high reward user experience
Dominant language
Standard ML
Stars
1.2k
Forks
104
Avg merge
2d 21h
Merged PRs (30d)
16

Description

We would like to be able to modify IRs at various levels to simulate the effects of a compiler change. In most cases the plumbing for this would be very difficult, but labLang is nearly identical in scope to a traditional assembly language and it would be possible to dump labLang as _editable_ assembly in arch-specific syntax.

Have a theory that the garbage collector is slow because it copies one word at a time? Make some changes in _Gc and see what happens.

Want to do rough call-stack profiling, but debug information isn't even on the roadmap yet? Calls and returns are easy to pattern match at this point, the dumper could have a feature to maintain a C-compatible shadow stack.

Want to recognize allocation sites and add a tracepoint? Also doable.

My initial plan is an unverified SML program which parses `--explore` output and translates the labLang JSON dump into assembly syntax, initially x64 only but with allowance for other targets, probably also with a hook in compilationLib. There's an argument to be made for better integration with the bootstrapped compiler but I don't want to pay the size and bootstrapping time cost there.

Since this is duplicating encoder logic there's some potential to get out of sync with the encoder used for normal compilation. Hopefully won't be an issue.

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.