Skip to content

Commit ada8d91

Browse files
committed
Merge pull request scala#3289 from soc/SI-7492-redux
SI-7492 Make scala.runtime.MethodCache private[scala]
2 parents fa62c04 + bbe9638 commit ada8d91

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/library/scala/runtime/MethodCache.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import scala.annotation.tailrec
2222
* generated per call point, and will uniquely relate to the method called
2323
* at that point, making the method name and argument types irrelevant. */
2424
/* TODO: if performance is acceptable, PolyMethodCache should be made generic on the method type */
25-
sealed abstract class MethodCache {
25+
private[scala] sealed abstract class MethodCache {
2626
/** Searches for a cached method in the `MethodCache` chain that
2727
* is compatible with receiver class `forReceiver`. If none is cached,
2828
* `null` is returned. If `null` is returned, find's caller should look-
@@ -32,7 +32,7 @@ sealed abstract class MethodCache {
3232
def add(forReceiver: JClass[_], forMethod: JMethod): MethodCache
3333
}
3434

35-
final class EmptyMethodCache extends MethodCache {
35+
private[scala] final class EmptyMethodCache extends MethodCache {
3636

3737
def find(forReceiver: JClass[_]): JMethod = null
3838

@@ -41,7 +41,7 @@ final class EmptyMethodCache extends MethodCache {
4141

4242
}
4343

44-
final class MegaMethodCache(
44+
private[scala] final class MegaMethodCache(
4545
private[this] val forName: String,
4646
private[this] val forParameterTypes: Array[JClass[_]]
4747
) extends MethodCache {
@@ -53,7 +53,7 @@ final class MegaMethodCache(
5353

5454
}
5555

56-
final class PolyMethodCache(
56+
private[scala] final class PolyMethodCache(
5757
private[this] val next: MethodCache,
5858
private[this] val receiver: JClass[_],
5959
private[this] val method: JMethod,

0 commit comments

Comments
 (0)