diff options
author | Michał Pociecha <michal.pociecha@gmail.com> | 2015-05-02 15:56:42 +0200 |
---|---|---|
committer | Michał Pociecha <michal.pociecha@gmail.com> | 2015-05-03 10:23:39 +0200 |
commit | 6097fe5d8434f8e65595b74aa01cd6bf610c8f48 (patch) | |
tree | b1a8c7e93fb625eed2fa2db4c1d4ae5725b9e3c7 /src/compiler/scala/tools/nsc/symtab/classfile | |
parent | 454a1dcf0c3568ea99f669529b4819782b8b2f00 (diff) | |
download | scala-6097fe5d8434f8e65595b74aa01cd6bf610c8f48.tar.gz scala-6097fe5d8434f8e65595b74aa01cd6bf610c8f48.tar.bz2 scala-6097fe5d8434f8e65595b74aa01cd6bf610c8f48.zip |
SI-8679 Add support for ScalaLongSignature attribute in scalap
scalap didn't support really big class files. It was returning an
empty String for such files. The reason was that there were only
ScalaSignatures taken into account.
This commit adds support for ScalaLongSignature. We try to get such
an attribute when we didn't find ScalaSignature. Also there's added
an additional case to the logic retrieving bytes for a signature.
Since ScalaLongSignature can contain many parts, we have to merge
their byte arrays.
Changes are tested by a new partest-based test. These two files are
really big, but it was required (t8679.scala is a reduced version of
BigScalaClass - an example attached to JIRA).
There are also added TODOs with a JIRA ticket: We have three places,
where we process Scala signatures. In the future it would be better to
reuse some common logic, if it's possible.
Diffstat (limited to 'src/compiler/scala/tools/nsc/symtab/classfile')
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala index a59b9d3f48..0374e1e2e6 100644 --- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala +++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala @@ -923,6 +923,7 @@ abstract class ClassfileParser { Some(ScalaSigBytes(pool.getBytes(entries.toList))) } + // TODO SI-9296 duplicated code, refactor /* Parse and return a single annotation. If it is malformed, * return None. */ |