diff options
author | Josh Suereth <Joshua.Suereth@gmail.com> | 2012-08-01 13:08:49 -0700 |
---|---|---|
committer | Josh Suereth <Joshua.Suereth@gmail.com> | 2012-08-01 13:08:49 -0700 |
commit | cc1e50531bf7957bf05fff21d87a04ac550ccb53 (patch) | |
tree | 1a455bc33824b322cceea085e0c9ab3f50ffadae /src | |
parent | e86e95a2434962b46ca3f9393a7f820d3f99da48 (diff) | |
parent | f0f4fedd503b2d332af4ff24d1934f150f8c79fc (diff) | |
download | scala-cc1e50531bf7957bf05fff21d87a04ac550ccb53.tar.gz scala-cc1e50531bf7957bf05fff21d87a04ac550ccb53.tar.bz2 scala-cc1e50531bf7957bf05fff21d87a04ac550ccb53.zip |
Merge pull request #1032 from hubertp/issue/asm-long-signatures
I actually managed to hit the limit of Scala signature annotation not fi...
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala index e590a0b691..f681de93b6 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala @@ -993,8 +993,13 @@ abstract class GenASM extends SubComponent with BytecodeWriters { case sb@ScalaSigBytes(bytes) => // see http://www.scala-lang.org/sid/10 (Storage of pickled Scala signatures in class files) // also JVMS Sec. 4.7.16.1 The element_value structure and JVMS Sec. 4.4.7 The CONSTANT_Utf8_info Structure. - val assocValue = (if(sb.fitsInOneString) strEncode(sb) else arrEncode(sb)) - av.visit(name, assocValue) + if (sb.fitsInOneString) + av.visit(name, strEncode(sb)) + else { + val arrAnnotV: asm.AnnotationVisitor = av.visitArray(name) + for(arg <- arrEncode(sb)) { arrAnnotV.visit(name, arg) } + arrAnnotV.visitEnd() + } // for the lazy val in ScalaSigBytes to be GC'ed, the invoker of emitAnnotations() should hold the ScalaSigBytes in a method-local var that doesn't escape. case ArrayAnnotArg(args) => |