Skip to content

Commit a645566

Browse files
committed
Change -Yemit-tasty to -Yemit-tasty-in-class and invert semantics
1 parent 374aa8b commit a645566

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
@@ -216,7 +216,7 @@ class GenBCodePipeline(val entryPoints: List[Symbol], val int: DottyBackendInter
216216
for (binary <- ctx.compilationUnit.pickled.get(claszSymbol.asClass)) {
217217
val store = if (mirrorC ne null) mirrorC else plainC
218218
val tasty =
219-
if (ctx.settings.YemitTasty.value) {
219+
if (!ctx.settings.YemitTastyInClass.value) {
220220
val outTastyFile = getFileForClassfile(outF, store.name, ".tasty")
221221
val outstream = new DataOutputStream(outTastyFile.bufferedOutput)
222222
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
@@ -90,7 +90,7 @@ class ScalaSettings extends Settings.SettingGroup {
9090
val YdebugNames = BooleanSetting("-Ydebug-names", "Show internal representation of names")
9191
val YtermConflict = ChoiceSetting("-Yresolve-term-conflict", "strategy", "Resolve term conflicts", List("package", "object", "error"), "error")
9292
val Ylog = PhasesSetting("-Ylog", "Log operations during")
93-
val YemitTasty = BooleanSetting("-Yemit-tasty", "Generate tasty in separate *.tasty file.", true)
93+
val YemitTastyInClass = BooleanSetting("-Yemit-tasty-in-class", "Generate tasty in the .class file and add an empty *.hasTasty file.")
9494
val YlogClasspath = BooleanSetting("-Ylog-classpath", "Output information about what classpath is being applied.")
9595
val YdisableFlatCpCaching = BooleanSetting("-YdisableFlatCpCaching", "Do not cache flat classpath representation of classpath elements from jars across compiler instances.")
9696

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

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

260260
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)