diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2014-07-01 16:28:24 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2014-09-01 14:29:17 +0200 |
commit | e3107465c3e8ac80d1cc6a759e2f3298c2531424 (patch) | |
tree | 5aacf420f8845cabed5088b2209ed1e5a9b74c51 /versions.properties | |
parent | 2606bd921e434a6d8edb21f7f04dbfb10045026e (diff) | |
download | scala-e3107465c3e8ac80d1cc6a759e2f3298c2531424.tar.gz scala-e3107465c3e8ac80d1cc6a759e2f3298c2531424.tar.bz2 scala-e3107465c3e8ac80d1cc6a759e2f3298c2531424.zip |
Fix InnerClass / EnclosingMethod attributes
This commit seems bigger than it is. Most of it is tests, and moving
some code around. The actual changes are small, but a bit subtle.
The InnerClass and EnclosingMethod attributes should now be close to
the JVM spec (which is summarized in BTypes.scala). New tests make
sure that changes to these attributes, and changes to the way Java
reflection sees Scala classfiles, don't go unnoticed.
A new file, BCodeAsmCommon, holds code that's shared between the two
backend (it could hold more, future work).
In general, the difficulty with emitting InnerClass / EnclosingMethod
is that we need to find out source-level properties. We need to make
sure to do enough phase-travelling, and work around destructive
changes to the ownerchain in lambdalift (we use originalOwner a lot).
The change to JavaMirrors is prompted by the change to the
EnclosingMethod attribute, which changes Java reflection's answer to
getEnclosingMethod and getEnclosingConstructor. Classes defined in
field initializers no longer have an enclosing method, just an
enclosing class, which broke an assumption in JavaMirrors.
There's one change in erasure. Before this change, when an object
declaration implements / overrides a method, and a bridge is required,
then the bridge method was actually a ModuleSymbol (it would get the
lateMETHOD flag and be emitted as a method anyway). This is confusing,
when iterating through the members of a class, you can find two
modules with the same name, and one of them doesn't have a module
class. Now, such bridge methods will be MethodSymbols.
Removed Symbol.originalEnclosingMethod, that is a backend thing and
doesn't need to live in the symbol API.
Diffstat (limited to 'versions.properties')
-rw-r--r-- | versions.properties | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/versions.properties b/versions.properties index cd53a343f6..454df6b757 100644 --- a/versions.properties +++ b/versions.properties @@ -27,7 +27,7 @@ actors-migration.version.number=1.1.0 jline.version=2.12 # external modules, used internally (not shipped) -partest.version.number=1.0.0 +partest.version.number=1.0.1 scalacheck.version.number=1.11.4 # TODO: modularize the compiler |