diff options
author | Dmitry Petrashko <dark@d-d.me> | 2015-05-02 18:48:08 +0200 |
---|---|---|
committer | Dmitry Petrashko <dark@d-d.me> | 2015-05-02 18:48:08 +0200 |
commit | ac46a0e4489bba4f76863cc1491bf2b8441ed1cb (patch) | |
tree | 35cb0aa59d10931f6201f1069d70172a43228a86 /src/dotty/tools/dotc/Compiler.scala | |
parent | 2dbabca38cee0ff27c92a9a7079959b2461c9869 (diff) | |
parent | 10a5f9198f03ae5b8dc54f1113f98da585c4e81a (diff) | |
download | dotty-ac46a0e4489bba4f76863cc1491bf2b8441ed1cb.tar.gz dotty-ac46a0e4489bba4f76863cc1491bf2b8441ed1cb.tar.bz2 dotty-ac46a0e4489bba4f76863cc1491bf2b8441ed1cb.zip |
Merge pull request #507 from dotty-staging/add/from-tasty
Compile from Tasty
Diffstat (limited to 'src/dotty/tools/dotc/Compiler.scala')
-rw-r--r-- | src/dotty/tools/dotc/Compiler.scala | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/Compiler.scala b/src/dotty/tools/dotc/Compiler.scala index 2b5748229..44e7ac450 100644 --- a/src/dotty/tools/dotc/Compiler.scala +++ b/src/dotty/tools/dotc/Compiler.scala @@ -8,7 +8,7 @@ import Symbols._ import Scopes._ import typer.{FrontEnd, Typer, Mode, ImportInfo, RefChecks} import reporting.ConsoleReporter -import dotty.tools.dotc.core.Phases.Phase +import Phases.Phase import dotty.tools.dotc.transform._ import dotty.tools.dotc.transform.TreeTransforms.{TreeTransform, TreeTransformer} import dotty.tools.dotc.core.DenotTransformers.DenotTransformer @@ -103,9 +103,13 @@ class Compiler { (start.setRunInfo(new RunInfo(start)) /: defn.RootImports)(addImport) } - def newRun(implicit ctx: Context): Run = { + def reset()(implicit ctx: Context): Unit = { ctx.base.reset() ctx.runInfo.clear() + } + + def newRun(implicit ctx: Context): Run = { + reset() new Run(this)(rootContext) } } |