summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/backend/jvm/BTypesFromSymbols.scala
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2015-02-06 13:55:49 +0100
committerLukas Rytz <lukas.rytz@gmail.com>2015-03-11 15:18:22 -0700
commit57c07204ca452564b930085cfa9e8b099e45b2a9 (patch)
tree00b74b093e1201c31406d256a138beca4c1c71a0 /src/compiler/scala/tools/nsc/backend/jvm/BTypesFromSymbols.scala
parenta4e71b188fe8069b4de3a0753defb624b8b1eb8c (diff)
downloadscala-57c07204ca452564b930085cfa9e8b099e45b2a9.tar.gz
scala-57c07204ca452564b930085cfa9e8b099e45b2a9.tar.bz2
scala-57c07204ca452564b930085cfa9e8b099e45b2a9.zip
Limit the size of the ByteCodeRepository cache
I observed cases (eg Scaladoc tests) where we end up with 17k+ ClassNodes, which makes 500 MB.
Diffstat (limited to 'src/compiler/scala/tools/nsc/backend/jvm/BTypesFromSymbols.scala')
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/BTypesFromSymbols.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/BTypesFromSymbols.scala b/src/compiler/scala/tools/nsc/backend/jvm/BTypesFromSymbols.scala
index a217e54ed8..b90030dd8c 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/BTypesFromSymbols.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/BTypesFromSymbols.scala
@@ -413,7 +413,8 @@ class BTypesFromSymbols[G <: Global](val global: G) extends BTypes {
// phase travel required, see implementation of `compiles`. for nested classes, it checks if the
// enclosingTopLevelClass is being compiled. after flatten, all classes are considered top-level,
// so `compiles` would return `false`.
- if (exitingPickler(currentRun.compiles(classSym))) buildFromSymbol
+ if (exitingPickler(currentRun.compiles(classSym))) buildFromSymbol // InlineInfo required for classes being compiled, we have to create the classfile attribute
+ else if (!inlinerEnabled) BTypes.EmptyInlineInfo // For other classes, we need the InlineInfo only inf the inliner is enabled.
else {
// For classes not being compiled, the InlineInfo is read from the classfile attribute. This
// fixes an issue with mixed-in methods: the mixin phase enters mixin methods only to class