Skip to content

Commit

Permalink
Adjust compiler pass diagram
Browse files Browse the repository at this point in the history
Adjust align of boxes and show legend to upper right corner.
  • Loading branch information
hirotnk committed May 10, 2020
1 parent 607bcdb commit 18c924d
Showing 1 changed file with 104 additions and 108 deletions.
212 changes: 104 additions & 108 deletions chapters/compiler.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -63,114 +63,110 @@ xref:fig_compiler_passes[].
.Compiler Passes
[ditaa]
----
[] ⇒ Compiler options
() ⇒ files
{} ⇒ erlang terms
boxes ⇒ passes
(.erl)
|
v
+---------------+
| Scanner |
| (Part of epp) |
+---------------+
|
v
+---------------+
| Pre processor |
| epp |
+---------------+
|
v
+---------------+ +---------------+
| Parse | --> | user defined |
| Transform | <-- | transformation|
+---------------+ +---------------+
|
+---------> (.Pbeam) [makedep]
+---------> {dep} [makedep, binary]
|
+---------> (.pp) [dpp]
+---------> {AST} [dpp, binary]
|
v
+---------------+
| Linter |
| |
+---------------+
|
+---------> (.P) ['P']
+---------> {AST} ['P',binary]
|
v
+---------------+
| Save AST |
| |
+---------------+
|
v
+---------------+
| Expand |
| |
+---------------+
|
+---------> (.E) ['E']
+---------> {.E} ['E', binary]
|
v
+---------------+
| Core |
| Erlang |
+---------------+
|
+---------> (.core) [dcore|to_core0]
+---------> {core} [to_core0,binary]
|
v
+---------------+ +---------------+ +---------------+
| Core | ... | Core | ... | Core |
| Pass 0 | | Pass 1 | | Pass N |
+---------------+ +---------------+ +---------------+
|
+---------> (.core) [to_core]
+---------> {core} [to_core,binary]
|
v
+---------------+
| Kernel |
| Erlang |
+---------------+
|
v
+---------------+ +---------------+ +---------------+
| Kernal | ... | Kernal | ... | Kernal |
| Pass 0 | | Pass 1 | | Pass N |
+---------------+ +---------------+ +---------------+
|
v
+---------------+
| BEAM Code |
| |
+---------------+
|
v
+---------------+ +---------------+ +---------------+
| ASM | ... | ASM | ... | ASM |
| Pass 0 | | Pass 1 | | Pass N |
+---------------+ +---------------+ +---------------+
|
+---------> (.S) ['S']
+---------> {.S} ['S', binary]
|
v
+---------------+
| Native Code |
| |
+---------------+
|
v
(.beam)
(.erl) [] ⇒ Compiler options
| () ⇒ files
v {} ⇒ erlang terms
+---------------+ boxes ⇒ passes
| Scanner |
| (Part of epp) |
+---------------+
|
v
+---------------+
| Pre processor |
| epp |
+---------------+
|
v
+---------------+ +---------------+
| Parse | --> | user defined |
| Transform | <-- | transformation|
+---------------+ +---------------+
|
+---------> (.Pbeam) [makedep]
+---------> {dep} [makedep, binary]
|
+---------> (.pp) [dpp]
+---------> {AST} [dpp, binary]
|
v
+---------------+
| Linter |
| |
+---------------+
|
+---------> (.P) ['P']
+---------> {AST} ['P',binary]
|
v
+---------------+
| Save AST |
| |
+---------------+
|
v
+---------------+
| Expand |
| |
+---------------+
|
+---------> (.E) ['E']
+---------> {.E} ['E', binary]
|
v
+---------------+
| Core |
| Erlang |
+---------------+
|
+---------> (.core) [dcore|to_core0]
+---------> {core} [to_core0,binary]
|
v
+---------------+ +---------------+ +---------------+
| Core | ... | Core | ... | Core |
| Pass 0 | | Pass 1 | | Pass N |
+---------------+ +---------------+ +---------------+
|
+---------> (.core) [to_core]
+---------> {core} [to_core,binary]
|
v
+---------------+
| Kernel |
| Erlang |
+---------------+
|
v
+---------------+ +---------------+ +---------------+
| Kernal | ... | Kernal | ... | Kernal |
| Pass 0 | | Pass 1 | | Pass N |
+---------------+ +---------------+ +---------------+
|
v
+---------------+
| BEAM Code |
| |
+---------------+
|
v
+---------------+ +---------------+ +---------------+
| ASM | ... | ASM | ... | ASM |
| Pass 0 | | Pass 1 | | Pass N |
+---------------+ +---------------+ +---------------+
|
+---------> (.S) ['S']
+---------> {.S} ['S', binary]
|
v
+---------------+
| Native Code |
| |
+---------------+
|
v
(.beam)
----

If you want to see a complete and up to date list of compiler passes
Expand Down

0 comments on commit 18c924d

Please sign in to comment.