aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDmitry Petrashko <dark@d-d.me>2014-05-06 10:25:59 +0200
committerDmitry Petrashko <dark@d-d.me>2014-05-06 10:25:59 +0200
commitbf9ae99e77f179e9f5ad3c2074edbb5aab0fe9f1 (patch)
tree6e7e2e9f5d21566fd9f74e4861a13e32ef375d3b /src
parenta782adaf302713a1a049b9a72dacc0483ed67229 (diff)
parentb88b79d03517dad973de2aa81c2e5f702d20b2e1 (diff)
downloaddotty-bf9ae99e77f179e9f5ad3c2074edbb5aab0fe9f1.tar.gz
dotty-bf9ae99e77f179e9f5ad3c2074edbb5aab0fe9f1.tar.bz2
dotty-bf9ae99e77f179e9f5ad3c2074edbb5aab0fe9f1.zip
Merge pull request #119 from DarkDimius/leaks
Context escape detection.
Diffstat (limited to 'src')
-rw-r--r--src/dotty/tools/dotc/Bench.scala4
-rw-r--r--src/dotty/tools/dotc/Driver.scala6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/dotty/tools/dotc/Bench.scala b/src/dotty/tools/dotc/Bench.scala
index 13507e1ce..2e0e15e83 100644
--- a/src/dotty/tools/dotc/Bench.scala
+++ b/src/dotty/tools/dotc/Bench.scala
@@ -46,11 +46,11 @@ object Bench extends Driver {
else (args(pos + 1).toInt, (args take pos) ++ (args drop (pos + 2)))
}
- override def process(args: Array[String]): Reporter = {
+ override def process(args: Array[String], rootCtx: Context): Reporter = {
val (numCompilers, args1) = extractNumArg(args, "#compilers")
val (numRuns, args2) = extractNumArg(args1, "#runs")
this.numRuns = numRuns
- ntimes(numCompilers)(super.process(args2))
+ ntimes(numCompilers)(super.process(args2, rootCtx))
}
}
diff --git a/src/dotty/tools/dotc/Driver.scala b/src/dotty/tools/dotc/Driver.scala
index 5bf65544a..d65d7c1d3 100644
--- a/src/dotty/tools/dotc/Driver.scala
+++ b/src/dotty/tools/dotc/Driver.scala
@@ -22,8 +22,8 @@ abstract class Driver extends DotClass {
protected def initCtx = (new ContextBase).initialCtx
- def process(args: Array[String]): Reporter = {
- val summary = CompilerCommand.distill(args)(initCtx)
+ def process(args: Array[String], rootCtx: Context): Reporter = {
+ val summary = CompilerCommand.distill(args)(rootCtx)
implicit val ctx: Context = initCtx.fresh.setSettings(summary.sstate)
val fileNames = CompilerCommand.checkUsage(summary)
try {
@@ -41,7 +41,7 @@ abstract class Driver extends DotClass {
}
def main(args: Array[String]): Unit =
- sys.exit(if (process(args).hasErrors) 1 else 0)
+ sys.exit(if (process(args, initCtx).hasErrors) 1 else 0)
}
class FatalError(msg: String) extends Exception