diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2015-08-20 12:28:30 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2015-08-27 09:23:46 +0200 |
commit | 617c0923bd6b5d1642d04a03508f063d503776b6 (patch) | |
tree | 3fe04388dbbf0d2fd0d3ca5dad482099134f4882 /src/compiler/scala/tools/nsc/backend/jvm/opt/ByteCodeRepository.scala | |
parent | 3deb2242cba85a618da88dd98846290f359ab3a6 (diff) | |
download | scala-617c0923bd6b5d1642d04a03508f063d503776b6.tar.gz scala-617c0923bd6b5d1642d04a03508f063d503776b6.tar.bz2 scala-617c0923bd6b5d1642d04a03508f063d503776b6.zip |
Store SAM information in ClassBTypes
If a class (trait) is a SAM type, store the name and descriptor of the
SAM in the ClassBType's InlineInfo.
Diffstat (limited to 'src/compiler/scala/tools/nsc/backend/jvm/opt/ByteCodeRepository.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/jvm/opt/ByteCodeRepository.scala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/opt/ByteCodeRepository.scala b/src/compiler/scala/tools/nsc/backend/jvm/opt/ByteCodeRepository.scala index dd1d70c65f..4492d0baf5 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/opt/ByteCodeRepository.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/opt/ByteCodeRepository.scala @@ -132,6 +132,11 @@ class ByteCodeRepository[BT <: BTypes](val classPath: ClassFileLookup[AbstractFi * The method node for a method matching `name` and `descriptor`, accessed in class `ownerInternalNameOrArrayDescriptor`. * The declaration of the method may be in one of the parents. * + * TODO: make sure we always return the right method, the one being invoked. write tests. + * - if there's an abstract and a concrete one. could possibly somehow the abstract be returned? + * - with traits and default methods, if there is more than one default method inherited and + * no override: what should be returned? We should not just inline one of the two. + * * @return The [[MethodNode]] of the requested method and the [[InternalName]] of its declaring * class, or an error message if the method could not be found. */ |