aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/Compiler.scala
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2015-07-04 18:10:59 +0200
committerGuillaume Martres <smarter@ubuntu.com>2015-07-07 21:44:46 +0200
commit3bf22d31148ab077d34fa0a94b3f9e926719e81b (patch)
tree461c86d50f034de48f132a0a3a4a7a89ef716c15 /src/dotty/tools/dotc/Compiler.scala
parent58e2c9b429dc53a865fdcfd60459966513110058 (diff)
downloaddotty-3bf22d31148ab077d34fa0a94b3f9e926719e81b.tar.gz
dotty-3bf22d31148ab077d34fa0a94b3f9e926719e81b.tar.bz2
dotty-3bf22d31148ab077d34fa0a94b3f9e926719e81b.zip
Move the inlining of value class methods before Erasure
VCInline is split into two phases: - VCInlineMethods (before Erasure) replaces value class method calls by calls to extension methods - VCElideAllocations (after Erasure) handles == and optimizing the unboxing of a boxed value class, as VCInline did before. This should not affect anything currently, but in the future we will have phases before Erasure that mangle names (like TypeSpecializer, see #630), being able to put these phases after VCInlineMethods means that VCInlineMethods does not need to know anything about how these phases mangle names, this reduces the coupling between phases. The trade-off is that VCInlineMethods needs to deal with type parameters and multiple parameter lists whereas VCInline didn't.
Diffstat (limited to 'src/dotty/tools/dotc/Compiler.scala')
-rw-r--r--src/dotty/tools/dotc/Compiler.scala5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/Compiler.scala b/src/dotty/tools/dotc/Compiler.scala
index 827134e84..75b790861 100644
--- a/src/dotty/tools/dotc/Compiler.scala
+++ b/src/dotty/tools/dotc/Compiler.scala
@@ -52,7 +52,8 @@ class Compiler {
List(new PatternMatcher,
new ExplicitOuter,
new Splitter),
- List(new SeqLiterals,
+ List(new VCInlineMethods,
+ new SeqLiterals,
new InterceptedMethods,
new Literalize,
new Getters,
@@ -62,7 +63,7 @@ class Compiler {
new ResolveSuper),
List(new Erasure),
List(new ElimErasedValueType,
- new VCInline,
+ new VCElideAllocations,
new Mixin,
new LazyVals,
new Memoize,