5 ms·
FWIW, SBCL does exactly that. You can defun a function and disassemble it right down to assembly. What this project does is slightly different which is to use L
by shortsightedsid 12y ago
FWIW, SBCL does exactly that. You can defun a function and disassemble it right down to assembly. What this project does is slightly different which is to use LLVM to achieve the same thing.
- sqrt17 12y agoTo use LLVM to achieve the same thing would be to find a way to bootstrap SBCL through LLVM, which would, again, be very cool.
- _delirium 12y agoThere are occasional discussions on sbcl-devel about it, but I'm not aware of anyone committing serious resources to it (it's not really a weekend-project, or even single-GSoC-student, amount of work). There is also some skepticism about whether it's worth doing at all, because of worries that it will be difficult to get good GC performance out of LLVM: http://marc.info/?l=sbcl-devel&m=136219729420475&w=2 http://marc.info/?l=sbcl-devel&m=136219729420475&w=2 (Reference [1] in that email points to: https://github.com/elliottslaughter/rust-gc-notes https://github.com/elliottslaughter/rust-gc-notes, which documents difficulties trying to build a precise GC for Rust on top of LLVM.)
- hga 12y agoSimply doing a correct precise GC with LLVM is still a work in progress: http://www.philipreames.com/Blog/ http://www.philipreames.com/Blog/
- _delirium 12y agoTaking GC seriously in the design of a low-level compiler-target language was one of the aspects that I found very interesting about the C-- project of Simon Peyton Jones & Norman Ramsey. But it unfortunately didn't get anywhere near the same backing/momentum as LLVM, and now seems defunct.
- hga 12y agoIndeed, and I found the whole concept to be excellent. Unfortunately, as far as I can tell, it's defunct outside of its use in the GHC. E.g. the Quick C-- compiler was recently archived here https://github.com/nrnrnr/qc-- https://github.com/nrnrnr/qc--
- charlieflowers 12y agoYeah I realize that, but good point. LLVM is very interesting to me, but you're right that it's not as utterly low level as native assembly. It is the most interesting assembly ("assembly-like"?) language to me at this time. I didn't know SBCL did that. Cool.
- enupten 12y agoAll CL's have a #'disassemble, although the output of it is left undefined.
- dedward 12y agoFYI - that disassemble feature is part of the CL spec - it's not unique to SBCL. http://www.lispworks.com/documentation/HyperSpec/Body/f_disass.htm#disassemble http://www.lispworks.com/documentation/HyperSpec/Body/f_disa...
- dedward 12y agoFYI - that disassemble feature is part of the CL spec - it's not unique to SBCL. http://www.lispworks.com/documentation/HyperSpec/Body/f_disass.htm#disassemble http://www.lispworks.com/documentation/HyperSpec/Body/f_disa...