diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2007-07-13 16:02:16 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2007-07-13 16:02:16 +0000 |
commit | 13369d36fa26522feeb4ce49d20446c79a476f97 (patch) | |
tree | e01fd7b493e3a7e92bb7016f21701f93786082fd /src/compiler | |
parent | 6d9221f765be5c2e4d48878d08899f84ae7e0bf2 (diff) | |
download | scala-13369d36fa26522feeb4ce49d20446c79a476f97.tar.gz scala-13369d36fa26522feeb4ce49d20446c79a476f97.tar.bz2 scala-13369d36fa26522feeb4ce49d20446c79a476f97.zip |
Fixed deprecation warnings in the backend.
Diffstat (limited to 'src/compiler')
3 files changed, 16 insertions, 16 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala index d79310ec93..c936c61cbf 100644 --- a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala +++ b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala @@ -492,9 +492,9 @@ abstract class GenICode extends SubComponent { var handlers = for (CaseDef(pat, _, body) <- catches.reverse) yield pat match { - case Typed(Ident(nme.WILDCARD), tpt) => (tpt.tpe.symbol, kind, { + case Typed(Ident(nme.WILDCARD), tpt) => (tpt.tpe.typeSymbol, kind, { ctx: Context => - ctx.bb.emit(DROP(REFERENCE(tpt.tpe.symbol))); + ctx.bb.emit(DROP(REFERENCE(tpt.tpe.typeSymbol))); val ctx1 = genLoad(body, ctx, kind); if (guardResult) { ctx1.bb.emit(STORE_LOCAL(tmp)) @@ -521,7 +521,7 @@ abstract class GenICode extends SubComponent { case Bind(name, _) => val exception = ctx.method.addLocal(new Local(pat.symbol, toTypeKind(pat.symbol.tpe), false)) - (pat.symbol.tpe.symbol, kind, { + (pat.symbol.tpe.typeSymbol, kind, { ctx: Context => if (settings.Xdce.value) ctx.bb.emit(LOAD_EXCEPTION(), pat.pos) @@ -619,7 +619,7 @@ abstract class GenICode extends SubComponent { assert(false) /* Erasure should have added an unboxing operation to prevent that. */ } else if (r.isValueType) - ctx.bb.emit(IS_INSTANCE(REFERENCE(definitions.boxedClass(r.toType.symbol)))) + ctx.bb.emit(IS_INSTANCE(REFERENCE(definitions.boxedClass(r.toType.typeSymbol)))) else genCast(l, r, ctx1, cast); @@ -822,8 +822,8 @@ abstract class GenICode extends SubComponent { val hostClass = fun match { case Select(qualifier, _) - if (qualifier.tpe.symbol != definitions.ArrayClass) => - qualifier.tpe.symbol + if (qualifier.tpe.typeSymbol != definitions.ArrayClass) => + qualifier.tpe.typeSymbol case _ => sym.owner } if (settings.debug.value && hostClass != sym.owner) @@ -1433,8 +1433,8 @@ abstract class GenICode extends SubComponent { else ((sym isNonBottomSubClass definitions.BoxedNumberClass) || (!forMSIL && (sym isNonBottomSubClass BoxedCharacterClass))) - val lsym = l.tpe.symbol - val rsym = r.tpe.symbol + val lsym = l.tpe.typeSymbol + val rsym = r.tpe.typeSymbol (lsym == definitions.ObjectClass) || (rsym == definitions.ObjectClass) || (lsym != rsym) && (isBoxed(lsym) || isBoxed(rsym)) diff --git a/src/compiler/scala/tools/nsc/backend/icode/TypeKinds.scala b/src/compiler/scala/tools/nsc/backend/icode/TypeKinds.scala index 5ba58a0b56..5e552faddb 100644 --- a/src/compiler/scala/tools/nsc/backend/icode/TypeKinds.scala +++ b/src/compiler/scala/tools/nsc/backend/icode/TypeKinds.scala @@ -93,7 +93,7 @@ trait TypeKinds { self: ICodes => def lub(a: TypeKind, b: TypeKind): TypeKind = { def lub0(t1: Type, t2: Type): Type = { val lubTpe = global.lub(t1 :: t2 :: Nil) - assert(lubTpe.symbol.isClass, + assert(lubTpe.typeSymbol.isClass, "Least upper bound of " + t1 + " and " + t2 + " is not a class: " + lubTpe) lubTpe } diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala index 621db1a067..c28fcd6c72 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala @@ -165,13 +165,13 @@ abstract class GenJVM extends SubComponent { if (parents.length > 1) { ifaces = new Array[String](parents.length - 1) - parents.drop(1).map((s) => javaName(s.symbol)).copyToArray(ifaces, 0) + parents.drop(1).map((s) => javaName(s.typeSymbol)).copyToArray(ifaces, 0) () } jclass = fjbgContext.JClass(javaFlags(c.symbol), name, - javaName(parents(0).symbol), + javaName(parents(0).typeSymbol), ifaces, c.cunit.source.toString) @@ -220,7 +220,7 @@ abstract class GenJVM extends SubComponent { for (val AnnotationInfo(ThrowsAttr, List(exc), _) <- excs.removeDuplicates) { buf.putShort( cpool.addClass( - javaName(exc.constant.get.typeValue.symbol)).shortValue) + javaName(exc.constant.get.typeValue.typeSymbol)).shortValue) nattr = nattr + 1 } @@ -282,7 +282,7 @@ abstract class GenJVM extends SubComponent { for (attrib@AnnotationInfo(typ, consts, nvPairs) <- attributes; if attrib.isConstant; - if typ.symbol isNonBottomSubClass definitions.ClassfileAnnotationClass) { + if typ.typeSymbol isNonBottomSubClass definitions.ClassfileAnnotationClass) { nattr = nattr + 1 val jtype = javaType(typ) buf.putShort(cpool.addUtf8(jtype.getSignature()).toShort) @@ -319,7 +319,7 @@ abstract class GenJVM extends SubComponent { val attributes = for (attrs <- pattrss) yield for (attr @ AnnotationInfo(tpe, _, _) <- attrs; if attr.isConstant; - if tpe.symbol isNonBottomSubClass definitions.ClassfileAnnotationClass) yield attr; + if tpe.typeSymbol isNonBottomSubClass definitions.ClassfileAnnotationClass) yield attr; if (attributes.forall(_.isEmpty)) return; val buf: ByteBuffer = ByteBuffer.allocate(2048) @@ -804,13 +804,13 @@ abstract class GenJVM extends SubComponent { } case BOX(kind) => - val boxedType = definitions.boxedClass(kind.toType.symbol) + val boxedType = definitions.boxedClass(kind.toType.typeSymbol) val mtype = new JMethodType(javaType(boxedType), Array(javaType(kind))) jcode.emitINVOKESTATIC(BoxesUtility, "boxTo" + boxedType.nameString, mtype) case UNBOX(kind) => val mtype = new JMethodType(javaType(kind), Array(JObjectType.JAVA_LANG_OBJECT)) - jcode.emitINVOKESTATIC(BoxesUtility, "unboxTo" + kind.toType.symbol.nameString, mtype) + jcode.emitINVOKESTATIC(BoxesUtility, "unboxTo" + kind.toType.typeSymbol.nameString, mtype) case NEW(REFERENCE(cls)) => val className = javaName(cls) |