Remove obsolete code used for Objective-C interop

This commit is contained in:
Svyatoslav Scherbina
2018-06-25 19:25:07 +03:00
committed by SvyatoslavScherbina
parent 338152263a
commit 35be7055e1
2 changed files with 0 additions and 38 deletions
@@ -174,16 +174,6 @@ external fun CreateNSStringFromKString(str: String?): NativePtr
@SymbolName("Kotlin_Interop_CreateKStringFromNSString")
external fun CreateKStringFromNSString(ptr: NativePtr): String?
@SymbolName("Kotlin_Interop_ObjCToString")
private external fun ObjCToString(ptr: NativePtr): String
@SymbolName("Kotlin_Interop_ObjCHashCode")
private external fun ObjCHashCode(ptr: NativePtr): Int
@SymbolName("Kotlin_Interop_ObjCEquals")
private external fun ObjCEquals(ptr: NativePtr, otherPtr: NativePtr): Boolean
// Objective-C runtime:
@SymbolName("objc_retainAutoreleaseReturnValue")
-28
View File
@@ -77,19 +77,6 @@ OBJ_GETTER(Kotlin_Interop_CreateKStringFromNSString, NSString* str) {
RETURN_OBJ(result->obj());
}
OBJ_GETTER(Kotlin_Interop_ObjCToString, id <NSObject> ptr) {
RETURN_RESULT_OF(Kotlin_Interop_CreateKStringFromNSString, ptr.description);
}
KInt Kotlin_Interop_ObjCHashCode(id <NSObject> ptr) {
uint64_t hash = ptr.hash;
return (KInt)(hash ^ (hash >> 32));
}
KBoolean Kotlin_Interop_ObjCEquals(id <NSObject> ptr, id otherPtr) {
return [ptr isEqual:otherPtr];
}
// Note: this body is used for init methods with signatures differing from this;
// it is correct on arm64 and x86_64, because the body uses only the first two arguments which are fixed,
// and returns pointers.
@@ -223,21 +210,6 @@ OBJ_GETTER(Kotlin_Interop_CreateKStringFromNSString, void* str) {
RETURN_OBJ(nullptr);
}
OBJ_GETTER(Kotlin_Interop_ObjCToString, KNativePtr ptr) {
RuntimeAssert(false, "Objective-C interop is disabled");
RETURN_OBJ(nullptr);
}
KInt Kotlin_Interop_ObjCHashCode(KNativePtr ptr) {
RuntimeAssert(false, "Objective-C interop is disabled");
return 0;
}
KBoolean Kotlin_Interop_ObjCEquals(KNativePtr ptr, KNativePtr otherPtr) {
RuntimeAssert(false, "Objective-C interop is disabled");
return 0;
}
void* Kotlin_Interop_createKotlinObjectHolder(KRef any) {
RuntimeAssert(false, "Objective-C interop is disabled");
return nullptr;