summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2011-09-29 13:23:15 +0000
committermichelou <michelou@epfl.ch>2011-09-29 13:23:15 +0000
commitf9aa83a6e5086774e904638d183726edfe324a00 (patch)
tree2e4f6f889a49973b97baa5c5f8879c1807dc9e20 /src
parent4529141cc154a9d7359e16344d7a318ca529f89f (diff)
downloadscala-f9aa83a6e5086774e904638d183726edfe324a00.tar.gz
scala-f9aa83a6e5086774e904638d183726edfe324a00.tar.bz2
scala-f9aa83a6e5086774e904638d183726edfe324a00.zip
Removed special comments on Martin's request
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/ant/ScalaBazaar.scala67
-rw-r--r--src/compiler/scala/tools/ant/antlib.xml2
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/Parsers.scala18
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/Scanners.scala10
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/SyntaxAnalyzer.scala2
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/Tokens.scala2
-rw-r--r--src/compiler/scala/tools/nsc/interpreter/ReplTokens.scala3
-rw-r--r--src/compiler/scala/tools/nsc/plugins/Plugin.scala5
-rw-r--r--src/compiler/scala/tools/nsc/plugins/PluginDescription.scala54
-rw-r--r--src/compiler/scala/tools/util/XML.scala150
-rw-r--r--src/library/scala/Predef.scala2
-rw-r--r--src/library/scala/package.scala2
-rw-r--r--src/library/scala/runtime/ScalaRunTime.scala4
-rw-r--r--src/library/scala/sys/process/Process.scala4
-rw-r--r--src/partest/scala/tools/partest/PartestTask.scala41
15 files changed, 10 insertions, 356 deletions
diff --git a/src/compiler/scala/tools/ant/ScalaBazaar.scala b/src/compiler/scala/tools/ant/ScalaBazaar.scala
index f3b08faf3b..fa44715c7f 100644
--- a/src/compiler/scala/tools/ant/ScalaBazaar.scala
+++ b/src/compiler/scala/tools/ant/ScalaBazaar.scala
@@ -221,7 +221,7 @@ class ScalaBazaar extends Task with ScalaTask {
log("Element '" + file.toString + "' does not exist.", Project.MSG_WARN)
file
}
-/*@XML*/
+
private def writeFile(file: File, content: String) {
if (file.exists && !file.canWrite)
buildError("File " + file + " is not writable")
@@ -231,15 +231,6 @@ class ScalaBazaar extends Task with ScalaTask {
writer.close()
}
}
-/*XML@*/
-/*@NOXML
- private def writeFile(file: File, node: util.XML.Node) {
- if (file.exists && !file.canWrite)
- buildError("File " + file + " is not writable")
- else
- util.XML.save(file.getPath, node)
- }
-XMLNO@*/
/******************************************************************************\
** The big execute method **
@@ -252,12 +243,7 @@ XMLNO@*/
if (name.isEmpty) buildError("Attribute 'name' is not set.")
if (version.isEmpty) buildError("Attribute 'version' is not set.")
-/*@NOXML
- val advertDoc = util.XML.newDocument()
-XMLNO@*/
-
val pack = {
-/*@XML*/ // NB. This code DOES rely on Scala native XML support.
<package>
<name>{name.get}</name>
<version>{version.get}</version>{
@@ -273,42 +259,12 @@ XMLNO@*/
else Nil
}
</package>
-/*XML@*/
-/*@NOXML // NB. This code DOES NOT rely on Scala native XML support.
- val packageElem = advertDoc createElement "package"
-
- val nameElem = advertDoc createElement "name"
- nameElem appendChild (advertDoc createTextNode name.get)
- packageElem appendChild nameElem
-
- val versionElem = advertDoc createElement "version"
- versionElem appendChild (advertDoc createTextNode version.get)
- packageElem appendChild versionElem
-
- if (!depends.isEmpty) {
- val dependsElem = advertDoc createElement "depends"
- for (depend <- depends) {
- val depNameElem = advertDoc createElement "name"
- depNameElem appendChild (advertDoc createTextNode depend)
- dependsElem appendChild depNameElem
- }
- packageElem appendChild dependsElem
- }
- if (!desc.isEmpty) {
- val descElem = advertDoc createElement "description"
- descElem appendChild (advertDoc createTextNode desc.get)
- packageElem appendChild descElem
- }
-
- packageElem
-XMLNO@*/
}
log("Creating package '" + name.get + "'")
// Creates the advert file
val advert = {
-/*@XML*/ // NB. This code DOES rely on Scala native XML support.
<availablePackage>
{pack}
{link match {
@@ -316,31 +272,10 @@ XMLNO@*/
case Some(str) => <link>{str}</link>
}}
</availablePackage>
-/*XML@*/
-/*@NOXML // NB. This code DOES NOT rely on Scala native XML support.
- val availPackageElem = advertDoc createElement "availablePackage"
- availPackageElem appendChild pack
- advertDoc appendChild availPackageElem
- val text = link match {
- case None => "INSERT LINK HERE"
- case Some(str) => str
- }
- val linkElem = advertDoc createElement "link"
- linkElem appendChild (advertDoc createTextNode text)
- availPackageElem appendChild linkElem
-
- advertDoc
-XMLNO@*/
}
-/*@XML*/
if (!adfile.isEmpty)
writeFile(getAdfile, advert.toString)
-/*XML@*/
-/*@NOXML
- if (!adfile.isEmpty)
- writeFile(getAdfile, advertDoc)
-XMLNO@*/
// Checks for new files and creates the ZIP
diff --git a/src/compiler/scala/tools/ant/antlib.xml b/src/compiler/scala/tools/ant/antlib.xml
index 4a186d3cf4..bbdf1fc9db 100644
--- a/src/compiler/scala/tools/ant/antlib.xml
+++ b/src/compiler/scala/tools/ant/antlib.xml
@@ -11,10 +11,8 @@
classname="scala.tools.ant.ScalaTool"/>
<taskdef name="sbaz"
classname="scala.tools.ant.ScalaBazaar"/>
- <!--@XML-->
<taskdef name="scaladoc"
classname="scala.tools.ant.Scaladoc"/>
- <!--XML@-->
<taskdef name="scalatool"
classname="scala.tools.ant.ScalaTool"/>
<taskdef name="same"
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
index 615efb986a..0ae8516de9 100644
--- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
@@ -118,7 +118,7 @@ trait ParsersCommon extends ScannersCommon {
* </li>
* </ol>
*/
-trait Parsers extends Scanners /*@XML*/ with MarkupParsers /*XML@*/ with ParsersCommon {
+trait Parsers extends Scanners with MarkupParsers with ParsersCommon {
self =>
val global: Global
import global._
@@ -158,7 +158,6 @@ self =>
def incompleteInputError(msg: String): Unit = throw new MalformedInput(source.content.length - 1, msg)
/** the markup parser */
-/*@XML*/
lazy val xmlp = new MarkupParser(this, true)
object symbXMLBuilder extends SymbolicXMLBuilder(this, true) { // DEBUG choices
@@ -168,7 +167,6 @@ self =>
def xmlLiteral : Tree = xmlp.xLiteral
def xmlLiteralPattern : Tree = xmlp.xLiteralPattern
-/*XML@*/
}
class OutlineParser(source: SourceFile) extends SourceFileParser(source) {
@@ -177,16 +175,12 @@ self =>
accept(LBRACE)
var openBraces = 1
while (in.token != EOF && openBraces > 0) {
- /*@XML*/
if (in.token == XMLSTART) xmlLiteral()
else {
- /*XML@*/
if (in.token == LBRACE) openBraces += 1
else if (in.token == RBRACE) openBraces -= 1
in.nextToken()
- /*@XML*/
}
- /*XML@*/
}
body
}
@@ -630,7 +624,7 @@ self =>
def isExprIntroToken(token: Int): Boolean = isLiteralToken(token) || (token match {
case IDENTIFIER | BACKQUOTED_IDENT |
THIS | SUPER | IF | FOR | NEW | USCORE | TRY | WHILE |
- DO | RETURN | THROW | LPAREN | LBRACE /*@XML*/| XMLSTART /*XML@*/ => true
+ DO | RETURN | THROW | LPAREN | LBRACE | XMLSTART => true
case _ => false
})
@@ -1455,9 +1449,7 @@ self =>
}
else simpleExpr()
}
- /*@XML*/
def xmlLiteral(): Tree
- /*XML@*/
/** {{{
* SimpleExpr ::= new (ClassTemplate | TemplateBody)
@@ -1477,10 +1469,8 @@ self =>
val t =
if (isLiteral) atPos(in.offset)(literal(false))
else in.token match {
- /*@XML*/
case XMLSTART =>
xmlLiteral()
- /*XML@*/
case IDENTIFIER | BACKQUOTED_IDENT | THIS | SUPER =>
path(true, false)
case USCORE =>
@@ -1826,10 +1816,8 @@ self =>
atPos(start) { literal(false) }
case LPAREN =>
atPos(start)(makeParens(noSeq.patterns()))
- /*@XML*/
case XMLSTART =>
xmlLiteralPattern()
- /*XML@*/
case _ =>
syntaxErrorOrIncomplete("illegal start of simple pattern", true)
errorPatternTree
@@ -1871,9 +1859,7 @@ self =>
if (in.token == RPAREN) Nil
else seqPatterns()
}
- /*@XML*/
def xmlLiteralPattern(): Tree
- /*XML@*/
/* -------- MODIFIERS and ANNOTATIONS ------------------------------------------- */
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala b/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala
index e3d2525d16..a5d0f98f64 100644
--- a/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala
@@ -10,9 +10,7 @@ import scala.reflect.internal.Chars._
import Tokens._
import scala.annotation.switch
import scala.collection.mutable.{ ListBuffer, ArrayBuffer }
-/*@XML*/
import scala.xml.Utility.{ isNameStart }
-/*XML@*/
/** See Parsers.scala / ParsersCommon for some explanation of ScannersCommon.
*/
@@ -299,7 +297,6 @@ trait Scanners extends ScannersCommon {
putChar(ch)
nextChar()
getIdentRest() // scala-mode: wrong indent for multi-line case blocks
-/*@XML*/
case '<' => // is XMLSTART?
val last = if (charOffset >= 2) buf(charOffset - 2) else ' '
nextChar()
@@ -311,9 +308,8 @@ trait Scanners extends ScannersCommon {
putChar('<')
getOperatorRest()
}
-/*XML@*/
case '~' | '!' | '@' | '#' | '%' |
- '^' | '*' | '+' | '-' | /*'<' | */ /*@NOXML '<' | XMLNO@*/
+ '^' | '*' | '+' | '-' | /*'<' | */
'>' | '?' | ':' | '=' | '&' |
'|' | '\\' =>
putChar(ch)
@@ -493,7 +489,7 @@ trait Scanners extends ScannersCommon {
def inLastOfStat(token: Int) = token match {
case CHARLIT | INTLIT | LONGLIT | FLOATLIT | DOUBLELIT | STRINGLIT | SYMBOLLIT |
IDENTIFIER | BACKQUOTED_IDENT | THIS | NULL | TRUE | FALSE | RETURN | USCORE |
- TYPE /*@XML*/| XMLSTART /*XML@*/ | RPAREN | RBRACKET | RBRACE =>
+ TYPE | XMLSTART | RPAREN | RBRACKET | RBRACE =>
true
case _ =>
false
@@ -1010,9 +1006,7 @@ trait Scanners extends ScannersCommon {
case COMMA => "','"
case CASECLASS => "case class"
case CASEOBJECT => "case object"
-/*@XML*/
case XMLSTART => "$XMLSTART$<"
-/*XML@*/
case _ =>
(token2name get token) match {
case Some(name) => "'" + name + "'"
diff --git a/src/compiler/scala/tools/nsc/ast/parser/SyntaxAnalyzer.scala b/src/compiler/scala/tools/nsc/ast/parser/SyntaxAnalyzer.scala
index 270f50c1c5..b5ec0ceffb 100644
--- a/src/compiler/scala/tools/nsc/ast/parser/SyntaxAnalyzer.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/SyntaxAnalyzer.scala
@@ -10,7 +10,7 @@ import javac._
/** An nsc sub-component.
*/
-abstract class SyntaxAnalyzer extends SubComponent with Parsers /*@XML*/ with MarkupParsers /*XML@*/ with Scanners with JavaParsers with JavaScanners {
+abstract class SyntaxAnalyzer extends SubComponent with Parsers with MarkupParsers with Scanners with JavaParsers with JavaScanners {
val phaseName = "parser"
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Tokens.scala b/src/compiler/scala/tools/nsc/ast/parser/Tokens.scala
index aeb8d5bb8b..70f98aa71b 100644
--- a/src/compiler/scala/tools/nsc/ast/parser/Tokens.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/Tokens.scala
@@ -146,10 +146,8 @@ object Tokens extends Tokens {
final val LBRACE = 94
final val RBRACE = 95
-/*@XML*/
/** XML mode */
final val XMLSTART = 96
-/*XML@*/
/** for IDE only */
final val COMMENT = 97
diff --git a/src/compiler/scala/tools/nsc/interpreter/ReplTokens.scala b/src/compiler/scala/tools/nsc/interpreter/ReplTokens.scala
index 4c85f9b032..1c7b256c33 100644
--- a/src/compiler/scala/tools/nsc/interpreter/ReplTokens.scala
+++ b/src/compiler/scala/tools/nsc/interpreter/ReplTokens.scala
@@ -98,9 +98,8 @@ abstract class ReplTokens {
SUBTYPE -> Subtype,
SUPERTYPE -> Supertype,
TRUE -> True,
- VIEWBOUND -> ViewBound/*@XML*/,
+ VIEWBOUND -> ViewBound,
XMLSTART -> "<xmlstart>"
-/*XML@*/
)
}
def isAlphaId(t: ReplToken) = t match {
diff --git a/src/compiler/scala/tools/nsc/plugins/Plugin.scala b/src/compiler/scala/tools/nsc/plugins/Plugin.scala
index 99b4a3d6f3..9254ec8628 100644
--- a/src/compiler/scala/tools/nsc/plugins/Plugin.scala
+++ b/src/compiler/scala/tools/nsc/plugins/Plugin.scala
@@ -13,12 +13,7 @@ import java.util.zip.ZipException
import scala.collection.mutable
import mutable.ListBuffer
-/*@XML*/
import scala.xml.XML
-/*XML@*/
-/*@NOXML
-import scala.tools.util.XML
-XMLNO@*/
/** Information about a plugin loaded from a jar file.
*
diff --git a/src/compiler/scala/tools/nsc/plugins/PluginDescription.scala b/src/compiler/scala/tools/nsc/plugins/PluginDescription.scala
index 703a2453eb..0fa925baa7 100644
--- a/src/compiler/scala/tools/nsc/plugins/PluginDescription.scala
+++ b/src/compiler/scala/tools/nsc/plugins/PluginDescription.scala
@@ -6,18 +6,12 @@
package scala.tools.nsc
package plugins
-/*@XML*/
import scala.xml.{Node,NodeSeq}
-/*XML@*/
-/*@NOXML
-import org.w3c.dom.{Node, Document, Text}
-import scala.tools.util.XML
-XMLNO@*/
/** A description of a compiler plugin, suitable for serialization
* to XML for inclusion in the plugin's .jar file.
*
- * @author Lex Spoon, Stephane Micheloud
+ * @author Lex Spoon
* @version 1.0, 2007-5-21
*/
abstract class PluginDescription {
@@ -35,71 +29,27 @@ abstract class PluginDescription {
* read back using <code>PluginDescription.fromXML</code>.
* It should be stored inside the jar archive file.
*/
-/*@XML*/ // NB. This code DOES rely on Scala native XML support.
def toXML: Node = {
<plugin>
<name>{name}</name>
<classname>{classname}</classname>
</plugin>
}
-/*XML@*/
-/*@NOXML // NB. This code DOES NOT rely on Scala native XML support.
- def toXML: Node = pluginDoc
-
- private lazy val pluginDoc: Node = {
- val root = XML.newDocument()
-
- val pluginElem = root createElement "plugin"
- root appendChild pluginElem
-
- val nameElem = root createElement "name"
- nameElem appendChild (root createTextNode name)
- pluginElem appendChild nameElem
-
- val classnameElem = root createElement "classname"
- classnameElem appendChild (root createTextNode classname)
- pluginElem appendChild classnameElem
-
- root
- }
-XMLNO@*/
}
/** Utilities for the PluginDescription class.
*
- * @author Lex Spoon, Stephane Micheloud
+ * @author Lex Spoon
* @version 1.0, 2007-5-21
*/
object PluginDescription {
def fromXML(xml: Node): Option[PluginDescription] = {
// check the top-level tag
-/*@XML*/
xml match {
case <plugin>{_*}</plugin> => ()
case _ => return None
}
-/*XML@*/
-/*@NOXML
- val node = xml match {
- case root: Document => root.getDocumentElement
- case node => node
- }
- if (node.getNodeName != "plugin")
- return None
-
- class RichNode(node: Node) {
- def \\(tagName: String): Node = node match {
- case root: Document => root.getElementsByTagName(tagName) item 0
- case _ => node //TODO: visit children
- }
- def text: String = node match {
- case t: Text => t.getWholeText
- case e => e.getTextContent
- }
- }
- implicit def nodeWrapper(node: Node) = new RichNode(node)
-XMLNO@*/
// extract one field
def getField(field: String): Option[String] = {
val text = (xml \\ field).text.trim
diff --git a/src/compiler/scala/tools/util/XML.scala b/src/compiler/scala/tools/util/XML.scala
deleted file mode 100644
index 3c5b2bf458..0000000000
--- a/src/compiler/scala/tools/util/XML.scala
+++ /dev/null
@@ -1,150 +0,0 @@
-/* NSC -- new Scala compiler
- * Copyright 2005-2011 LAMP/EPFL
- * @author Stephane Micheloud
- */
-
-package scala.tools
-package util
-
-// Dummy interface to fool ant.
-sealed trait XML
-
-/** The object `XML` provides minimal XML support for creating, loading
- * and saving XML documents (see eg. [[scala.tools.ant.ScalaBazaar]],
- * [[scala.tools.nsc.plugins.PluginDescription]] and
- * [[scala.tools.partest.PartestTask]]).
- *
- * It makes possible for the programmer of Scala tools not to rely on the
- * XML features of the reference implementation of the Scala compiler
- * (some Scala customers may for instance not be interested in that features).
- *
- * @author Stephane Micheloud
- * @version 1.0
- */
-/*@NOXML
-// [mics] used in code which DOES NOT rely on Scala native XML support
-// (see eg. classes partest/PartestTask.scala, ant/ScalaBazaar.scala).
-object XML {
- import java.io.{FileOutputStream, InputStream, Writer}
- import java.nio.channels.Channels
- import javax.xml.parsers.DocumentBuilderFactory
- import org.w3c.dom.{Document, DocumentType, Element, NamedNodeMap}
- import org.w3c.dom.{Node => JNode, Text => JText}
- import org.xml.sax.InputSource
- import scala.util.control.Exception.ultimately
-
- def newDocument(): Document = newBuilder.newDocument()
-
- def loadXML(source: InputSource): Document = newBuilder parse source
-
- def load(in: InputStream) = loadXML(new InputSource(in))
-
- final def save(filename: String, node: Node,
- encoding: String = "ISO-8859-1",
- xmlDecl: Boolean = false,
- doctype: DocumentType = null) {
- val fos = new FileOutputStream(filename)
- val w = Channels.newWriter(fos.getChannel, encoding)
-
- ultimately(w.close()) {
- write(w, node, encoding, xmlDecl, doctype)
- }
- }
-
- final def write(out: Writer, node: Node, encoding: String, xmlDecl: Boolean, doctype: DocumentType) {
- if (xmlDecl) out.write("<?xml version='1.0' encoding='" + encoding + "'?>\n")
- if (doctype ne null) out.write(doctype.getName + "\n")
- out write node.toXMLString
- }
-
- class Node(val node: JNode) {
- def toXMLString: String = {
- var indent: Int = 0
- val sb = new StringBuilder()
- def xmlTag(s: String, attrs: NamedNodeMap, trail: String) {
- var i = 0; while (i < indent) { sb append spaces; i += 1 }
- sb append "<" append s
- for (i <- 0 until attrs.getLength) {
- val attr = attrs item i
- sb append " " append attr.getNodeName append "=\"" append attr.getTextContent append "\""
- }
- sb append trail
- }
- def startTag(s: String, attrs: NamedNodeMap) {
- xmlTag(s, attrs, Node.TAG_TRAIL_EOL)
- indent += 1
- }
- def startTag1(s: String, attrs: NamedNodeMap) {
- xmlTag(s, attrs, Node.TAG_TRAIL)
- }
- def shortTag(s: String, attrs: NamedNodeMap) {
- xmlTag(s, attrs, Node.STAG_TRAIL_EOL)
- }
- def endTag(s: String) {
- indent -= 1
- var i = 0; while (i < indent) { sb append spaces; i += 1 }
- sb append "</" append s append Node.TAG_TRAIL_EOL
- }
- def endTag1(s: String) {
- sb append "</" append s append Node.TAG_TRAIL_EOL
- }
- def traverse(node: JNode) {
- val name = node.getNodeName
- val attrs = node.getAttributes
- var children = node.getChildNodes
- val n = children.getLength
- if (n == 1 && children.item(0).isInstanceOf[JText]) {
- startTag1(name, attrs)
- sb append children.item(0).asInstanceOf[JText].getWholeText
- endTag1(name)
- }
- else if (n > 0) {
- startTag(name, attrs)
- for (i <- 0 until n) {
- mkString(children item i)
- }
- endTag(name)
- }
- else
- shortTag(name, attrs)
- }
- def mkString(node: JNode) = node match {
- case t: JText => sb append t.getWholeText
- case e => traverse(e)
- }
- traverse(node match {
- case docu: Document => docu.getDocumentElement
- case elem => elem
- })
- sb.toString
- }
-
- def text: String = node match {
- case t: JText => t.getWholeText
- case n => n.getTextContent
- }
-
- override def toString: String = toXMLString
- }
-
- implicit def nodeWrapper(node: JNode) = new Node(node)
-
- // ---------- private declarations --------
-
- private val docFactory = DocumentBuilderFactory.newInstance()
- docFactory setNamespaceAware false
- private def newBuilder = docFactory.newDocumentBuilder()
-
- private var spaces = " "
- def spaces_=(n: Int) { spaces = List.fill(n)(' ').mkString }
-
- private object Node {
- final val TAG_TRAIL = ">"
- final val TAG_TRAIL_EOL = TAG_TRAIL+compat.Platform.EOL
- final val STAG_TRAIL = "/>"
- final val STAG_TRAIL_EOL = STAG_TRAIL+compat.Platform.EOL
- }
-
-}
-XMLNO@*/
-
diff --git a/src/library/scala/Predef.scala b/src/library/scala/Predef.scala
index 8a2729a3f9..54111dceba 100644
--- a/src/library/scala/Predef.scala
+++ b/src/library/scala/Predef.scala
@@ -114,10 +114,8 @@ object Predef extends LowPriorityImplicits {
def implicitly[T](implicit e: T) = e // for summoning implicit values from the nether world
@inline def locally[T](x: T): T = x // to communicate intent and avoid unmoored statements
- /*@XML*/
// Apparently needed for the xml library
val $scope = scala.xml.TopScope
- /*XML@*/
// Deprecated
diff --git a/src/library/scala/package.scala b/src/library/scala/package.scala
index 1267e90c6d..0c5d10b15e 100644
--- a/src/library/scala/package.scala
+++ b/src/library/scala/package.scala
@@ -75,12 +75,10 @@ package object scala {
@deprecated("Use Thread.currentThread instead", "2.9.0")
def currentThread = java.lang.Thread.currentThread()
- /*@XML*/
// Moved back into Predef to avoid unnecessary indirection by
// way of the scala package object within the standard library,
// but bridged for compatibility.
@bridge def $scope = scala.xml.TopScope
- /*XML@*/
// Numeric types which were moved into scala.math.*
diff --git a/src/library/scala/runtime/ScalaRunTime.scala b/src/library/scala/runtime/ScalaRunTime.scala
index a56055e210..33f93e610d 100644
--- a/src/library/scala/runtime/ScalaRunTime.scala
+++ b/src/library/scala/runtime/ScalaRunTime.scala
@@ -13,9 +13,7 @@ import scala.collection.mutable.WrappedArray
import scala.collection.immutable.{ StringLike, NumericRange, List, Stream, Nil, :: }
import scala.collection.generic.{ Sorted }
import scala.util.control.ControlThrowable
-/*@XML*/
import scala.xml.{ Node, MetaData }
-/*XML@*/
import java.lang.Double.doubleToLongBits
import java.lang.reflect.{ Modifier, Method => JMethod }
@@ -280,10 +278,8 @@ object ScalaRunTime {
// When doing our own iteration is dangerous
def useOwnToString(x: Any) = x match {
- /*@XML*/
// Node extends NodeSeq extends Seq[Node] and MetaData extends Iterable[MetaData]
case _: Node | _: MetaData => true
- /*XML@*/
// Range/NumericRange have a custom toString to avoid walking a gazillion elements
case _: Range | _: NumericRange[_] => true
// Sorted collections to the wrong thing (for us) on iteration - ticket #3493
diff --git a/src/library/scala/sys/process/Process.scala b/src/library/scala/sys/process/Process.scala
index ff02b38fd3..db10ff9c1d 100644
--- a/src/library/scala/sys/process/Process.scala
+++ b/src/library/scala/sys/process/Process.scala
@@ -132,9 +132,7 @@ trait ProcessCreation {
* apply(<x> {dxPath.absolutePath} --dex --output={classesDexPath.absolutePath} {classesMinJarPath.absolutePath}</x>)
* }}}
*/
- /*@XML*/
def apply(command: scala.xml.Elem): ProcessBuilder = apply(command.text.trim)
- /*XML@*/
/** Create a [[scala.sys.process.ProcessBuilder]] from a `Boolean`. This can be
* to force an exit value.
@@ -207,9 +205,7 @@ trait ProcessImplicits {
implicit def urlToProcess(url: URL): URLBuilder = apply(url)
/** Implicitly convert a [[scala.xml.Elem]] into a [[scala.sys.process.ProcessBuilder]] */
- /*@XML*/
implicit def xmlToProcess(command: scala.xml.Elem): ProcessBuilder = apply(command)
- /*XML@*/
/** Implicitly convert a `String` into a [[scala.sys.process.ProcessBuilder]] */
implicit def stringToProcess(command: String): ProcessBuilder = apply(command)
diff --git a/src/partest/scala/tools/partest/PartestTask.scala b/src/partest/scala/tools/partest/PartestTask.scala
index f7625eb8ab..10f5a37a8f 100644
--- a/src/partest/scala/tools/partest/PartestTask.scala
+++ b/src/partest/scala/tools/partest/PartestTask.scala
@@ -54,7 +54,7 @@ import org.apache.tools.ant.types.{Path, Reference, FileSet}
* - `presentationtests`,
* - `scripttests`.
*
- * @author Philippe Haller, Stephane Micheloud
+ * @author Philippe Haller
*/
class PartestTask extends Task with CompilationPathProperty {
@@ -336,12 +336,7 @@ class PartestTask extends Task with CompilationPathProperty {
d.mkdir()
val report = testReport(name, results, succs, fails)
-/*@XML*/
scala.xml.XML.save(d.getAbsolutePath+"/"+name+".xml", report)
-/*XML@*/
-/*@NOXML
- util.XML.save(d.getAbsolutePath+"/"+name+".xml", report)
-XMLNO@*/
}
(succs, fails, failed)
@@ -364,7 +359,6 @@ XMLNO@*/
f(msg)
}
-/*@XML*/ // NB. This code DOES rely on Scala native XML support.
def oneResult(res: (String, Int)) =
<testcase name={res._1}>{
res._2 match {
@@ -381,37 +375,4 @@ XMLNO@*/
results.map(oneResult(_))
}
</testsuite>
-/*XML@*/
-/*@NOXML // NB. This code DOES NOT rely on Scala native XML support.
- private def testReport(kind: String, results: Iterable[(String, Int)], succs: Int, fails: Int) = {
- val root = util.XML.newDocument()
-
- def testCase(res: (String, Int)) = {
- val testcaseElem = root createElement "testcase"
- testcaseElem.setAttribute("name", res._1)
- val text = res._2 match {
- case 0 => null
- case 1 => "Test failed"
- case 2 => "Test timed out"
- }
- if (text != null) {
- val failureElem = root createElement "failure"
- failureElem.setAttribute("message", text)
- testcaseElem appendChild failureElem
- }
- testcaseElem
- }
-
- val testsuiteElem = root createElement "testsuite"
- testsuiteElem.setAttribute("name", kind)
- testsuiteElem.setAttribute("tests", (succs+fails).toString)
- testsuiteElem.setAttribute("failures", fails.toString)
- root appendChild testsuiteElem
-
- testsuiteElem appendChild (root createElement "properties")
- results foreach (res => testsuiteElem appendChild testCase(res))
-
- root
- }
-XMLNO@*/
}