diff options
author | Paul Phillips <paulp@improving.org> | 2011-08-03 01:20:11 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-08-03 01:20:11 +0000 |
commit | 254ad276ca07c20a2782678a234c75ea1e7b9e83 (patch) | |
tree | 482d75d5deff39c165a6a1e37b12966e493ad68e /src/compiler/scala/reflect/internal/Symbols.scala | |
parent | cf4037a46ca3aabcff8e444d6814f5a91d023d4b (diff) | |
download | scala-254ad276ca07c20a2782678a234c75ea1e7b9e83.tar.gz scala-254ad276ca07c20a2782678a234c75ea1e7b9e83.tar.bz2 scala-254ad276ca07c20a2782678a234c75ea1e7b9e83.zip |
Took a different tack on avoiding unnecessarily...
Took a different tack on avoiding unnecessarily final bytecode methods
after discovering the inliner is not a fan of any reduction in finality.
Restored the application of the lateFINAL flag in makeNotPrivate, and
switched to sorting out who is ACC_FINAL and who isn't in genjvm. Review
by dragos.
Diffstat (limited to 'src/compiler/scala/reflect/internal/Symbols.scala')
-rw-r--r-- | src/compiler/scala/reflect/internal/Symbols.scala | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/compiler/scala/reflect/internal/Symbols.scala b/src/compiler/scala/reflect/internal/Symbols.scala index 3167bbc5de..30e9f38cbe 100644 --- a/src/compiler/scala/reflect/internal/Symbols.scala +++ b/src/compiler/scala/reflect/internal/Symbols.scala @@ -1644,13 +1644,13 @@ trait Symbols extends api.Symbols { self: SymbolTable => final def makeNotPrivate(base: Symbol) { if (this.isPrivate) { setFlag(notPRIVATE) - // Marking these methods final causes problems for proxies - // which use subclassing. If people write their code with no - // usage of final, we probably shouldn't introduce it ourselves - // unless we know it is safe. - // - // if (isMethod && !isDeferred) - // setFlag(lateFINAL) + // Marking these methods final causes problems for proxies which use subclassing. If people + // write their code with no usage of final, we probably shouldn't introduce it ourselves + // unless we know it is safe. ... Unfortunately if they aren't marked final the inliner + // thinks it can't inline them. So once again marking lateFINAL, and in genjvm we no longer + // generate ACC_FINAL on "final" methods which are actually lateFINAL. + if (isMethod && !isDeferred) + setFlag(lateFINAL) if (!isStaticModule && !isClassConstructor) { expandName(base) if (isModule) moduleClass.makeNotPrivate(base) |