From 66f45ed0c1708f976346e008e1d685013c6664af Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 11 Mar 2013 19:08:31 +0100 Subject: First steps to make compiler start work. Still fighting with CyclicReference errors. --- src/dotty/tools/dotc/core/Contexts.scala | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/dotty/tools/dotc/core/Contexts.scala') diff --git a/src/dotty/tools/dotc/core/Contexts.scala b/src/dotty/tools/dotc/core/Contexts.scala index d33c93a3a..4b730a4aa 100644 --- a/src/dotty/tools/dotc/core/Contexts.scala +++ b/src/dotty/tools/dotc/core/Contexts.scala @@ -221,7 +221,7 @@ object Contexts { */ private class InitialContext(val base: ContextBase, settings: SettingGroup) extends FreshContext { outer = NoContext - period = Nowhere + period = InitialPeriod constraints = Map() position = NoPosition plainPrinter = new PlainPrinter(_) @@ -249,7 +249,11 @@ object Contexts { val settings = new ScalaSettings /** The initial context */ - val initialCtx: Context = new InitialContext(this, settings) + val initialCtx: Context = + new InitialContext(this, settings) + .withSetting(settings.verbose, true) // !!! for now + .withSetting(settings.debug, true) + .withSetting(settings.Ylogcp, true) /** The symbol loaders */ val loaders = new SymbolLoaders @@ -258,7 +262,10 @@ object Contexts { val platform: Platform = new JavaPlatform /** The loader that loads the members of _root_ */ - def rootLoader(implicit ctx: Context): SymbolLoader = platform.rootLoader + def rootLoader(root: TermSymbol)(implicit ctx: Context): SymbolLoader = platform.rootLoader(root) + + NoPhase // initialize some phases + SomePhase // TODO: Is there a cleaner way to do this? /** The standard definitions */ val definitions = new Definitions()(initialCtx) -- cgit v1.2.3