diff options
author | Martin Odersky <odersky@gmail.com> | 2006-05-05 15:30:46 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2006-05-05 15:30:46 +0000 |
commit | b1e41df94da49a57f382776c51acb2b0add80594 (patch) | |
tree | 70b1716caffadc7265f3fca755489feb1702de7c /src/compiler | |
parent | 12a9f76471f19c8b134b3ea5bba32042020d6ca6 (diff) | |
download | scala-b1e41df94da49a57f382776c51acb2b0add80594.tar.gz scala-b1e41df94da49a57f382776c51acb2b0add80594.tar.bz2 scala-b1e41df94da49a57f382776c51acb2b0add80594.zip |
Changed array unboxing to use classes rather th...
Changed array unboxing to use classes rather than strings.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/Erasure.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/Erasure.scala b/src/compiler/scala/tools/nsc/transform/Erasure.scala index 64474cb030..13d39c70e5 100644 --- a/src/compiler/scala/tools/nsc/transform/Erasure.scala +++ b/src/compiler/scala/tools/nsc/transform/Erasure.scala @@ -198,14 +198,17 @@ abstract class Erasure extends AddInterfaces with typechecker.Analyzer { gen.mkRuntimeCall(nme.booleanValue, List(tree1)) } else if (pt.symbol == ArrayClass) { val tree1 = adaptToType(tree, BoxedArrayClass.tpe); +/* val elemClass = pt.typeArgs.head.symbol; val elemTag = if (isValueClass(elemClass)) gen.mkRuntimeCall(newTermName(elemClass.name.toString() + "Tag"), List()) else Literal(signature(pt.typeArgs.head)); +*/ //System.out.println("unboxing " + tree + ":" + tree.tpe + " to " + pt);//DEBUG - gen.mkRuntimeCall(nme.arrayValue, List(tree1, elemTag)) + //gen.mkRuntimeCall(nme.arrayValue, List(tree1, elemTag)) + gen.mkRuntimeCall(nme.arrayValue, List(tree1, Literal(pt.typeArgs.head))) } else { assert(isNumericValueClass(pt.symbol)); val tree1 = adaptToType(tree, BoxedNumberClass.tpe); |