diff options
author | Martin Odersky <odersky@gmail.com> | 2013-03-11 19:08:31 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-03-11 19:08:31 +0100 |
commit | 66f45ed0c1708f976346e008e1d685013c6664af (patch) | |
tree | 5a5eb28d264605acb3dd84b2b693d3b051ceafe4 /src/dotty/tools/dotc/core/Contexts.scala | |
parent | 995946ac9a406b018a8d62291e1f69466b962086 (diff) | |
download | dotty-66f45ed0c1708f976346e008e1d685013c6664af.tar.gz dotty-66f45ed0c1708f976346e008e1d685013c6664af.tar.bz2 dotty-66f45ed0c1708f976346e008e1d685013c6664af.zip |
First steps to make compiler start work.
Still fighting with CyclicReference errors.
Diffstat (limited to 'src/dotty/tools/dotc/core/Contexts.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Contexts.scala | 13 |
1 files changed, 10 insertions, 3 deletions
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) |