Synced dotnet library with rev 12294
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@12297 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
parent
4576d20cdb
commit
b269c20a3f
|
@ -303,17 +303,17 @@ abstract class GenMSIL extends SubComponent {
|
|||
log("creating attributes: " + attributes + " for member : " + member)
|
||||
for (attr@ AnnotationInfo(typ, annArgs, nvPairs) <- attributes ;
|
||||
if attr.isConstant)
|
||||
/* !typ.symbol.hasFlag(Flags.JAVA) */
|
||||
/* !typ.typeSymbol.hasFlag(Flags.JAVA) */
|
||||
{
|
||||
// assert(consts.length <= 1,
|
||||
// "too many constant arguments for attribute; "+consts.toString())
|
||||
|
||||
// Problem / TODO having the symbol of the attribute type would be nicer
|
||||
// (i hope that type.symbol is the same as the one in types2create)
|
||||
// (i hope that type.typeSymbol is the same as the one in types2create)
|
||||
// AND: this will crash if the attribute Type is already compiled (-> not a typeBuilder)
|
||||
// when this is solved, types2create will be the same as icodes.classes, thus superfluous
|
||||
val attrType: TypeBuilder = getType(typ.symbol).asInstanceOf[TypeBuilder]
|
||||
// val attrType: MsilType = getType(typ.symbol)
|
||||
val attrType: TypeBuilder = getType(typ.typeSymbol).asInstanceOf[TypeBuilder]
|
||||
// val attrType: MsilType = getType(typ.typeSymbol)
|
||||
|
||||
// Problem / TODO: i have no idea which constructor is used. This
|
||||
// information should be available in AnnotationInfo.
|
||||
|
@ -1918,7 +1918,7 @@ abstract class GenMSIL extends SubComponent {
|
|||
if (sym.tpe.paramTypes.length == 1) {
|
||||
toTypeKind(sym.tpe.paramTypes(0)) match {
|
||||
case ARRAY(elem) =>
|
||||
if (elem.toType.symbol == definitions.StringClass){
|
||||
if (elem.toType.typeSymbol == definitions.StringClass){
|
||||
return true
|
||||
}
|
||||
case _ => ()
|
||||
|
@ -1982,7 +1982,7 @@ abstract class GenMSIL extends SubComponent {
|
|||
|
||||
def createTypeBuilder(iclass: IClass) {
|
||||
def getMsilType(tpe: Type): MsilType = {
|
||||
val sym = tpe.symbol
|
||||
val sym = tpe.typeSymbol
|
||||
types.get(sym) match {
|
||||
case Some(mtype) => mtype
|
||||
case None => createTypeBuilder(classes(sym)); types(sym)
|
||||
|
@ -1999,14 +1999,14 @@ abstract class GenMSIL extends SubComponent {
|
|||
|
||||
val superType = if (isInterface(sym)) null else getMsilType(parents.head)
|
||||
if (settings.debug.value)
|
||||
log("super type: " + parents(0).symbol + ", msil type: " + superType)
|
||||
log("super type: " + parents(0).typeSymbol + ", msil type: " + superType)
|
||||
|
||||
val interfaces: Array[MsilType] = parents.tail.map(getMsilType).toArray
|
||||
if (parents.length > 1) {
|
||||
if (settings.debug.value){
|
||||
log("interfaces:")
|
||||
for (i <- 0.until(interfaces.length)){
|
||||
log(" type: " + parents(i + 1).symbol + ", msil type: " + interfaces(i))
|
||||
log(" type: " + parents(i + 1).typeSymbol + ", msil type: " + interfaces(i))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -434,7 +434,7 @@ abstract class TypeParser {
|
|||
// java.lang.Number to get the value (if a number, not for boolean, character)
|
||||
// see ch.epfl.lamp.compiler.msil.util.PEStream.java
|
||||
def getConstant(constType: Type, value: Object): Constant = {
|
||||
val typeClass = constType.symbol
|
||||
val typeClass = constType.typeSymbol
|
||||
if (typeClass == definitions.BooleanClass)
|
||||
Constant(value.asInstanceOf[java.lang.Boolean].booleanValue)
|
||||
else if (typeClass == definitions.ByteClass)
|
||||
|
|
|
@ -66,7 +66,7 @@ object Console {
|
|||
*
|
||||
* @param out the new output stream.
|
||||
*/
|
||||
def setOut(out: TextWriter): Unit = outVar.value = out
|
||||
def setOut(out: TextWriter) { outVar.value = out }
|
||||
|
||||
/** Set the default output stream for the duration
|
||||
* of execution of one thunk.
|
||||
|
@ -109,7 +109,7 @@ object Console {
|
|||
* output (i.e. output not terminated by a new line character) has
|
||||
* to be made visible on the terminal.
|
||||
*/
|
||||
def flush(): Unit = out.Flush()
|
||||
def flush() { out.Flush() }
|
||||
|
||||
/** Print a new line character on the terminal.
|
||||
*/
|
||||
|
@ -130,16 +130,16 @@ object Console {
|
|||
* <code>text</code>. The arguments that are inserted into specific
|
||||
* locations in <code>text</code> are provided with parameter
|
||||
* <code>args</code>. See class <a href="" target="contentFrame"
|
||||
* class="java_text_MessageFormat"><code>java.text.MessageFormat</code></a>
|
||||
* class="java/text/MessageFormat"><code>java.text.MessageFormat</code></a>
|
||||
* for a full specification of the <a href="#syntax" target="contentFrame"
|
||||
* class="java_util_Formatter">format syntax</a>.
|
||||
* class="java/util/Formatter">format syntax</a>.
|
||||
* </p>
|
||||
*
|
||||
* @param text the format of the text to print out.
|
||||
* @param args the parameters used to instantiate the format.
|
||||
* @throws java.lang.IllegalArgumentException
|
||||
*/
|
||||
def printf(text: String, args: Any*): Unit = format(text, args: _*)
|
||||
def printf(text: String, args: Any*) { format(text, args: _*) }
|
||||
|
||||
/**
|
||||
* @see <a href="#printf(java.lang.String,scala.Any*)"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* __ *\
|
||||
** ________ ___ / / ___ Scala API **
|
||||
** / __/ __// _ | / / / _ | (c) 2002-2006, LAMP/EPFL **
|
||||
** __\ \/ /__/ __ |/ /__/ __ | **
|
||||
** / __/ __// _ | / / / _ | (c) 2002-2007, LAMP/EPFL **
|
||||
** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
|
||||
** /____/\___/_/ |_/____/_/ | | **
|
||||
** |/ **
|
||||
\* */
|
||||
|
@ -12,7 +12,7 @@
|
|||
package scala.compat
|
||||
|
||||
/**
|
||||
* This class will be removed soon. Use scala.Math instead
|
||||
* This class will be removed soon. Use <code>scala.Math</code> instead.
|
||||
*/
|
||||
@deprecated
|
||||
object Math {
|
||||
|
|
Loading…
Reference in New Issue