From abc8f5e1c382b1ead761976227878c4c38ebfbf5 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 1 Feb 2013 17:52:00 +0100 Subject: Added config package with settings, platform. --- src/dotty/tools/dotc/core/Contexts.scala | 14 +++++++++++--- 1 file changed, 11 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 e2fe9822f..d7c8609f1 100644 --- a/src/dotty/tools/dotc/core/Contexts.scala +++ b/src/dotty/tools/dotc/core/Contexts.scala @@ -10,6 +10,7 @@ import Symbols._ import TypeComparers._, Printers._, NameOps._, SymDenotations._ import collection.mutable import collection.immutable.BitSet +import config.{Settings, Platform} object Contexts { @@ -53,12 +54,16 @@ object Contexts { protected def owner_=(owner: Symbol) = _owner = owner def owner: Symbol = _owner + private[this] var _settings: Settings = _ + protected def settings_=(settings: Settings) = _settings = settings + def settings: Settings = _settings + def phase: Phase = ??? // phase(period.phaseId) def enclClass: Context = ??? def erasedTypes: Boolean = ??? def debug: Boolean = ??? -// def settings: Settings = ??? def warning(msg: String) = ??? + def inform(msg: String) = ??? def fresh: FreshContext = { val newctx = super.clone.asInstanceOf[FreshContext] @@ -90,8 +95,7 @@ object Contexts { } class ContextBase extends Transformers.TransformerBase - with Printers.PrinterBase - with NameOps.NameOpsBase { + with Printers.PrinterBase { val initialCtx: Context = new InitialContext(this) @@ -99,6 +103,10 @@ object Contexts { lazy val definitions = new Definitions()(initialCtx) + lazy val loaders = new SymbolLoaders + + lazy val platform: Platform = ??? + // Symbols state /** A map from a superclass id to the class that has it */ private[core] var classOfId = new Array[ClassSymbol](InitialSuperIdsSize) -- cgit v1.2.3