Generate reflection info to classes for function references

The information includes the owner (class, package, script, or null for local
functions) and the JVM signature -- this information will be used by reflection
to locate the symbol
This commit is contained in:
Alexander Udalov
2015-06-10 03:20:37 +03:00
parent bc168c0cba
commit ab297a4da0
9 changed files with 148 additions and 20 deletions
@@ -30,8 +30,9 @@ import org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.PrimitiveType.
import java.lang.reflect.Field
import java.lang.reflect.Method
import kotlin.reflect.KotlinReflectionInternalError
import kotlin.reflect.KDeclarationContainer
abstract class KCallableContainerImpl {
abstract class KCallableContainerImpl : KDeclarationContainer {
// Note: this is stored here on a soft reference to prevent GC from destroying the weak reference to it in the moduleByClassLoader cache
val moduleData by ReflectProperties.lazySoft {
jClass.getOrCreateModule()
@@ -18,7 +18,4 @@ package kotlin.reflect.jvm.internal
import kotlin.jvm.internal.FunctionImpl
/**
* @suppress
*/
public abstract class KFunctionImpl<out R> : FunctionImpl()
abstract class KFunctionImpl<out R> : FunctionImpl()