summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/backend
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-09-16 12:55:10 +0200
committerJason Zaugg <jzaugg@gmail.com>2013-09-16 13:00:15 +0200
commit6e2cadb8bd42e0f4a6c777b11ff71f92cda368e8 (patch)
tree21bc371b4fa165c2b0ac882d8d9a2527d7d9ab13 /src/compiler/scala/tools/nsc/backend
parent6a81025ab2f9a798c8b12eea8f8e7e4e83d3b6e4 (diff)
downloadscala-6e2cadb8bd42e0f4a6c777b11ff71f92cda368e8.tar.gz
scala-6e2cadb8bd42e0f4a6c777b11ff71f92cda368e8.tar.bz2
scala-6e2cadb8bd42e0f4a6c777b11ff71f92cda368e8.zip
SI-7847 Static forwarders for case apply/unapply
These were excluded in f901816b3f because at the time they were compiler fiction and translated to calls to the case class constructor or accessors. But since they are now bona-fide methods (albeit still occasionally bypassed as an optimization), we can expose them conveniently to our Java brethren. The cut-and-pastiness of GenBCode starts to hinder maintenance. Here's a report of further duplication that we have to fix up post haste: https://gist.github.com/retronym/6334389
Diffstat (limited to 'src/compiler/scala/tools/nsc/backend')
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/BCodeHelpers.scala6
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/GenJVMASM.scala4
2 files changed, 3 insertions, 7 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/BCodeHelpers.scala b/src/compiler/scala/tools/nsc/backend/jvm/BCodeHelpers.scala
index 182209dfe6..eff7d3211e 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/BCodeHelpers.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/BCodeHelpers.scala
@@ -866,11 +866,7 @@ abstract class BCodeHelpers extends BCodeTypes with BytecodeWriters {
// a plain class lacking companion module, for details see `isCandidateForForwarders`).
// -----------------------------------------------------------------------------------------
- val ExcludedForwarderFlags = {
- import symtab.Flags._
- // Should include DEFERRED but this breaks findMember.
- ( CASE | SPECIALIZED | LIFTED | PROTECTED | STATIC | EXPANDEDNAME | BridgeAndPrivateFlags | MACRO )
- }
+ val ExcludedForwarderFlags = genASM.ExcludedForwarderFlags
/* Adds a @remote annotation, actual use unknown.
*
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenJVMASM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenJVMASM.scala
index 2c3bf26958..01c4ff5a52 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/GenJVMASM.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/GenJVMASM.scala
@@ -18,10 +18,10 @@ trait GenJVMASM {
import icodes._
import definitions._
- protected val ExcludedForwarderFlags = {
+ val ExcludedForwarderFlags = {
import Flags._
// Should include DEFERRED but this breaks findMember.
- ( CASE | SPECIALIZED | LIFTED | PROTECTED | STATIC | EXPANDEDNAME | BridgeAndPrivateFlags | MACRO )
+ ( SPECIALIZED | LIFTED | PROTECTED | STATIC | EXPANDEDNAME | BridgeAndPrivateFlags | MACRO )
}
protected def isJavaEntryPoint(icls: IClass) = {