Files
kotlin-fork/core/compiler.common
Dmitriy Novozhilov c44993e586 [FE] Use FQN instead of KClass in TypeRegistry
TypeRegistry is the static map which contains mapping between type of
  session component and its index in the session array. Originally
  `KClass` of a component was used as a key in this map, which worked
  pretty well for compiler components. But there was a problem with
  components from plugins and Kotlin daemon: in compilation with daemon
  we keep TypeRegistry between compilations. But for each compilation
  we load plugins from jar, which brings to the situation when after N
  compilations there is N entries in TypeRegistry map with different
  KClass'es for same extension component. This not only causes AIOBE
  but also introduces the memory leak, because we keep reference to
  KClass which is not used anymore

So to fix this issue it's enough to just store FQN of component in
  TypeRegistry instead of KClass

There are no tests in this commit, but they will be added in next
  commit relevant to scripting. With those commits we will have gradle
  integration tests which uses Kotlin compiler daemon and registers
  a compiler plugin for scripting

^KT-55023 Fixed
2022-12-21 10:33:03 +00:00
..