Skip to content

Commit ccfd92d

Browse files
committed
Merge remote-tracking branch 'dotty/master' into call-graph-wip-1
2 parents a0c5350 + 99a314f commit ccfd92d

File tree

274 files changed

+4215
-857
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

274 files changed

+4215
-857
lines changed

.drone.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,24 @@ pipeline:
2222
commands:
2323
- ./project/scripts/sbt ";clean ;publishLocal" "${CI_PUBLISH}"
2424
- ./project/scripts/sbt "sbt-dotty/scripted source-dependencies/*" "${CI_PUBLISH}"
25-
- ./project/scripts/sbtPublish ${CI_PUBLISH} $SONATYPE_USER $SONATYPE_PW $PGP_PW
25+
- NIGHTLYBUILD="yes" ./project/scripts/sbtPublish ${CI_PUBLISH} $SONATYPE_USER $SONATYPE_PW $PGP_PW
2626
volumes:
2727
- /home/drone/keys:/keys
2828
when:
2929
event: deployment
3030
environment: nightly
3131

32+
publish_release:
33+
image: lampepfl/dotty:24-04-2017
34+
pull: true
35+
commands:
36+
- RELEASEBUILD="yes" ./project/scripts/sbtPublish ${CI_PUBLISH} $SONATYPE_USER $SONATYPE_PW $PGP_PW
37+
volumes:
38+
- /home/drone/keys:/keys
39+
when:
40+
event: deployment
41+
environment: release
42+
3243
documentation:
3344
image: lampepfl/dotty:24-04-2017
3445
pull: true

