summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2014-02-26 08:28:56 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2014-02-26 09:37:18 -0800
commit52d60e69d8e05f6957603ced38788c3f4320df86 (patch)
tree8167a4601a098b4b94a6831be4e8e96841818e83
parentb4ff1e934f36af6792b29b3d850cee836aa7b050 (diff)
downloadscala-52d60e69d8e05f6957603ced38788c3f4320df86.tar.gz
scala-52d60e69d8e05f6957603ced38788c3f4320df86.tar.bz2
scala-52d60e69d8e05f6957603ced38788c3f4320df86.zip
Selectively revert "SI-8315 Better debugging facility for ICode"
This reverts commit 0561dd084b5f3c2678eb032a40b85cb25bb6d589, because appending the phase name to the icode filename breaks the windows build. Only doing it under -Ydebug.
-rw-r--r--src/compiler/scala/tools/nsc/Global.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala
index 6b14461cac..c5d0c8506a 100644
--- a/src/compiler/scala/tools/nsc/Global.scala
+++ b/src/compiler/scala/tools/nsc/Global.scala
@@ -1798,8 +1798,10 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
private def writeICode() {
val printer = new icodes.TextPrinter(null, icodes.linearizer)
icodes.classes.values.foreach((cls) => {
- val suffix = s"${if (cls.symbol.hasModuleFlag) "$" else ""}_${phase}.icode"
- val file = getFile(cls.symbol, suffix)
+ val moduleSfx = if (cls.symbol.hasModuleFlag) "$" else ""
+ val phaseSfx = if (settings.debug) phase else "" // only for debugging, appending the full phasename breaks windows build
+ val file = getFile(cls.symbol, s"$moduleSfx$phaseSfx.icode")
+
try {
val stream = new FileOutputStream(file)
printer.setWriter(new PrintWriter(stream, true))