[Swift Export] KT-63516
Add a sir-compiler-bridge module that adds Kotlin and C bridges for SIR. As SIR is still WIP, the module accepts `BridgeRequest` instances instead of SIR elements.
This commit is contained in:
committed by
Space Team
parent
7c15e3f229
commit
fe9ab0a1fc
@@ -0,0 +1,7 @@
|
||||
#include <stdint.h>
|
||||
|
||||
int32_t a(int8_t p0, int16_t p1, int32_t p2, int64_t p3);
|
||||
|
||||
uint32_t b(uint8_t p0, uint16_t p1, uint32_t p2, uint64_t p3);
|
||||
|
||||
_Bool c(_Bool p0);
|
||||
@@ -0,0 +1,20 @@
|
||||
import kotlin.native.internal.ExportForCppRuntime
|
||||
|
||||
@ExportForCppRuntime("a")
|
||||
public fun a(p0: Byte, p1: Short, p2: Int, p3: Long): Int {
|
||||
val result = pkg.a(p0, p1, p2, p3)
|
||||
return result
|
||||
}
|
||||
|
||||
@ExportForCppRuntime("b")
|
||||
public fun b(p0: UByte, p1: UShort, p2: UInt, p3: ULong): UInt {
|
||||
val result = pkg.b(p0, p1, p2, p3)
|
||||
return result
|
||||
}
|
||||
|
||||
@ExportForCppRuntime("c")
|
||||
public fun c(p0: Boolean): Boolean {
|
||||
val result = pkg.c(p0)
|
||||
return result
|
||||
}
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
fqName=pkg.a
|
||||
bridgeName=a
|
||||
returnType=int
|
||||
parameters=p0:byte p1:short p2:int p3:long
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
fqName=pkg.b
|
||||
bridgeName=b
|
||||
returnType=uint
|
||||
parameters=p0:ubyte p1:ushort p2:uint p3:ulong
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
fqName=pkg.c
|
||||
bridgeName=c
|
||||
returnType=boolean
|
||||
parameters=p0:boolean
|
||||
Reference in New Issue
Block a user