.drone.yml.sig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
eyJhbGciOiJIUzI1NiJ9.IyBBZnRlciB1cGRhdGluZyB0aGlzIGZpbGUsIHlvdSBuZWVkIHRvIHJlLXNpZ24gaXQ6CiMKIyAtIEluc3RhbGwgW2Ryb25lLWNsaV0oaHR0cDovL3JlYWRtZS5kcm9uZS5pby91c2FnZS9nZXR0aW5nLXN0YXJ0ZWQtY2xpLykKIyAtIENvcHkgeW91ciB0b2tlbiBmcm9tICBodHRwOi8vZG90dHktY2kuZXBmbC5jaC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cnRlci8qO3NidC1kb3R0eS9zY3JpcHRlZCBkaXNjb3ZlcnkvKjtzYnQtZG90dHkvc2NyaXB0ZWQgc2J0LWRvdHR5LyoKICAgICAgQ0lfUFVCTElTSDogZmFsc2UKICAgIC0gQ0lfVEVTVDogZG90dHktYm9vdHN0cmFwcGVkL3Rlc3QKICAgICAgQ0lfUFVCTElTSDogZmFsc2UK.7RkUdpZM6WNINpEX2-CJuDCD5Gd_EIzMDWe8R9YLO0s

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
*.DS_Store
22
*.class
3+
*.tasty
4+
*.hasTasty
35
*.log
46
*.swp
57
*~

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
Dotty
22
=====
33
[![Build Status](http://dotty-ci.epfl.ch/api/badges/lampepfl/dotty/status.svg)](http://dotty-ci.epfl.ch/lampepfl/dotty)
4-
[![Community Build Status](https://travis-ci.org/lampepfl/dotty-community-build.svg?branch=master)](https://travis-ci.org/lampepfl/dotty-community-build)
54
[![Join the chat at https://gitter.im/lampepfl/dotty](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/lampepfl/dotty?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
65

6+
Community build: [![Community Build Status](https://travis-ci.org/lampepfl/dotty-community-build.svg?branch=master)](https://travis-ci.org/lampepfl/dotty-community-build)
7+
78
* [Homepage](http://dotty.epfl.ch)
89
* [Documentation](http://dotty.epfl.ch/docs)
910
* [FAQ](http://dotty.epfl.ch/#why-dotty)

build.sbt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ val `scala-compiler` = Build.`scala-compiler`
1919
val `scala-reflect` = Build.`scala-reflect`
2020
val scalap = Build.scalap
2121
val dist = Build.dist
22+
val `dist-bootstrapped` = Build.`dist-bootstrapped`
2223

2324
val `sbt-dotty` = Build.`sbt-dotty`
2425
val `vscode-dotty` = Build.`vscode-dotty`

compiler/src/dotty/tools/backend/jvm/GenBCode.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,16 +206,16 @@ class GenBCodePipeline(val entryPoints: List[Symbol], val int: DottyBackendInter
206206
val dataAttr = new CustomAttr(nme.TASTYATTR.mangledString, binary)
207207
val store = if (mirrorC ne null) mirrorC else plainC
208208
store.visitAttribute(dataAttr)
209-
val outTastyFile = getFileForClassfile(outF, store.name, ".tasty")
210209
if (ctx.settings.emitTasty.value) {
210+
val outTastyFile = getFileForClassfile(outF, store.name, ".tasty")
211211
val outstream = new DataOutputStream(outTastyFile.bufferedOutput)
212212

213213
try outstream.write(binary)
214214
finally outstream.close()
215-
} else if (!outTastyFile.isVirtual) {
215+
} else {
216216
// Create an empty file to signal that a tasty section exist in the corresponding .class
217217
// This is much cheaper and simpler to check than doing classfile parsing
218-
outTastyFile.create()
218+
getFileForClassfile(outF, store.name, ".hasTasty")
219219
}
220220
}
221221

compiler/src/dotty/tools/backend/jvm/LabelDefs.scala

Lines changed: 14 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,11 @@ import StdNames.nme
7575
* Unreachable jumps will be eliminated by local dead code analysis.
7676
* After JVM is smart enough to remove next-line jumps
7777
*
78-
* Note that Label DefDefs can be only nested in Block, otherwise no one would
79-
* be able to call them Other DefDefs are eliminated
78+
* Note that his phase Ychecking this phase required softening scoping rules
79+
* as it intentionally allowed to break scoping rules inside methods for labels.
80+
* This is modified by setting `labelsReordered` flag in Phases.
81+
*
82+
* @author Dmitry Petrashko
8083
*/
8184
class LabelDefs extends MiniPhaseTransform {
8285
def phaseName: String = "labelDef"
@@ -90,76 +93,24 @@ class LabelDefs extends MiniPhaseTransform {
9093
else {
9194
collectLabelDefs.clear
9295
val newRhs = collectLabelDefs.transform(tree.rhs)
93-
val labelCalls = collectLabelDefs.labelCalls
94-
var entryPoints = collectLabelDefs.parentLabelCalls
9596
var labelDefs = collectLabelDefs.labelDefs
96-
var callCounts = collectLabelDefs.callCounts
97-
98-
// make sure that for every label there's a single location it should return and single entry point
99-
// if theres already a location that it returns to that's a failure
100-
val disallowed = new mutable.HashMap[Symbol, Tree]()
101-
queue.sizeHint(labelCalls.size + entryPoints.size)
10297

10398
def putLabelDefsNearCallees = new TreeMap() {
10499

105100
override def transform(tree: tpd.Tree)(implicit ctx: Context): tpd.Tree = {
106101
tree match {
107-
case t: Apply if (entryPoints.contains(t)) =>
108-
entryPoints = entryPoints - t
109-
labelLevel = labelLevel + 1
110-
val r = Block(moveLabels(t), t)
111-
labelLevel = labelLevel - 1
112-
if (labelLevel == 0) beingAppended.clear()
113-
r
114-
case _ => if (entryPoints.nonEmpty && labelDefs.nonEmpty) super.transform(tree) else tree
115-
}
102+
case t: Apply if labelDefs.contains(t.symbol) =>
103+
val labelDef = labelDefs(t.symbol)
104+
labelDefs -= t.symbol
116105

117-
}
118-
}
106+
val labelDef2 = transform(labelDef)
107+
Block(labelDef2:: Nil, t)
119108

120-
def moveLabels(entryPoint: Apply): List[Tree] = {
121-
val entrySym = entryPoint.symbol
122-
if ((entrySym is Flags.Label) && labelDefs.contains(entrySym)) {
123-
val visitedNow = new mutable.HashMap[Symbol, Tree]()
124-
val treesToAppend = new ArrayBuffer[Tree]() // order matters. parents should go first
125-
treesToAppend += labelDefs(entrySym)
126-
queue.clear()
127-
128-
var visited = 0
129-
queue += entryPoint
130-
while (visited < queue.size) {
131-
val owningLabelDefSym = queue(visited).symbol
132-
for (call <- labelCalls(owningLabelDefSym)) {
133-
val callSym = call.symbol
134-
if (!beingAppended.contains(callSym)) {
135-
if (disallowed.contains(callSym)) {
136-
val oldCall = disallowed(callSym)
137-
ctx.error(s"Multiple return locations for Label $oldCall and $call", callSym.pos)
138-
} else {
139-
if ((!visitedNow.contains(callSym)) && labelDefs.contains(callSym)) {
140-
val defTree = labelDefs(callSym)
141-
visitedNow.put(callSym, defTree)
142-
val callCount = callCounts(callSym)
143-
if (callCount > 1) {
144-
if (!treesToAppend.contains(defTree)) {
145-
treesToAppend += defTree
146-
queue += call
147-
148-
}
149-
} else if (entryPoint.symbol ne callSym) entryPoints += call
150-
}
151-
}
152-
}
153-
}
154-
155-
visited += 1
109+
case _ => if (labelDefs.nonEmpty) super.transform(tree) else tree
156110
}
157-
beingAppended ++= treesToAppend.map(_.symbol)
158-
treesToAppend.toList.map(putLabelDefsNearCallees.transform)
159-
} else Nil
111+
}
160112
}
161113

162-
163114
val res = cpy.DefDef(tree)(rhs = putLabelDefsNearCallees.transform(newRhs))
164115

165116
res
@@ -168,22 +119,11 @@ class LabelDefs extends MiniPhaseTransform {
168119

169120
object collectLabelDefs extends TreeMap() {
170121

171-
// label calls from this DefDef
172-
var parentLabelCalls: mutable.Set[Tree] = new mutable.HashSet[Tree]()
173-
var callCounts: mutable.Map[Symbol, Int] = new mutable.HashMap[Symbol, Int]().withDefaultValue(0)
174-
175-
def shouldMoveLabel = true
176-
177122
// labelSymbol -> Defining tree
178123
val labelDefs = new mutable.HashMap[Symbol, Tree]()
179-
// owner -> all calls by this owner
180-
val labelCalls = new mutable.HashMap[Symbol, mutable.Set[Tree]]()
181-
var owner: Symbol = null
182124

183125
def clear = {
184-
parentLabelCalls.clear()
185126
labelDefs.clear()
186-
labelCalls.clear()
187127
}
188128

189129
override def transform(tree: tpd.Tree)(implicit ctx: Context): tpd.Tree = tree match {
@@ -196,30 +136,14 @@ class LabelDefs extends MiniPhaseTransform {
196136
}
197137
case t: DefDef =>
198138
assert(t.symbol is Flags.Label)
199-
200-
val st = parentLabelCalls
201-
parentLabelCalls = new mutable.HashSet[Tree]()
202-
val symt = owner
203-
owner = t.symbol
204-
205139
val r = super.transform(tree)
206-
207-
owner = symt
208-
labelCalls(r.symbol) = parentLabelCalls
209-
parentLabelCalls = st
210-
211-
if (shouldMoveLabel) {
212-
labelDefs(r.symbol) = r
213-
EmptyTree
214-
} else r
140+
labelDefs(r.symbol) = r
141+
EmptyTree
215142
case t: Apply if t.symbol is Flags.Label =>
216143
val sym = t.symbol
217-
parentLabelCalls = parentLabelCalls + t
218-
if (owner != sym) callCounts(sym) = callCounts(sym) + 1
219144
super.transform(tree)
220145
case _ =>
221146
super.transform(tree)
222-
223147
}
224148
}
225149
}

compiler/src/dotty/tools/dotc/Compiler.scala

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import core.DenotTransformers.DenotTransformer
1818
import core.Denotations.SingleDenotation
1919

2020
import dotty.tools.backend.jvm.{LabelDefs, GenBCode, CollectSuperCalls}
21+
import dotty.tools.dotc.transform.linker.Simplify
2122

2223
/** The central class of the dotc compiler. The job of a compiler is to create
2324
* runs, which process given `phases` in a given `rootContext`.
@@ -80,7 +81,9 @@ class Compiler {
8081
new ElimByName, // Expand by-name parameter references
8182
new AugmentScala2Traits, // Expand traits defined in Scala 2.11 to simulate old-style rewritings
8283
new ResolveSuper, // Implement super accessors and add forwarders to trait methods
84+
new Simplify, // Perform local optimizations, simplified versions of what linker does.
8385
new PrimitiveForwarders, // Add forwarders to trait methods that have a mismatch between generic and primitives
86+
new FunctionXXLForwarders, // Add forwarders for FunctionXXL apply method
8487
new ArrayConstructors), // Intercept creation of (non-generic) arrays and intrinsify.
8588
List(new Erasure), // Rewrite types to JVM model, erasing all type parameters, abstract types and refinements.
8689
List(new ElimErasedValueType, // Expand erased value types to their underlying implementation types
@@ -92,17 +95,19 @@ class Compiler {
9295
new NonLocalReturns, // Expand non-local returns
9396
new CapturedVars, // Represent vars captured by closures as heap objects
9497
new Constructors, // Collect initialization code in primary constructors
95-
// Note: constructors changes decls in transformTemplate, no InfoTransformers should be added after it
98+
// Note: constructors changes decls in transformTemplate, no InfoTransformers should be added after it
9699
new FunctionalInterfaces, // Rewrites closures to implement @specialized types of Functions.
97100
new GetClass, // Rewrites getClass calls on primitive types.
98101
new CallGraphChecks,
99-
new DeadCodeElimination), // Replaces dead code by a `throw new DeadCodeEliminated`
102+
new DeadCodeElimination, // Replaces dead code by a `throw new DeadCodeEliminated`
103+
new Simplify), // Perform local optimizations, simplified versions of what linker does.
100104
List(new LambdaLift, // Lifts out nested functions to class scope, storing free variables in environments
101105
// Note: in this mini-phase block scopes are incorrect. No phases that rely on scopes should be here
102106
new ElimStaticThis, // Replace `this` references to static objects by global identifiers
103107
new Flatten, // Lift all inner classes to package scope
104108
new RestoreScopes), // Repair scopes rendered invalid by moving definitions in prior phases of the group
105-
List(new MoveStatics, // Move static methods to companion classes
109+
List(new TransformWildcards, // Replace wildcards with default values
110+
new MoveStatics, // Move static methods to companion classes
106111
new ExpandPrivate, // Widen private definitions accessed from nested classes
107112
new SelectStatic, // get rid of selects that would be compiled into GetStatic
108113
new CollectEntryPoints, // Find classes with main methods

0 commit comments

Comments
 (0)