diff options
author | Martin Odersky <odersky@gmail.com> | 2010-01-19 16:44:20 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2010-01-19 16:44:20 +0000 |
commit | c4cacc0edfdf6f3f13afce16ec59ca2b7a25c82b (patch) | |
tree | a36b058b4b400cb6863becae5fd07c4fb46a90eb /src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala | |
parent | 6e0b81844bc7b63a971359a9550b1d68c0f63d52 (diff) | |
download | scala-c4cacc0edfdf6f3f13afce16ec59ca2b7a25c82b.tar.gz scala-c4cacc0edfdf6f3f13afce16ec59ca2b7a25c82b.tar.bz2 scala-c4cacc0edfdf6f3f13afce16ec59ca2b7a25c82b.zip |
more performance improvements; eliminated mk......
more performance improvements; eliminated mk...Type function in Types.
Diffstat (limited to 'src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala index 5c4679625b..d248567a16 100644 --- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala +++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala @@ -508,7 +508,7 @@ abstract class ClassfileParser { val info = pool.getType(in.nextChar) val sym = getOwner(jflags) .newValue(NoPosition, name).setFlag(sflags) - sym.setInfo(if ((jflags & JAVA_ACC_ENUM) == 0) info else mkConstantType(Constant(sym))) + sym.setInfo(if ((jflags & JAVA_ACC_ENUM) == 0) info else ConstantType(Constant(sym))) setPrivateWithin(sym, jflags) parseAttributes(sym, info) getScope(jflags).enter(sym) @@ -620,12 +620,12 @@ abstract class ClassfileParser { case variance @ ('+' | '-' | '*') => index += 1 val bounds = variance match { - case '+' => mkTypeBounds(definitions.NothingClass.tpe, - sig2type(tparams, skiptvs)) - case '-' => mkTypeBounds(sig2type(tparams, skiptvs), - definitions.AnyClass.tpe) - case '*' => mkTypeBounds(definitions.NothingClass.tpe, - definitions.AnyClass.tpe) + case '+' => TypeBounds(definitions.NothingClass.tpe, + sig2type(tparams, skiptvs)) + case '-' => TypeBounds(sig2type(tparams, skiptvs), + definitions.AnyClass.tpe) + case '*' => TypeBounds(definitions.NothingClass.tpe, + definitions.AnyClass.tpe) } val newtparam = sym.newExistential(sym.pos, "?"+i) setInfo bounds existentials += newtparam @@ -702,7 +702,7 @@ abstract class ClassfileParser { if (sig(index) != ':') // guard against empty class bound ts += objToAny(sig2type(tparams, skiptvs)) } - mkTypeBounds(definitions.NothingClass.tpe, intersectionType(ts.toList, sym)) + TypeBounds(definitions.NothingClass.tpe, intersectionType(ts.toList, sym)) } var tparams = classTParams @@ -781,7 +781,7 @@ abstract class ClassfileParser { case nme.ConstantValueATTR => val c = pool.getConstant(in.nextChar) val c1 = convertTo(c, symtype) - if (c1 ne null) sym.setInfo(mkConstantType(c1)) + if (c1 ne null) sym.setInfo(ConstantType(c1)) else println("failure to convert " + c + " to " + symtype); //debug case nme.ScalaSignatureATTR => unpickler.unpickle(in.buf, in.bp, clazz, staticModule, in.file.toString()) |