3 ms·
If they're not curious, then I am :)
by pdexter 10y ago
If they're not curious, then I am :)
- strmpnk 10y agoI'll try to compile some references on a page but I gave this talk last year for an Elixir conference: https://www.youtube.com/watch?v=_HQfS8efVeg https://www.youtube.com/watch?v=_HQfS8efVeg (It's not the best talk I've delivered on the topic but it's a start. I tried to cram too much into my timeslot.) Robert Virding also has some great talks but I can't find the specific one where he discusses some of the lesser known compilation steps. At the end of the day, I learned the most from reading Erlang source code though. There's a lot to see in the Core Erlang compilation code: https://github.com/erlang/otp/tree/maint/lib/compiler/src https://github.com/erlang/otp/tree/maint/lib/compiler/src As to answer some questions elsewhere in this discussion on why BEAM code isn't targeted directly, it is poorly documented but you also lose out on a lot of these optimizations which happen at the Core Erlang stage. These are all things you'll have to reinvent. There is debate on whether Core Erlang is a better target than Erlang but I'll skip that debate for now. Some languages, like Elixir target Erlang AST structures rather than Core Erlang while others (LFE) target Core Erlang.