Phase 8.3: Fix spawn to use bux_task_spawn for non-async functions

- Added exprSpawnAsync flag to AST ekSpawn
- Sema checks if callee is async and sets the flag
- HIR hSpawn carries spawnAsync flag
- C backend uses bux_task_spawn for non-async (OS threads) and bux_async_spawn for async (coroutines)
- Added concurrency example to test suite
This commit is contained in:
2026-06-01 11:58:17 +03:00
parent cefd2a8442
commit 8b2179ccf9
7 changed files with 25 additions and 9 deletions
+1
View File
@@ -207,6 +207,7 @@ type
of ekSpawn:
exprSpawnCallee*: Expr
exprSpawnArgs*: seq[Expr]
exprSpawnAsync*: bool
of ekAwait:
exprAwaitOperand*: Expr
of ekBlock: