diff options
author | Sébastien Doeraene <sjrdoeraene@gmail.com> | 2016-02-29 12:48:06 +0100 |
---|---|---|
committer | Sébastien Doeraene <sjrdoeraene@gmail.com> | 2016-03-01 15:47:56 +0100 |
commit | 18505cb2061235dba1b064b9379164e2a48254a6 (patch) | |
tree | a207c35b7610f2ecfa1b3b2d76c8d0041f596fe8 /src/dotty/tools/dotc/Compiler.scala | |
parent | cd4004a82d9713bbb0b120aba83b3ed8fc9f1372 (diff) | |
download | dotty-18505cb2061235dba1b064b9379164e2a48254a6.tar.gz dotty-18505cb2061235dba1b064b9379164e2a48254a6.tar.bz2 dotty-18505cb2061235dba1b064b9379164e2a48254a6.zip |
Store the JSDefinitions in a custom platform SJSPlatform.
This required the ability to instantiate a different `Platform`
depending on settings, which, in turn, required to defer the
initialization of `ContextBase.platform`.
Diffstat (limited to 'src/dotty/tools/dotc/Compiler.scala')
-rw-r--r-- | src/dotty/tools/dotc/Compiler.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/Compiler.scala b/src/dotty/tools/dotc/Compiler.scala index 2a3346486..a4e0998bf 100644 --- a/src/dotty/tools/dotc/Compiler.scala +++ b/src/dotty/tools/dotc/Compiler.scala @@ -102,7 +102,7 @@ class Compiler { * imports For each element of RootImports, an import context */ def rootContext(implicit ctx: Context): Context = { - ctx.definitions.init(ctx) + ctx.initialize()(ctx) val actualPhases = if (ctx.settings.scalajs.value) { phases } else { @@ -123,7 +123,7 @@ class Compiler { .setTyper(new Typer) .setMode(Mode.ImplicitsEnabled) .setTyperState(new MutableTyperState(ctx.typerState, ctx.typerState.reporter, isCommittable = true)) - ctx.definitions.init(start) // set context of definitions to start + ctx.initialize()(start) // re-initialize the base context with start def addImport(ctx: Context, refFn: () => TermRef) = ctx.fresh.setImportInfo(ImportInfo.rootImport(refFn)(ctx)) (start.setRunInfo(new RunInfo(start)) /: defn.RootImportFns)(addImport) |