diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 13d6655cce8..1be8a5b2e25 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -5,7 +5,6 @@
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index cc9af29b280..67a3045b6a7 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -46,7 +46,6 @@
-
diff --git a/build.xml b/build.xml
index bc398420f27..b252a2e4ff4 100644
--- a/build.xml
+++ b/build.xml
@@ -795,28 +795,17 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
@@ -829,20 +818,20 @@
-
+
+
+
+
+
-
+
-
+
@@ -850,7 +839,7 @@
-
+
@@ -864,17 +853,19 @@
-
+
+
+
+
+
-
+ depends="builtins,stdlib,reflection,pack-runtime,pack-runtime-sources"/>
"),
- Collections.emptyList(), JavaToKotlinClassMap.INSTANCE);
-
- PackageFragmentDescriptor kotlinJvmInternal =
- new MutablePackageFragmentDescriptor(fakeModule, new FqName("kotlin.jvm.internal"));
- PackageFragmentDescriptor kotlinReflectJvmInternal =
- new MutablePackageFragmentDescriptor(fakeModule, new FqName("kotlin.reflect.jvm.internal"));
+ PackageFragmentDescriptor kotlinJvmInternal = new MutablePackageFragmentDescriptor(
+ createJavaModule(""),
+ new FqName("kotlin.jvm.internal")
+ );
this.functionImpl = createClass(kotlinJvmInternal, "FunctionImpl", "out R");
+ this.memberFunctionImpl = createClass(kotlinJvmInternal, "MemberFunctionImpl", "in T", "out R");
this.extensionFunctionImpl = createClass(kotlinJvmInternal, "ExtensionFunctionImpl", "in T", "out R");
- this.kFunctionImpl = createClass(kotlinReflectJvmInternal, "KFunctionImpl", "out R");
- this.kExtensionFunctionImpl = createClass(kotlinReflectJvmInternal, "KExtensionFunctionImpl", "in T", "out R");
- this.kMemberFunctionImpl = createClass(kotlinReflectJvmInternal, "KMemberFunctionImpl", "in T", "out R");
}
@NotNull
@@ -67,8 +62,8 @@ public class JvmRuntimeTypes {
@NotNull String name,
@NotNull String... typeParameters
) {
- MutableClassDescriptor descriptor = new MutableClassDescriptor(packageFragment, packageFragment.getMemberScope(),
- ClassKind.CLASS, false, Name.identifier(name), SourceElement.NO_SOURCE);
+ MutableClassDescriptor descriptor = new MutableClassDescriptor(packageFragment, packageFragment.getMemberScope(), ClassKind.CLASS,
+ false, Name.identifier(name), SourceElement.NO_SOURCE);
List typeParameterDescriptors = new ArrayList(typeParameters.length);
for (int i = 0; i < typeParameters.length; i++) {
String[] s = typeParameters[i].split(" ");
@@ -135,24 +130,24 @@ public class JvmRuntimeTypes {
ClassDescriptor classDescriptor;
JetType receiverType;
if (extensionReceiver != null) {
- classDescriptor = kExtensionFunctionImpl;
+ classDescriptor = extensionFunctionImpl;
receiverType = extensionReceiver.getType();
typeArguments.add(new TypeProjectionImpl(receiverType));
}
else if (dispatchReceiver != null) {
- classDescriptor = kMemberFunctionImpl;
+ classDescriptor = memberFunctionImpl;
receiverType = dispatchReceiver.getType();
typeArguments.add(new TypeProjectionImpl(receiverType));
}
else {
- classDescriptor = kFunctionImpl;
+ classDescriptor = functionImpl;
receiverType = null;
}
//noinspection ConstantConditions
typeArguments.add(new TypeProjectionImpl(descriptor.getReturnType()));
- JetType kFunctionImplType = new JetTypeImpl(
+ JetType functionImplType = new JetTypeImpl(
classDescriptor.getDefaultType().getAnnotations(),
classDescriptor.getTypeConstructor(),
false,
@@ -168,6 +163,6 @@ public class JvmRuntimeTypes {
extensionReceiver != null
);
- return Arrays.asList(kFunctionImplType, kFunctionType);
+ return Arrays.asList(functionImplType, kFunctionType);
}
}
diff --git a/core/reflection.stub.jvm/reflection.stub.jvm.iml b/core/reflection.stub.jvm/reflection.stub.jvm.iml
deleted file mode 100644
index 5b59df0d759..00000000000
--- a/core/reflection.stub.jvm/reflection.stub.jvm.iml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/core/reflection.stub.jvm/src/kotlin/reflect/jvm/internal/KFunctionImpl.java b/core/runtime.jvm/src/kotlin/jvm/internal/MemberFunctionImpl.kt
similarity index 73%
rename from core/reflection.stub.jvm/src/kotlin/reflect/jvm/internal/KFunctionImpl.java
rename to core/runtime.jvm/src/kotlin/jvm/internal/MemberFunctionImpl.kt
index d4265785999..55f45cd53eb 100644
--- a/core/reflection.stub.jvm/src/kotlin/reflect/jvm/internal/KFunctionImpl.java
+++ b/core/runtime.jvm/src/kotlin/jvm/internal/MemberFunctionImpl.kt
@@ -14,9 +14,10 @@
* limitations under the License.
*/
-package kotlin.reflect.jvm.internal;
+package kotlin.jvm.internal
-import kotlin.jvm.internal.FunctionImpl;
+import java.io.Serializable
-public abstract class KFunctionImpl extends FunctionImpl {
+public abstract class MemberFunctionImpl : Serializable {
+ override fun toString() = "${(this as Object).getClass().getGenericInterfaces()[0]}"
}