@@ -53,45 +53,45 @@ namespace internal {
53
53
declare void @c_tcp_shutdown(%Int, %Stack)
54
54
"""
55
55
56
- extern async def connect(host: String, port: Int): Int =
56
+ extern def connect(host: String, port: Int) at async : Int =
57
57
llvm """
58
58
call void @c_tcp_connect(%Pos ${host}, %Int ${port}, %Stack %stack)
59
59
ret void
60
60
"""
61
61
62
62
/// The buffer must be kept alive by using it after the call
63
- extern async def read(handle: Int, buffer: ByteArray, offset: Int, size: Int): Int =
63
+ extern def read(handle: Int, buffer: ByteArray, offset: Int, size: Int) at async : Int =
64
64
llvm """
65
65
call void @c_tcp_read(%Int ${handle}, %Pos ${buffer}, %Int ${offset}, %Int ${size}, %Stack %stack)
66
66
ret void
67
67
"""
68
68
69
69
/// The buffer must be kept alive by using it after the call
70
- extern async def write(handle: Int, buffer: ByteArray, offset: Int, size: Int): Int =
70
+ extern def write(handle: Int, buffer: ByteArray, offset: Int, size: Int) at async : Int =
71
71
llvm """
72
72
call void @c_tcp_write(%Int ${handle}, %Pos ${buffer}, %Int ${offset}, %Int ${size}, %Stack %stack)
73
73
ret void
74
74
"""
75
75
76
- extern async def close(handle: Int): Unit =
76
+ extern def close(handle: Int) at async : Unit =
77
77
llvm """
78
78
call void @c_tcp_close(%Int ${handle}, %Stack %stack)
79
79
ret void
80
80
"""
81
81
82
- extern io def bind(host: String, port: Int): Int =
82
+ extern def bind(host: String, port: Int) at io : Int =
83
83
llvm """
84
84
%result = call %Int @c_tcp_bind(%Pos ${host}, %Int ${port})
85
85
ret %Int %result
86
86
"""
87
87
88
- extern async def listen(listener: Int, handler: Int => Unit at {io, async, global}): Int =
88
+ extern def listen(listener: Int, handler: Int => Unit at {io, async, global}) at async : Int =
89
89
llvm """
90
90
call void @c_tcp_listen(%Int ${listener}, %Pos ${handler}, %Stack %stack)
91
91
ret void
92
92
"""
93
93
94
- extern async def shutdown(handle: Int): Unit =
94
+ extern def shutdown(handle: Int) at async : Unit =
95
95
llvm """
96
96
call void @c_tcp_shutdown(%Int ${handle}, %Stack %stack)
97
97
ret void
0 commit comments