From 16fad15ff3d255898799cb0bc2281fad27ee3844 Mon Sep 17 00:00:00 2001 From: Jasper Moeys Date: Fri, 2 Oct 2020 11:36:58 +0200 Subject: [PATCH 1/2] update list of compiler phases Generated with GNU sed: ``` scalac -Vphases | tail -n+3 | sed -rn 's|^\s*([a-z]+)\s+[0-9]+\s+([a-z@].+)$|
\1
\n
\2
\n|p' ``` --- _overviews/compiler-options/index.md | 91 +++++++++++++++------------- 1 file changed, 50 insertions(+), 41 deletions(-) diff --git a/_overviews/compiler-options/index.md b/_overviews/compiler-options/index.md index 34c1817b29..68084f4f8e 100644 --- a/_overviews/compiler-options/index.md +++ b/_overviews/compiler-options/index.md @@ -122,67 +122,76 @@ scalacOptions ++= Seq( ### Compilation Phases
-
initial
-
initializing compiler
- -
parse
-
parse source files
+
parser
+
parse source into ASTs, perform simple desugaring
namer
-
create symbols
+
resolve names, attach symbols to named trees
+ +
packageobjects
+
load package objects
+ +
typer
+
the meat and potatoes: type the trees
+ +
superaccessors
+
add super accessors in traits and nested classes
+ +
extmethods
+
add extension methods for inline classes
+ +
pickler
+
serialize symbol tables
-
analyze
-
name and type analysis
+
refchecks
+
reference/override checking, translate nested objects
-
refcheck
-
reference checking
+
patmat
+
translate match expressions
uncurry
-
uncurry function types and applications
+
uncurry, translate function values to anonymous classes
-
lambdalift
-
lambda lifter
+
fields
+
synthesize accessors and fields, add bitmaps for lazy vals
-
typesasvalues
-
represent types as values
+
tailcalls
+
replace tail calls by jumps
-
addaccessors
-
add accessors for constructor arguments
+
specialize
+
@specialized-driven class and method specialization
-
explicitouterclasses
-
make links from inner classes to enclosing one explicit
+
explicitouter
+
this refs to outer pointers
-
addconstructors
-
add explicit constructor for each class
+
erasure
+
erase types, add interfaces for traits
-
tailcall
-
add tail-calls
+
posterasure
+
clean up erased inline classes
-
wholeprog
-
perform whole program analysis
+
lambdalift
+
move nested functions to top level
-
addinterfaces
-
add one interface per class
+
constructors
+
move field definitions into constructors
-
expandmixins
-
expand mixins by code copying
+
flatten
+
eliminate inner classes
-
boxing
-
makes boxing explicit
+
mixin
+
mixin composition
-
erasure
-
type eraser
+
cleanup
+
platform-specific cleanups, generate reflective calls
-
icode
-
generate icode
+
delambdafy
+
remove lambdas
-
codegen
-
enable code generation
+
jvm
+
generate JVM bytecode
terminal
-
compilation terminated
- -
all
-
matches all phases
+
the last phase during a compilation run
From 2c77fff5d69b5f3314f413c76c1e49f2e5000e6b Mon Sep 17 00:00:00 2001 From: Jasper Moeys Date: Fri, 2 Oct 2020 11:57:39 +0200 Subject: [PATCH 2/2] add bash magic as comment --- _overviews/compiler-options/index.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/_overviews/compiler-options/index.md b/_overviews/compiler-options/index.md index 68084f4f8e..c8d367c28f 100644 --- a/_overviews/compiler-options/index.md +++ b/_overviews/compiler-options/index.md @@ -122,6 +122,10 @@ scalacOptions ++= Seq( ### Compilation Phases
+
parser
parse source into ASTs, perform simple desugaring