Repository navigation
Commit 2dae8a6
authored
go: add --stackful-exports for async exports (#1784)
Add an option that makes async exports stackful. The generated code uses
the [async-lift-stackful] name, does not export a [callback] function and
returns nothing from the wrapper, since the result goes through
task.return. This is for runtimes that can block a thread, such as TinyGo
with cooperative threads.
In the core ABI, lower a result to memory for stackful exports the same
way as for the other export variants. This replaces a todo.1 parent d276c62 commit 2dae8a6
2 files changed
Lines changed: 55 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1354 | 1354 | | |
1355 | 1355 | | |
1356 | 1356 | | |
1357 | | - | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
1358 | 1360 | | |
1359 | 1361 | | |
1360 | 1362 | | |
| |||
1372 | 1374 | | |
1373 | 1375 | | |
1374 | 1376 | | |
1375 | | - | |
1376 | | - | |
1377 | | - | |
1378 | 1377 | | |
1379 | 1378 | | |
1380 | 1379 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
152 | 162 | | |
153 | 163 | | |
154 | 164 | | |
| |||
1313 | 1323 | | |
1314 | 1324 | | |
1315 | 1325 | | |
1316 | | - | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
1317 | 1334 | | |
1318 | 1335 | | |
1319 | 1336 | | |
| |||
1398 | 1415 | | |
1399 | 1416 | | |
1400 | 1417 | | |
1401 | | - | |
1402 | | - | |
1403 | | - | |
1404 | | - | |
1405 | | - | |
1406 | | - | |
1407 | | - | |
1408 | | - | |
1409 | | - | |
| 1418 | + | |
1410 | 1419 | | |
1411 | | - | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
1412 | 1447 | | |
1413 | 1448 | | |
1414 | 1449 | | |
1415 | 1450 | | |
1416 | 1451 | | |
1417 | 1452 | | |
1418 | | - | |
1419 | | - | |
1420 | | - | |
1421 | | - | |
1422 | | - | |
1423 | | - | |
1424 | | - | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
1425 | 1459 | | |
1426 | 1460 | | |
1427 | 1461 | | |
| |||
0 commit comments