KT-65123: move Swift Export Compiler Plugin into swift-export-standalone module
Merge-request: KT-MR-14031 Merged-by: Artem Olkov <artem.olkov@jetbrains.com>
This commit is contained in:
+3
@@ -0,0 +1,3 @@
|
||||
#include <stdint.h>
|
||||
|
||||
int32_t __root___meaningOfLife();
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
import kotlin.native.internal.ExportedBridge
|
||||
|
||||
@ExportedBridge("__root___meaningOfLife")
|
||||
public fun __root___meaningOfLife(): Int {
|
||||
val result = meaningOfLife()
|
||||
return result
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
public func meaningOfLife() -> Swift.Int32 {
|
||||
return __root___meaningOfLife()
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
fun meaningOfLife(): Int = 420
|
||||
@@ -0,0 +1,9 @@
|
||||
#include <stdint.h>
|
||||
|
||||
int32_t namespace1_main_foobar(int32_t param);
|
||||
|
||||
int32_t namespace1_bar();
|
||||
|
||||
int32_t namespace2_foo();
|
||||
|
||||
int32_t __root___foo();
|
||||
@@ -0,0 +1,25 @@
|
||||
import kotlin.native.internal.ExportedBridge
|
||||
|
||||
@ExportedBridge("namespace1_main_foobar")
|
||||
public fun namespace1_main_foobar(param: Int): Int {
|
||||
val result = namespace1.main.foobar(param)
|
||||
return result
|
||||
}
|
||||
|
||||
@ExportedBridge("namespace1_bar")
|
||||
public fun namespace1_bar(): Int {
|
||||
val result = namespace1.bar()
|
||||
return result
|
||||
}
|
||||
|
||||
@ExportedBridge("namespace2_foo")
|
||||
public fun namespace2_foo(): Int {
|
||||
val result = namespace2.foo()
|
||||
return result
|
||||
}
|
||||
|
||||
@ExportedBridge("__root___foo")
|
||||
public fun __root___foo(): Int {
|
||||
val result = foo()
|
||||
return result
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
enum namespace1 {
|
||||
enum main {
|
||||
public static func foobar(
|
||||
param: Swift.Int32
|
||||
) -> Swift.Int32 {
|
||||
return namespace1_main_foobar(param)
|
||||
}
|
||||
}
|
||||
public static func bar() -> Swift.Int32 {
|
||||
return namespace1_bar()
|
||||
}
|
||||
}
|
||||
|
||||
enum namespace2 {
|
||||
public static func foo() -> Swift.Int32 {
|
||||
return namespace2_foo()
|
||||
}
|
||||
}
|
||||
|
||||
public func foo() -> Swift.Int32 {
|
||||
return __root___foo()
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package namespace1
|
||||
|
||||
fun bar(): Int = 123
|
||||
@@ -0,0 +1,3 @@
|
||||
package namespace2
|
||||
|
||||
fun foo(): Int = 321
|
||||
@@ -0,0 +1,5 @@
|
||||
package namespace1.main
|
||||
|
||||
import namespace1.*
|
||||
import namespace2.*
|
||||
fun foobar(param: Int): Int = foo() + bar() + param
|
||||
@@ -0,0 +1 @@
|
||||
fun foo(): Int = 123
|
||||
Reference in New Issue
Block a user