diff options
author | Martin Odersky <odersky@gmail.com> | 2016-09-10 12:15:11 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-10-02 16:11:21 +0200 |
commit | 6bf7768e4e2e604f93f27efacf28d076d97ac951 (patch) | |
tree | 9ec884f01ceca96ccab2525dbcafa361c7a46bfd /src/dotty/tools/dotc/core/tasty | |
parent | d1b933cac3380edcade3891aec6ed731744b2e13 (diff) | |
download | dotty-6bf7768e4e2e604f93f27efacf28d076d97ac951.tar.gz dotty-6bf7768e4e2e604f93f27efacf28d076d97ac951.tar.bz2 dotty-6bf7768e4e2e604f93f27efacf28d076d97ac951.zip |
Refactoring for registering InlineInfo
Now it's done on the symbol directly rather than its inline
annotation. This simplifies client code and keeps the implementaion how
inline infos should be assocated with inline methods open.
Diffstat (limited to 'src/dotty/tools/dotc/core/tasty')
-rw-r--r-- | src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala b/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala index 142aeb7dc..b148cced5 100644 --- a/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala +++ b/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala @@ -488,11 +488,9 @@ class TreeUnpickler(reader: TastyReader, tastyName: TastyName.Table, posUnpickle sym.completer.withDecls(newScope) forkAt(templateStart).indexTemplateParams()(localContext(sym)) } - else (annots.find(_.symbol == defn.InlineAnnot)) match { - case Some(inlineAnnot) => - val inlineCtx = localContext(sym).addMode(Mode.ReadPositions) - Inliner.attachInlineInfo(inlineAnnot, implicit ctx => forkAt(rhsStart).readTerm())(inlineCtx) - case none => + else if (annots.exists(_.symbol == defn.InlineAnnot)) { + val inlineCtx = localContext(sym).addMode(Mode.ReadPositions) + Inliner.registerInlineInfo(sym, implicit ctx => forkAt(rhsStart).readTerm())(inlineCtx) } goto(start) sym |