Skip to content

Commit 58a526f

Browse files
committed
Change -Yemit-tasty to -Yemit-tasty-in-class and invert semantics
1 parent e9a37a1 commit 58a526f

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ class GenBCodePipeline(val entryPoints: List[Symbol], val int: DottyBackendInter
220220
for (binary <- ctx.compilationUnit.pickled.get(claszSymbol.asClass)) {
221221
val store = if (mirrorC ne null) mirrorC else plainC
222222
val tasty =
223-
if (ctx.settings.YemitTasty.value) {
223+
if (!ctx.settings.YemitTastyInClass.value) {
224224
val outTastyFile = getFileForClassfile(outF, store.name, ".tasty")
225225
val outstream = new DataOutputStream(outTastyFile.bufferedOutput)
226226
try outstream.write(binary)

compiler/src/dotty/tools/dotc/config/ScalaSettings.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class ScalaSettings extends Settings.SettingGroup {
8989
val YdebugNames = BooleanSetting("-Ydebug-names", "Show internal representation of names")
9090
val YtermConflict = ChoiceSetting("-Yresolve-term-conflict", "strategy", "Resolve term conflicts", List("package", "object", "error"), "error")
9191
val Ylog = PhasesSetting("-Ylog", "Log operations during")
92-
val YemitTasty = BooleanSetting("-Yemit-tasty", "Generate tasty in separate *.tasty file.", true)
92+
val YemitTastyInClass = BooleanSetting("-Yemit-tasty-in-class", "Generate tasty in the .class file and add an empty *.hasTasty file.")
9393
val YlogClasspath = BooleanSetting("-Ylog-classpath", "Output information about what classpath is being applied.")
9494
val YdisableFlatCpCaching = BooleanSetting("-YdisableFlatCpCaching", "Do not cache flat classpath representation of classpath elements from jars across compiler instances.")
9595

compiler/test/dotty/tools/dotc/CompilationTests.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class CompilationTests extends ParallelTesting {
102102
compileFilesInDir("tests/pos-no-optimise", defaultOptions) +
103103
compileFilesInDir("tests/pos-deep-subtype", allowDeepSubtypes) +
104104
compileFilesInDir("tests/pos-kind-polymorphism", defaultOptions and "-Ykind-polymorphism") +
105-
compileDir("tests/pos/i1137-1", defaultOptions and "-Yemit-tasty") +
105+
compileDir("tests/pos/i1137-1", defaultOptions) +
106106
compileFile(
107107
// succeeds despite -Xfatal-warnings because of -nowarn
108108
"tests/neg-custom-args/fatal-warnings/xfatalWarnings.scala",
@@ -257,7 +257,7 @@ class CompilationTests extends ParallelTesting {
257257
defaultOutputDir + dotty1Group + "/dotty/:" +
258258
// and the other compiler dependecies:
259259
Jars.dottyInterfaces + ":" + Jars.jline,
260-
Array("-Ycheck-reentrant")
260+
Array("-Ycheck-reentrant", "-Yemit-tasty-in-class")
261261
)
262262

263263
val lib =

compiler/test/dotty/tools/dotc/IdempotencyTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class IdempotencyTests extends ParallelTesting {
2828
@Category(Array(classOf[SlowTests]))
2929
@Test def idempotency: Unit = {
3030
implicit val testGroup: TestGroup = TestGroup("idempotency")
31-
val opt = defaultOptions.and("-Yemit-tasty")
31+
val opt = defaultOptions
3232

3333
def sourcesFrom(dir: Path) = CompilationTests.sources(Files.walk(dir))
3434

project/scripts/cmdTests

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ grep -qe "$EXPECTED_OUTPUT" "$tmp"
4747

4848
echo "testing loading tasty from .tasty file in jar"
4949
clear_out "$OUT"
50-
"$SBT" ";dotc -d $OUT/out.jar -Yemit-tasty $SOURCE; dotc -decompile -classpath $OUT/out.jar -color:never $MAIN" > "$tmp"
50+
"$SBT" ";dotc -d $OUT/out.jar $SOURCE; dotc -decompile -classpath $OUT/out.jar -color:never $MAIN" > "$tmp"
5151
grep -qe "def main(args: scala.Array\[scala.Predef.String\]): scala.Unit =" "$tmp"
5252

5353
echo "testing scala.quoted.Expr.run from sbt dotr"

0 commit comments

Comments
 (0)