Skip to content

Local optimisations round two #2647

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Jun 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma

val primitives: Primitives = new Primitives {
val primitives = new DottyPrimitives(ctx)
def getPrimitive(app: Apply, reciever: Type): Int = primitives.getPrimitive(app, reciever)
def getPrimitive(app: Apply, receiver: Type): Int = primitives.getPrimitive(app, receiver)

def getPrimitive(sym: Symbol): Int = primitives.getPrimitive(sym)

Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/Compiler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import core.DenotTransformers.DenotTransformer
import core.Denotations.SingleDenotation

import dotty.tools.backend.jvm.{LabelDefs, GenBCode, CollectSuperCalls}
import dotty.tools.dotc.transform.linker.Simplify
import dotty.tools.dotc.transform.localopt.Simplify

/** The central class of the dotc compiler. The job of a compiler is to create
* runs, which process given `phases` in a given `rootContext`.
Expand Down
4 changes: 3 additions & 1 deletion compiler/src/dotty/tools/dotc/config/ScalaSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ class ScalaSettings extends Settings.SettingGroup {
val YnoInline = BooleanSetting("-Yno-inline", "Suppress inlining.")

/** Linker specific flags */
val optimise = BooleanSetting("-optimise", "Generates faster bytecode by applying optimisations to the program") withAbbreviation "-optimize"
val YoptPhases = PhasesSetting("-Yopt-phases", "Restrict the optimisation phases to execute under -optimise.")
val YoptFuel = IntSetting("-Yopt-fuel", "Maximum number of optimisations performed under -optimise.", -1)
val optimise = BooleanSetting("-optimise", "Generates faster bytecode by applying local optimisations to the .program") withAbbreviation "-optimize"

/** Dottydoc specific settings */
val siteRoot = StringSetting(
Expand Down
1 change: 0 additions & 1 deletion compiler/src/dotty/tools/dotc/core/Definitions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,6 @@ class Definitions {

lazy val SeqType: TypeRef = ctx.requiredClassRef("scala.collection.Seq")
def SeqClass(implicit ctx: Context) = SeqType.symbol.asClass

lazy val Seq_applyR = SeqClass.requiredMethodRef(nme.apply)
def Seq_apply(implicit ctx: Context) = Seq_applyR.symbol
lazy val Seq_headR = SeqClass.requiredMethodRef(nme.head)
Expand Down
3 changes: 2 additions & 1 deletion compiler/src/dotty/tools/dotc/transform/CtxLazy.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package dotty.tools.dotc
package transform

import core.Contexts.Context

/** Utility class for lazy values whose evaluation depends on a context.
Expand All @@ -20,4 +21,4 @@ class CtxLazy[T](expr: Context => T) {
}
myValue
}
}
}
69 changes: 0 additions & 69 deletions compiler/src/dotty/tools/dotc/transform/linker/Analysis.scala

This file was deleted.

Loading