@@ -23,7 +23,7 @@ class InlineCalls extends MacroTransform { thisPhase =>
23
23
class InlineCallsTransformer extends Transformer {
24
24
override def transform (tree : Tree )(implicit ctx : Context ): Tree = tree match {
25
25
case _ : RefTree | _ : GenericApply [_] if Inliner .isInlineable(tree) && ! ctx.reporter.hasErrors =>
26
- normalize( transform(Inliner .inlineCall(tree, tree.tpe.widen) ))
26
+ transform(Inliner .inlineCall(tree, tree.tpe.widen))
27
27
case _ : MemberDef =>
28
28
val newTree = super .transform(tree)
29
29
newTree.symbol.defTree = newTree // update tree set in PostTyper or set for inlined members
@@ -33,24 +33,6 @@ class InlineCalls extends MacroTransform { thisPhase =>
33
33
}
34
34
}
35
35
36
- def normalize (tree : Tree )(implicit ctx : Context ): Tree = tree match {
37
- case Inlined (call, bindings, expansion) if ! call.isEmpty =>
38
- // TODO: Normalize when Inlined is created. We never use the full call, we always collapse it first.
39
- // Leave only a call trace consisting of
40
- // - a reference to the top-level class from which the call was inlined,
41
- // - the call's position
42
- // in the call field of an Inlined node.
43
- // The trace has enough info to completely reconstruct positions.
44
- // The minimization is done for two reasons:
45
- // 1. To save space (calls might contain large inline arguments, which would otherwise
46
- // be duplicated
47
- // 2. To enable correct pickling (calls can share symbols with the inlined code, which
48
- // would trigger an assertion when pickling).
49
- val callTrace = Ident (call.symbol.topLevelClass.typeRef).withPos(call.pos)
50
- cpy.Inlined (tree)(callTrace, bindings, expansion)
51
- case _ =>
52
- tree
53
- }
54
36
}
55
37
56
38
object InlineCalls {
0 commit comments