@@ -23,7 +23,7 @@ class InlineCalls extends MacroTransform { thisPhase =>
2323 class InlineCallsTransformer extends Transformer {
2424 override def transform (tree : Tree )(implicit ctx : Context ): Tree = tree match {
2525 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))
2727 case _ : MemberDef =>
2828 val newTree = super .transform(tree)
2929 newTree.symbol.defTree = newTree // update tree set in PostTyper or set for inlined members
@@ -33,24 +33,6 @@ class InlineCalls extends MacroTransform { thisPhase =>
3333 }
3434 }
3535
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- }
5436}
5537
5638object InlineCalls {
0 commit comments