@grain/stdlib 0.4.6 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +93 -0
- package/array.gr +18 -18
- package/array.md +18 -18
- package/bigint.gr +497 -0
- package/bigint.md +811 -0
- package/buffer.gr +59 -223
- package/buffer.md +24 -17
- package/bytes.gr +100 -202
- package/bytes.md +19 -0
- package/char.gr +63 -133
- package/exception.gr +28 -2
- package/exception.md +43 -0
- package/float32.gr +76 -95
- package/float32.md +69 -30
- package/float64.gr +81 -95
- package/float64.md +69 -30
- package/hash.gr +37 -37
- package/int32.gr +152 -198
- package/int32.md +104 -0
- package/int64.gr +151 -197
- package/int64.md +104 -0
- package/list.gr +467 -70
- package/list.md +1141 -0
- package/map.gr +192 -7
- package/map.md +525 -0
- package/number.gr +111 -54
- package/number.md +100 -3
- package/option.md +1 -1
- package/package.json +3 -3
- package/pervasives.gr +499 -59
- package/pervasives.md +1116 -0
- package/queue.gr +4 -0
- package/queue.md +10 -0
- package/random.gr +196 -0
- package/random.md +179 -0
- package/regex.gr +1833 -842
- package/regex.md +11 -11
- package/result.md +1 -1
- package/runtime/bigint.gr +2045 -0
- package/runtime/bigint.md +326 -0
- package/runtime/dataStructures.gr +99 -278
- package/runtime/dataStructures.md +391 -0
- package/runtime/debug.md +6 -0
- package/runtime/equal.gr +5 -23
- package/runtime/equal.md +6 -0
- package/runtime/exception.md +30 -0
- package/runtime/gc.gr +20 -3
- package/runtime/gc.md +36 -0
- package/runtime/malloc.gr +13 -11
- package/runtime/malloc.md +55 -0
- package/runtime/numberUtils.gr +91 -41
- package/runtime/numberUtils.md +54 -0
- package/runtime/numbers.gr +1049 -391
- package/runtime/numbers.md +300 -0
- package/runtime/string.gr +136 -230
- package/runtime/string.md +24 -0
- package/runtime/stringUtils.gr +58 -38
- package/runtime/stringUtils.md +6 -0
- package/runtime/unsafe/constants.gr +17 -0
- package/runtime/unsafe/constants.md +72 -0
- package/runtime/unsafe/conv.md +71 -0
- package/runtime/unsafe/errors.md +204 -0
- package/runtime/unsafe/memory.md +54 -0
- package/runtime/unsafe/printWasm.md +24 -0
- package/runtime/unsafe/tags.gr +9 -8
- package/runtime/unsafe/tags.md +120 -0
- package/runtime/unsafe/wasmf32.md +168 -0
- package/runtime/unsafe/wasmf64.md +168 -0
- package/runtime/unsafe/wasmi32.md +282 -0
- package/runtime/unsafe/wasmi64.md +300 -0
- package/runtime/utils/printing.gr +62 -0
- package/runtime/utils/printing.md +18 -0
- package/runtime/wasi.gr +1 -1
- package/runtime/wasi.md +839 -0
- package/set.gr +17 -8
- package/set.md +24 -21
- package/stack.gr +3 -3
- package/stack.md +4 -6
- package/string.gr +194 -329
- package/string.md +3 -3
- package/sys/file.gr +245 -429
- package/sys/process.gr +27 -45
- package/sys/random.gr +47 -16
- package/sys/random.md +38 -0
- package/sys/time.gr +11 -27
|
@@ -1,366 +1,187 @@
|
|
|
1
|
-
/* grainc-flags --
|
|
2
|
-
|
|
3
|
-
import Memory from "runtime/unsafe/memory"
|
|
4
|
-
import Tags from "runtime/unsafe/tags"
|
|
5
|
-
import WasmI32, {
|
|
6
|
-
add as (+),
|
|
7
|
-
mul as (*),
|
|
8
|
-
xor as (^),
|
|
9
|
-
shl as (<<),
|
|
10
|
-
} from "runtime/unsafe/wasmi32"
|
|
11
|
-
import WasmI64 from "runtime/unsafe/wasmi64"
|
|
12
|
-
import WasmF32 from "runtime/unsafe/wasmf32"
|
|
13
|
-
import WasmF64 from "runtime/unsafe/wasmf64"
|
|
14
|
-
|
|
15
|
-
//
|
|
16
|
-
// For performance reasons, all functions in this module do not
|
|
17
|
-
// decRef their arguments. Consequently, callers should not incRef them before calling.
|
|
18
|
-
//
|
|
1
|
+
/* grainc-flags --no-pervasives */
|
|
19
2
|
|
|
20
3
|
/**
|
|
21
4
|
* Allocates a new Grain array.
|
|
22
5
|
*
|
|
23
|
-
* @param
|
|
24
|
-
* @returns
|
|
25
|
-
*/
|
|
26
|
-
export let allocateArray = numElts => {
|
|
27
|
-
let arr = Memory.malloc((numElts + 2n) * 4n)
|
|
28
|
-
|
|
29
|
-
WasmI32.store(arr, Tags._GRAIN_ARRAY_HEAP_TAG, 0n)
|
|
30
|
-
WasmI32.store(arr, numElts, 4n)
|
|
31
|
-
|
|
32
|
-
arr
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Stores an item in a Grain array.
|
|
37
|
-
*
|
|
38
|
-
* @param {WasmI32} array The array to store the item in
|
|
39
|
-
* @param {WasmI32} idx The index to store the item
|
|
40
|
-
* @param {WasmI32} item The item to store
|
|
6
|
+
* @param numElts: The number of elements to be contained in this array
|
|
7
|
+
* @returns The pointer to the array
|
|
41
8
|
*/
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
9
|
+
@unsafe
|
|
10
|
+
export primitive allocateArray: WasmI32 -> WasmI32 = "@allocate.array"
|
|
45
11
|
|
|
46
12
|
/**
|
|
47
13
|
* Allocates a new Grain tuple.
|
|
48
14
|
*
|
|
49
|
-
* @param
|
|
50
|
-
* @returns
|
|
15
|
+
* @param numElts: The number of elements to be contained in this tuple
|
|
16
|
+
* @returns The pointer to the tuple
|
|
51
17
|
*/
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
WasmI32.store(tuple, Tags._GRAIN_TUPLE_HEAP_TAG, 0n)
|
|
56
|
-
WasmI32.store(tuple, numElts, 4n)
|
|
57
|
-
|
|
58
|
-
tuple
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Stores an item in a Grain tuple.
|
|
63
|
-
*
|
|
64
|
-
* @param {WasmI32} tuple The tuple to store the item in
|
|
65
|
-
* @param {WasmI32} idx The index to store the item
|
|
66
|
-
* @param {WasmI32} item The item to store
|
|
67
|
-
*/
|
|
68
|
-
export let storeInTuple = (tuple, idx, item) => {
|
|
69
|
-
WasmI32.store(tuple + idx * 4n, item, 8n)
|
|
70
|
-
}
|
|
18
|
+
@unsafe
|
|
19
|
+
export primitive allocateTuple: WasmI32 -> WasmI32 = "@allocate.tuple"
|
|
71
20
|
|
|
72
21
|
/**
|
|
73
22
|
* Allocates a new Grain bytes.
|
|
74
23
|
*
|
|
75
|
-
* @param
|
|
76
|
-
* @returns
|
|
24
|
+
* @param size: The number of bytes to be contained in this buffer
|
|
25
|
+
* @returns The pointer to the bytes
|
|
77
26
|
*/
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
let bytes = Memory.malloc(len)
|
|
81
|
-
Memory.fill(bytes, 0n, len)
|
|
82
|
-
WasmI32.store(bytes, Tags._GRAIN_BYTES_HEAP_TAG, 0n)
|
|
83
|
-
WasmI32.store(bytes, size, 4n)
|
|
84
|
-
bytes
|
|
85
|
-
}
|
|
27
|
+
@unsafe
|
|
28
|
+
export primitive allocateBytes: WasmI32 -> WasmI32 = "@allocate.bytes"
|
|
86
29
|
|
|
87
30
|
/**
|
|
88
31
|
* Allocates a new Grain string.
|
|
89
32
|
*
|
|
90
|
-
* @param
|
|
91
|
-
* @returns
|
|
33
|
+
* @param size: The size (in bytes) of the string to allocate
|
|
34
|
+
* @returns The pointer to the string
|
|
92
35
|
*/
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
WasmI32.store(str, Tags._GRAIN_STRING_HEAP_TAG, 0n)
|
|
97
|
-
WasmI32.store(str, size, 4n)
|
|
36
|
+
@unsafe
|
|
37
|
+
export primitive allocateString: WasmI32 -> WasmI32 = "@allocate.string"
|
|
98
38
|
|
|
99
|
-
|
|
100
|
-
}
|
|
39
|
+
// INT32/INT64
|
|
101
40
|
|
|
102
41
|
/**
|
|
103
|
-
*
|
|
42
|
+
* Allocates a new Int32.
|
|
104
43
|
*
|
|
105
|
-
* @
|
|
106
|
-
* @returns {WasmI32} The pointer to the string
|
|
44
|
+
* @returns The pointer to the empty Int32
|
|
107
45
|
*/
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
WasmI32.store(str, Tags._GRAIN_STRING_HEAP_TAG, 0n)
|
|
112
|
-
WasmI32.store(str, 1n, 4n)
|
|
113
|
-
WasmI32.store8(str, c, 8n)
|
|
114
|
-
|
|
115
|
-
str
|
|
116
|
-
}
|
|
46
|
+
@unsafe
|
|
47
|
+
export primitive allocateInt32: () -> WasmI32 = "@allocate.int32"
|
|
117
48
|
|
|
118
49
|
/**
|
|
119
|
-
* Allocates a new
|
|
120
|
-
*
|
|
121
|
-
* @returns
|
|
50
|
+
* Allocates a new Int32 with a prepopulated value
|
|
51
|
+
* @param value: The value to store
|
|
52
|
+
* @returns The pointer to the Int32
|
|
122
53
|
*/
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
WasmI32.store(char, Tags._GRAIN_CHAR_HEAP_TAG, 0n)
|
|
127
|
-
|
|
128
|
-
char
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// INT32/INT64
|
|
54
|
+
@unsafe
|
|
55
|
+
export primitive newInt32: WasmI32 -> WasmI32 = "@new.int32"
|
|
132
56
|
|
|
133
57
|
/**
|
|
134
58
|
* Allocates a new Int64.
|
|
135
59
|
*
|
|
136
|
-
* @returns
|
|
60
|
+
* @returns The pointer to the empty Int64
|
|
137
61
|
*/
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
WasmI32.store(ptr, Tags._GRAIN_BOXED_NUM_HEAP_TAG, 0n)
|
|
142
|
-
WasmI32.store(ptr, Tags._GRAIN_INT64_BOXED_NUM_TAG, 4n)
|
|
143
|
-
|
|
144
|
-
ptr
|
|
145
|
-
}
|
|
62
|
+
@unsafe
|
|
63
|
+
export primitive allocateInt64: () -> WasmI32 = "@allocate.int64"
|
|
146
64
|
|
|
147
65
|
/**
|
|
148
66
|
* Allocates a new Int64 with a prepopulated value
|
|
149
|
-
* @param value The value to store
|
|
150
|
-
|
|
151
|
-
export let newInt64 = value => {
|
|
152
|
-
let ptr = allocateInt64()
|
|
153
|
-
WasmI64.store(ptr, value, 8n)
|
|
154
|
-
ptr
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* Returns a pointer to the heap location containing this boxed number's Int64
|
|
159
|
-
* @param wrappedInt64 The boxed int64 to return
|
|
67
|
+
* @param value: The value to store
|
|
68
|
+
* @returns The pointer to the Int64
|
|
160
69
|
*/
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
export let loadInt64 = xptr => {
|
|
166
|
-
WasmI64.load(xptr, 8n)
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Allocates a new Int32.
|
|
171
|
-
*
|
|
172
|
-
* @returns {WasmI32}
|
|
173
|
-
*/
|
|
174
|
-
export let allocateInt32 = () => {
|
|
175
|
-
let ptr = Memory.malloc(12n)
|
|
176
|
-
|
|
177
|
-
WasmI32.store(ptr, Tags._GRAIN_BOXED_NUM_HEAP_TAG, 0n)
|
|
178
|
-
WasmI32.store(ptr, Tags._GRAIN_INT32_BOXED_NUM_TAG, 4n)
|
|
179
|
-
|
|
180
|
-
ptr
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Allocates a new Int32 with a prepopulated value
|
|
185
|
-
* @param value The value to store
|
|
186
|
-
*/
|
|
187
|
-
export let newInt32 = value => {
|
|
188
|
-
let ptr = allocateInt32()
|
|
189
|
-
WasmI32.store(ptr, value, 8n)
|
|
190
|
-
ptr
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* Returns a pointer to the heap location containing this boxed number's Int32
|
|
195
|
-
* @param wrappedInt32 The boxed int32 to return
|
|
196
|
-
*/
|
|
197
|
-
export let rawInt32Ptr = wrappedInt32 => {
|
|
198
|
-
wrappedInt32 + 8n
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
export let loadInt32 = xptr => {
|
|
202
|
-
WasmI32.load(xptr, 8n)
|
|
203
|
-
}
|
|
70
|
+
@unsafe
|
|
71
|
+
export primitive newInt64: WasmI64 -> WasmI32 = "@new.int64"
|
|
204
72
|
|
|
205
73
|
// FLOATS
|
|
206
74
|
|
|
207
75
|
/**
|
|
208
76
|
* Allocates a new Float32.
|
|
209
77
|
*
|
|
210
|
-
* @returns
|
|
78
|
+
* @returns The pointer to the empty Float32
|
|
211
79
|
*/
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
WasmI32.store(ptr, Tags._GRAIN_BOXED_NUM_HEAP_TAG, 0n)
|
|
216
|
-
WasmI32.store(ptr, Tags._GRAIN_FLOAT32_BOXED_NUM_TAG, 4n)
|
|
217
|
-
|
|
218
|
-
ptr
|
|
219
|
-
}
|
|
80
|
+
@unsafe
|
|
81
|
+
export primitive allocateFloat32: () -> WasmI32 = "@allocate.float32"
|
|
220
82
|
|
|
221
83
|
/**
|
|
222
84
|
* Allocates a new Float32 with a prepopulated value
|
|
223
|
-
* @param value The value to store
|
|
85
|
+
* @param value: The value to store
|
|
86
|
+
* @returns the pointer to the Float32
|
|
224
87
|
*/
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
WasmF32.store(ptr, value, 8n)
|
|
228
|
-
ptr
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* Returns a pointer to the heap location containing this boxed number's Float32
|
|
233
|
-
* @param wrappedFloat32 The boxed float32 to return
|
|
234
|
-
*/
|
|
235
|
-
export let rawFloat32Ptr = wrappedFloat32 => {
|
|
236
|
-
wrappedFloat32 + 8n
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
export let loadFloat32 = xptr => {
|
|
240
|
-
WasmF32.load(xptr, 8n)
|
|
241
|
-
}
|
|
88
|
+
@unsafe
|
|
89
|
+
export primitive newFloat32: WasmF32 -> WasmI32 = "@new.float32"
|
|
242
90
|
|
|
243
91
|
/**
|
|
244
92
|
* Allocates a new Float64.
|
|
245
93
|
*
|
|
246
|
-
* @returns
|
|
94
|
+
* @returns The pointer to the empty Float64
|
|
247
95
|
*/
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
WasmI32.store(ptr, Tags._GRAIN_BOXED_NUM_HEAP_TAG, 0n)
|
|
252
|
-
WasmI32.store(ptr, Tags._GRAIN_FLOAT64_BOXED_NUM_TAG, 4n)
|
|
253
|
-
|
|
254
|
-
ptr
|
|
255
|
-
}
|
|
96
|
+
@unsafe
|
|
97
|
+
export primitive allocateFloat64: () -> WasmI32 = "@allocate.float64"
|
|
256
98
|
|
|
257
99
|
/**
|
|
258
100
|
* Allocates a new Float64 with a prepopulated value
|
|
259
|
-
* @param value The value to store
|
|
260
|
-
|
|
261
|
-
export let newFloat64 = value => {
|
|
262
|
-
let ptr = allocateFloat64()
|
|
263
|
-
WasmF64.store(ptr, value, 8n)
|
|
264
|
-
ptr
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
* Returns a pointer to the heap location containing this boxed number's Float64
|
|
269
|
-
* @param wrappedFloat64 The boxed float64 to return
|
|
101
|
+
* @param value: The value to store
|
|
102
|
+
* @returns The pointer to the Float64
|
|
270
103
|
*/
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
export let loadFloat64 = xptr => {
|
|
276
|
-
WasmF64.load(xptr, 8n)
|
|
277
|
-
}
|
|
104
|
+
@unsafe
|
|
105
|
+
export primitive newFloat64: WasmF64 -> WasmI32 = "@new.float64"
|
|
278
106
|
|
|
279
107
|
// RATIONALS
|
|
280
108
|
|
|
281
109
|
/**
|
|
282
110
|
* Allocates a new Rational.
|
|
283
111
|
*
|
|
284
|
-
* @returns
|
|
112
|
+
* @returns The pointer to the empty Rational
|
|
285
113
|
*/
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
WasmI32.store(ptr, Tags._GRAIN_BOXED_NUM_HEAP_TAG, 0n)
|
|
290
|
-
WasmI32.store(ptr, Tags._GRAIN_RATIONAL_BOXED_NUM_TAG, 4n)
|
|
291
|
-
|
|
292
|
-
ptr
|
|
293
|
-
}
|
|
114
|
+
@unsafe
|
|
115
|
+
export primitive allocateRational: () -> WasmI32 = "@allocate.rational"
|
|
294
116
|
|
|
295
117
|
/**
|
|
296
118
|
* Allocates a new Rational with a prepopulated value
|
|
297
|
-
* @param value The value to store
|
|
119
|
+
* @param value: The numerator value to store
|
|
120
|
+
* @param value: The denominator value to store
|
|
121
|
+
* @returns The pointer to the Rational
|
|
298
122
|
*/
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
WasmI32.store(ptr, numerator, 8n)
|
|
302
|
-
WasmI32.store(ptr, denominator, 12n)
|
|
303
|
-
ptr
|
|
304
|
-
}
|
|
123
|
+
@unsafe
|
|
124
|
+
export primitive newRational: (WasmI32, WasmI32) -> WasmI32 = "@new.rational"
|
|
305
125
|
|
|
306
126
|
/**
|
|
307
|
-
*
|
|
308
|
-
*
|
|
127
|
+
* Load the (tagged) variant of an ADT.
|
|
128
|
+
*
|
|
129
|
+
* @param ptr: Untagged pointer to the ADT
|
|
130
|
+
* @returns The (tagged) ADT variant id
|
|
309
131
|
*/
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
}
|
|
132
|
+
@unsafe
|
|
133
|
+
export primitive loadAdtVariant: WasmI32 -> WasmI32 = "@adt.load_variant"
|
|
313
134
|
|
|
314
135
|
/**
|
|
315
|
-
*
|
|
316
|
-
*
|
|
136
|
+
* Load an untagged string's size.
|
|
137
|
+
*
|
|
138
|
+
* @param ptr: Untagged pointer to the string
|
|
139
|
+
* @returns The string size (in bytes)
|
|
317
140
|
*/
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
}
|
|
141
|
+
@unsafe
|
|
142
|
+
export primitive stringSize: WasmI32 -> WasmI32 = "@string.size"
|
|
321
143
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
144
|
+
/**
|
|
145
|
+
* Load an untagged Bytes' size.
|
|
146
|
+
*
|
|
147
|
+
* @param ptr: Untagged pointer to the Bytes
|
|
148
|
+
* @returns The Bytes size (in bytes)
|
|
149
|
+
*/
|
|
150
|
+
@unsafe
|
|
151
|
+
export primitive bytesSize: WasmI32 -> WasmI32 = "@bytes.size"
|
|
329
152
|
|
|
330
153
|
/**
|
|
331
|
-
*
|
|
154
|
+
* Tag a simple number.
|
|
332
155
|
*
|
|
333
|
-
* @
|
|
334
|
-
* @
|
|
335
|
-
* @param {WasmI32} idx Index (from zero) of the item
|
|
336
|
-
* @returns {WasmI32} The value located at the index
|
|
156
|
+
* @param num: The number to tag
|
|
157
|
+
* @returns The tagged number
|
|
337
158
|
*/
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
}
|
|
159
|
+
@unsafe
|
|
160
|
+
export primitive tagSimpleNumber: WasmI32 -> Number = "@tag.simple_number"
|
|
341
161
|
|
|
342
162
|
/**
|
|
343
|
-
*
|
|
163
|
+
* Untag a simple number.
|
|
344
164
|
*
|
|
345
|
-
* @
|
|
346
|
-
* @
|
|
347
|
-
* @returns {WasmI32} The (tagged) ADT variant id
|
|
165
|
+
* @param num: The number to untag
|
|
166
|
+
* @returns The untagged number
|
|
348
167
|
*/
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
}
|
|
168
|
+
@unsafe
|
|
169
|
+
export primitive untagSimpleNumber: Number -> WasmI32 = "@untag.simple_number"
|
|
352
170
|
|
|
353
171
|
/**
|
|
354
|
-
*
|
|
172
|
+
* Tag a char.
|
|
355
173
|
*
|
|
356
|
-
* @
|
|
357
|
-
* @
|
|
358
|
-
* @returns {WasmI32} The string size (in bytes)
|
|
174
|
+
* @param num: The usv to tag
|
|
175
|
+
* @returns The tagged char
|
|
359
176
|
*/
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
}
|
|
177
|
+
@unsafe
|
|
178
|
+
export primitive tagChar: WasmI32 -> Char = "@tag.char"
|
|
363
179
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
180
|
+
/**
|
|
181
|
+
* Untag a char.
|
|
182
|
+
*
|
|
183
|
+
* @param num: The char to untag
|
|
184
|
+
* @returns The untagged usv
|
|
185
|
+
*/
|
|
186
|
+
@unsafe
|
|
187
|
+
export primitive untagChar: Char -> WasmI32 = "@untag.char"
|