Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
324 commits
Select commit Hold shift + click to select a range
8629ea5
feat(coro): demand ABI method table entries
cpunion Jul 16, 2026
c1b5f56
feat(coro): freeze frontend lowered call edges
cpunion Jul 16, 2026
8d09749
feat(ssa): resolve compiler-lowered runtime calls
cpunion Jul 16, 2026
d47b16b
build: sync coroutine bindings with upstream LLVM 22
cpunion Jul 16, 2026
e2d62df
target(wasm): link freestanding allocator without BDWGC
cpunion Jul 16, 2026
d9694a3
runtime(coro): add preemptive park and wake core
cpunion Jul 16, 2026
fa09d82
compiler(coro): lower synchronous Go style onto LLVM frames
cpunion Jul 16, 2026
95288ed
docs(coro): record executable park and wasm prototype
cpunion Jul 16, 2026
a63666d
test(coro): accept LLVM 20 GEP no-wrap flags
cpunion Jul 16, 2026
7bb9c10
ci(coro): accept target-selected nogc allocator
cpunion Jul 16, 2026
1734c3a
test(coro): keep debug parameters across frame lowering
cpunion Jul 16, 2026
6d0723f
runtime(coro): add closed static G spawn transaction
cpunion Jul 16, 2026
9335f0b
runtime(coro): cancel ready Gs on command main return
cpunion Jul 16, 2026
1f2e76c
compiler(coro): lower closed static goroutine spawn
cpunion Jul 16, 2026
14fb36e
docs(coro): record closed static spawn prototype
cpunion Jul 16, 2026
b61c8bb
test(coro): avoid copying build context lock
cpunion Jul 16, 2026
b2c8555
compiler(coro): reserve explicit status panic ABI
cpunion Jul 16, 2026
825e984
test(coro): link and run native static spawn island
cpunion Jul 16, 2026
020a8aa
runtime(coro): add terminal explicit panic state machine
cpunion Jul 16, 2026
f3bdeea
docs(coro): record runnable spawn and panic core
cpunion Jul 16, 2026
7448583
runtime(coro): export terminal panic handoff
cpunion Jul 16, 2026
1c8829e
compiler(coro): lower terminal explicit panic status
cpunion Jul 16, 2026
b6e3641
build(coro): retain explicit panic prepare hook
cpunion Jul 16, 2026
21797b5
test(coro): run terminal panic scheduler island
cpunion Jul 16, 2026
61b9937
docs(coro): record terminal panic prototype
cpunion Jul 16, 2026
1c84c1d
Merge pull request #23 from cpunion/coro/phase14-plain-dispatch
cpunion Jul 16, 2026
9062fa3
runtime(coro): add stable wait registration
cpunion Jul 16, 2026
b2ed427
docs(coro): record stable wait registration
cpunion Jul 16, 2026
51960fa
docs(coro): include wait draining transition
cpunion Jul 16, 2026
ee1c84d
Merge pull request #24 from cpunion/coro/phase15-wait-registration
cpunion Jul 16, 2026
0e24a2c
runtime(coro): add stable executor request gate
cpunion Jul 16, 2026
d3af7df
docs(coro): specify executor request protocol
cpunion Jul 16, 2026
6e076cf
refactor(coro): clarify executor slot reuse
cpunion Jul 16, 2026
5253adb
Merge pull request #25 from cpunion/coro/phase16-executor-gate
cpunion Jul 16, 2026
56be0d1
runtime(coro): bind executor driver to scheduler
cpunion Jul 16, 2026
a11bd25
docs(coro): document executor driver contract
cpunion Jul 16, 2026
3e401da
refactor(coro): clarify executor drain invariants
cpunion Jul 16, 2026
748bbab
test(coro): stub bounds checks in runtime islands
cpunion Jul 16, 2026
155eca5
Merge pull request #26 from cpunion/coro/phase17-executor-driver
cpunion Jul 16, 2026
e721822
runtime(coro): add handle-free terminal executor close
cpunion Jul 16, 2026
5d3dd68
docs(coro): specify terminal executor handoff
cpunion Jul 16, 2026
3894e23
test(coro): assert terminal close handle stays nil
cpunion Jul 16, 2026
e9c2a31
Merge pull request #27 from cpunion/coro/phase18-terminal-close
cpunion Jul 16, 2026
376a282
runtime/coro: serialize retained drive admission
cpunion Jul 16, 2026
8ebbcc7
runtime,build: drive static target continuations
cpunion Jul 16, 2026
50c10d6
docs(coro): specify target reentry lifecycle
cpunion Jul 16, 2026
f931965
runtime/coro: clarify initial drive ownership
cpunion Jul 16, 2026
7d57e29
Merge pull request #28 from cpunion/coro/phase19-runtime-dispatch
cpunion Jul 16, 2026
4a43526
runtime/coro: add target ingress barrier
cpunion Jul 16, 2026
1ade16a
runtime: add POSIX coroutine doorbell
cpunion Jul 16, 2026
939df3d
runtime(coro): add native pipe executor target
cpunion Jul 16, 2026
a25d70e
build(coro): retain native producer ingress
cpunion Jul 16, 2026
418e457
docs(coro): describe native retained doorbell
cpunion Jul 16, 2026
0ff2376
build(coro): reserve native doorbell capability tag
cpunion Jul 16, 2026
70e68c2
Merge pull request #29 from cpunion/coro/phase20-native-doorbell
cpunion Jul 16, 2026
3d6a271
runtime/coro: make wait preparation transactional
cpunion Jul 16, 2026
cc09f4f
runtime(coro): expose guarded wait owner ABI
cpunion Jul 16, 2026
91e1c14
test(coro): run real pthread ingress through native poll
cpunion Jul 16, 2026
017b10d
build(coro): reserve native ingress test capability
cpunion Jul 16, 2026
2c2c1b6
Merge pull request #30 from cpunion/coro/phase21-native-ingress-e2e
cpunion Jul 16, 2026
4eb4ca5
runtime/coro: add fixed-capacity timer registrations
cpunion Jul 16, 2026
2277d90
runtime/coro: add native monotonic clock
cpunion Jul 16, 2026
5373514
runtime/coro: bound native poll by timer deadline
cpunion Jul 16, 2026
6942b09
build/coro: reserve native timer capability
cpunion Jul 16, 2026
471d95b
runtime/coro: integrate timer source with executor driver
cpunion Jul 16, 2026
0c57bf3
runtime/coro: preserve timer deadlines across EINTR
cpunion Jul 16, 2026
b0a68cb
runtime/coro: preempt sole runners for active timers
cpunion Jul 16, 2026
5d67177
runtime/coro: connect native timer-aware executor
cpunion Jul 16, 2026
6bbda62
build/coro: bind native timer owner ABI
cpunion Jul 16, 2026
862ec93
test/coro: include split native target helpers
cpunion Jul 16, 2026
2a9f192
test/coro: keep host timer unit out of llgo variants
cpunion Jul 16, 2026
aec83c6
runtime/coro: isolate timer deadline arithmetic
cpunion Jul 16, 2026
19f88a5
compiler/coro: certify timer-retained frame locals
cpunion Jul 16, 2026
97ad027
runtime/coro: add fail-stop timer frame owners
cpunion Jul 16, 2026
5bd349c
runtime/time: use native coroutine timer for Sleep
cpunion Jul 17, 2026
67a8cb6
test/coro: run native timer source end to end
cpunion Jul 17, 2026
079c7fd
docs/coro: record native timer Sleep prototype
cpunion Jul 17, 2026
a4be3f4
test/coro: cover timer source contracts in CI
cpunion Jul 17, 2026
3aaf1fa
test/coro: expose POSIX clock APIs in timer E2E
cpunion Jul 17, 2026
0726222
test/coro: avoid copying Compilation locks
cpunion Jul 17, 2026
e70788c
doc: define unified coroutine async core contract
cpunion Jul 17, 2026
9e3a327
runtime/coro: centralize executor event sources
cpunion Jul 17, 2026
5eccd65
runtime/coro: decouple service preemption from timers
cpunion Jul 17, 2026
a6ad282
doc: track unified async core progress
cpunion Jul 17, 2026
4a7eb4c
runtime/coro: add multi-source park operation core
cpunion Jul 17, 2026
ad9e5cf
runtime/coro: slim park resolution and add task cancellation
cpunion Jul 17, 2026
f698973
runtime/coro: integrate multi-source park resume gate
cpunion Jul 17, 2026
24a55fd
runtime/coro: resolve source facts after quiet cut
cpunion Jul 17, 2026
391b517
doc: extend async runtime model comparisons
cpunion Jul 17, 2026
420d207
runtime/coro: deduplicate affected wait sets after quiet cut
cpunion Jul 17, 2026
4fe474e
doc: define affected wait-set promotion record
cpunion Jul 17, 2026
ae04f12
runtime/coro: add scalar resume decision ABI
cpunion Jul 17, 2026
27f4104
runtime/coro: add unified manual operation source
cpunion Jul 17, 2026
9b830da
doc: record manual source integration status
cpunion Jul 17, 2026
81a3f26
runtime/coro: promote affected wait sets in linear time
cpunion Jul 17, 2026
ee03994
compiler/coro: gate every resumed continuation
cpunion Jul 17, 2026
4f8fa06
runtime/coro: add generation-stable task control source
cpunion Jul 17, 2026
cbd502c
runtime/coro: promote each bounded publication epoch
cpunion Jul 17, 2026
2f2431a
doc: define bounded unified async core contracts
cpunion Jul 17, 2026
f74eeea
ssa/coro: add terminating resume dispatch gates
cpunion Jul 17, 2026
e977476
runtime/coro: apply resolved wait candidates directly
cpunion Jul 17, 2026
5fca3a3
doc: define route-safe bounded executor slices
cpunion Jul 17, 2026
6885e31
runtime/coro: migrate monotonic timers to operation V2
cpunion Jul 17, 2026
c7a8a05
compiler/coro: dispatch zero-ticket resume decisions
cpunion Jul 17, 2026
9ccaa9e
doc: prioritize bounded progress and commit-capable select
cpunion Jul 17, 2026
3dd7e4a
runtime/coro: route operation identities across executors
cpunion Jul 17, 2026
df8107a
runtime/coro: bind V2 timers to executor routes
cpunion Jul 17, 2026
402d90e
doc: record route-safe timer identities
cpunion Jul 17, 2026
066ea0f
compiler/coro: remove unused full-ticket signature
cpunion Jul 17, 2026
09bd3a7
ci: focus stacked coroutine pull requests
cpunion Jul 17, 2026
e04bdaf
build/coro: cover pointer nil guards in native islands
cpunion Jul 17, 2026
e2e2451
doc: align async core with commit and reduction models
cpunion Jul 17, 2026
fc294ee
runtime/coro: bound production source catalog progress
cpunion Jul 17, 2026
b65c169
runtime/coro: add commit-capable select core
cpunion Jul 17, 2026
32582ad
runtime/coro: bound published epoch resolution
cpunion Jul 17, 2026
3d70599
runtime/coro: share producer admission core
cpunion Jul 17, 2026
27d4f39
runtime/coro: make operation result ownership explicit
cpunion Jul 17, 2026
c7d01bf
runtime/coro: add scalar result payload core
cpunion Jul 17, 2026
615c314
runtime/coro: keep scalar cleanup fail-safe
cpunion Jul 17, 2026
9308d21
runtime/coro: require exact resume gate take
cpunion Jul 17, 2026
b3b167a
runtime/coro: model resume gate in adapter tests
cpunion Jul 17, 2026
ce819a5
runtime/coro: bound registered task control delivery
cpunion Jul 17, 2026
e52968b
runtime/coro: add resumable executor run slices
cpunion Jul 17, 2026
a061595
runtime/coro: cancel queued runner continuations on main return
cpunion Jul 17, 2026
6284e62
runtime/coro: guard bounded runner boundaries
cpunion Jul 17, 2026
cbcc992
runtime/coro: preserve command bootstrap handoff order
cpunion Jul 17, 2026
05a6343
docs: define bounded bootstrap handoff ordering
cpunion Jul 17, 2026
8efbada
runtime/coro: share producer source lifecycle core
cpunion Jul 17, 2026
d8d2e52
runtime/coro: add bounded host run-slice ABI
cpunion Jul 17, 2026
7b93f50
Merge pull request #31 from cpunion/coro/phase22-native-timer-source
cpunion Jul 17, 2026
cf750cd
Merge pull request #32 from cpunion/coro/phase23-unified-async-core
cpunion Jul 17, 2026
e5e896e
Merge pull request #33 from cpunion/coro/phase29-result-ownership
cpunion Jul 17, 2026
1814b81
Merge pull request #35 from cpunion/coro/phase30b-exact-resume-gate
cpunion Jul 17, 2026
16ae497
Merge pull request #36 from cpunion/coro/phase30c-taskcontrol-o1
cpunion Jul 17, 2026
838e374
Merge pull request #37 from cpunion/coro/phase31-bounded-runner
cpunion Jul 17, 2026
5600920
Merge pull request #38 from cpunion/coro/phase31a-operation-source-core
cpunion Jul 17, 2026
95f11e7
Merge llvm-coro into scalar result payload core
cpunion Jul 17, 2026
db789a4
Merge remote-tracking branch 'origin/llvm-coro' into coro/phase31b-ho…
cpunion Jul 17, 2026
2564124
build/coro: drive native programs with bounded slices
cpunion Jul 17, 2026
6dfbc7e
Merge pull request #34 from cpunion/coro/phase30-scalar-result-payload
cpunion Jul 17, 2026
ef866f1
Merge remote-tracking branch 'origin/llvm-coro' into coro/phase31b-ho…
cpunion Jul 17, 2026
2681788
build/coro: simplify V2 result type check
cpunion Jul 17, 2026
4fff8cf
Merge pull request #39 from cpunion/coro/phase31b-host-budget-return
cpunion Jul 17, 2026
bfa75ed
runtime/coro: add channel claim core
cpunion Jul 17, 2026
dc52a41
runtime/coro: add channel select claim core
cpunion Jul 17, 2026
c26fdeb
doc/coro: clarify channel claim completion boundary
cpunion Jul 17, 2026
3195aee
runtime/coro: add single channel commit transaction
cpunion Jul 17, 2026
416e2d2
runtime/coro: expose channel pair commit transaction
cpunion Jul 17, 2026
beeb232
runtime/coro: bind production channel source
cpunion Jul 17, 2026
19ee581
runtime/coro: publish channel endpoints before suspend
cpunion Jul 17, 2026
d6b82a5
ssa/coro: add conditional exact resume dispatch
cpunion Jul 17, 2026
2d1dc84
runtime/coro: add single channel park owner transaction
cpunion Jul 17, 2026
cdbc4d0
cl,runtime: lower stackless channel operations
cpunion Jul 17, 2026
762fe7f
runtime/coro: release failed channel reservations
cpunion Jul 17, 2026
76f9e2e
cl,runtime: add stackless coroutine channel lowering (#40)
cpunion Jul 17, 2026
630cae5
runtime/coro: drain channel parks before command close
cpunion Jul 17, 2026
91d70d2
runtime/coro: reject nil command drain main
cpunion Jul 17, 2026
e80ce9a
Merge pull request #41 from cpunion/coro/phase34-channel-native-e2e
cpunion Jul 18, 2026
83e9cc7
cl,runtime: add stackless coroutine channel select
cpunion Jul 18, 2026
5da3f38
cl: reject nil coroutine select channels
cpunion Jul 18, 2026
897d251
Merge pull request #42 from cpunion/coro/phase35-select
cpunion Jul 18, 2026
ca698e4
doc: design sparse coroutine lowering IR
cpunion Jul 18, 2026
918fc6c
doc: normalize coroutine design terminology
cpunion Jul 18, 2026
54df2b3
runtime/coro: add worker operation source core
cpunion Jul 18, 2026
872e116
runtime/coro: integrate worker source catalog
cpunion Jul 18, 2026
9f068c7
runtime: add native coroutine worker call leaf
cpunion Jul 18, 2026
7555b4e
runtime/coro: add worker park owner transaction
cpunion Jul 18, 2026
b60cc04
internal/coro: model sparse physical lowering overlay
cpunion Jul 18, 2026
c7614e8
runtime/coro: service workers in bounded executor polls
cpunion Jul 18, 2026
a194eab
internal/coro: add sparse lowering facts model
cpunion Jul 18, 2026
b6bf06e
runtime: add fixed native coroutine worker pool
cpunion Jul 18, 2026
ea4c5e2
internal/build: add synchronous stdlib coroutine gates
cpunion Jul 18, 2026
4fe598d
cl: build report-only coroutine lowering facts
cpunion Jul 18, 2026
66ddcd9
internal/build: wire stdlib gates to coro workers
cpunion Jul 18, 2026
f013cba
runtime: route poll waits through syscall workers
cpunion Jul 18, 2026
6f5661d
cl: freeze coroutine SSA callable operand shapes
cpunion Jul 18, 2026
642d341
coro: lower scalar syscalls through native workers
cpunion Jul 18, 2026
e5d6349
runtime/sync: avoid captured TLS pool cleanup
cpunion Jul 18, 2026
1ee0691
cl: canonicalize exact Go linkname definitions
cpunion Jul 18, 2026
974b75d
runtime/coro: cover nine-argument native worker calls
cpunion Jul 18, 2026
23687e6
internal/coro: certify retained assembly leaves
cpunion Jul 18, 2026
de52f89
internal/plan9asm: prove retained no-suspend call closures
cpunion Jul 18, 2026
4369a05
cl: admit closed plain interface invokes in coroutines
cpunion Jul 18, 2026
25d47ee
runtime: certify monotonic clock reads as nonblocking
cpunion Jul 18, 2026
dfd7b74
cl: lower static coroutine method receivers
cpunion Jul 18, 2026
9b35224
cl: freeze FuncPCABI0 coroutine lowering
cpunion Jul 18, 2026
20743e2
internal/coro: resolve CHA through effective types
cpunion Jul 18, 2026
12c7c14
cl: lower static defer cleanup in coroutines
cpunion Jul 18, 2026
8dbf6b7
cl: freeze stdlib runtime frontend proofs
cpunion Jul 18, 2026
d5e5780
internal/coro: restrict scalar CHA to address-taken functions
cpunion Jul 18, 2026
1c78d45
runtime/syscall: expose fixed Darwin worker call sites
cpunion Jul 18, 2026
5438cd6
internal/build: trace coroutine bootstrap blockers
cpunion Jul 18, 2026
ab97052
runtime: statically dispatch type hash and equality
cpunion Jul 18, 2026
5e6999b
runtime: statically compare exported efaces
cpunion Jul 18, 2026
007f83a
runtime: keep terminal panic trace synchronous
cpunion Jul 18, 2026
676435e
internal/build: separate plain bodies from dispatch values
cpunion Jul 18, 2026
b2cb255
runtime: bound raw panic formatting
cpunion Jul 18, 2026
c658d88
runtime: bound terminal panic traceback
cpunion Jul 18, 2026
8048e4a
runtime: keep panic nil check scalar
cpunion Jul 18, 2026
261adc6
runtime/reflect: statically dispatch type equality
cpunion Jul 18, 2026
51ad995
runtime: use bounded native string comparison
cpunion Jul 18, 2026
16cdd5e
runtime/clite: certify memcmp as nonblocking
cpunion Jul 18, 2026
150beea
ssa: add coroutine dynamic descriptor primitive
cpunion Jul 18, 2026
3c03558
cl: freeze closed interface coroutine dispatch
cpunion Jul 18, 2026
37cfeb2
coro: complete native single-P async core prototype
cpunion Jul 20, 2026
606b690
ci: repair coroutine channel source-island checks
cpunion Jul 20, 2026
91d1251
cl: simplify raw plain call dispatch
cpunion Jul 20, 2026
f400239
runtime: use ppoll for Linux coroutine host tests
cpunion Jul 20, 2026
c1b7e1c
build: isolate coroutine support package variants
cpunion Jul 20, 2026
5a4a8b9
ci: split exhaustive coroutine lanes
cpunion Jul 21, 2026
f5cc8c6
coro: bind lowering facts into build identity
cpunion Jul 21, 2026
22ecc61
runtime: route timer and poll through executor fleet
cpunion Jul 21, 2026
df1e34f
test: avoid copying compilation lock state
cpunion Jul 21, 2026
0c19fb1
runtime: share physical runner across executor domains
cpunion Jul 21, 2026
225bdea
runtime: route worker completions across executor domains
cpunion Jul 21, 2026
88bc321
ci: close native runtime island source sets
cpunion Jul 21, 2026
87602f4
runtime: arm empty executor domains for standby
cpunion Jul 21, 2026
45db94b
runtime: add exact fleet reactor wait pass
cpunion Jul 21, 2026
d4ddcd3
test: follow split coroutine runtime sources
cpunion Jul 21, 2026
c889789
coro: adopt existing executor into fleet
cpunion Jul 21, 2026
acf4a3e
runtime: adopt program domain into native fleet
cpunion Jul 21, 2026
5c44610
runtime: run native coroutine fleet peer
cpunion Jul 21, 2026
4855dae
runtime: route channels across coroutine fleet
cpunion Jul 21, 2026
2529f46
coro: retain channel waits in coroutine frames
cpunion Jul 22, 2026
1bd546f
runtime: balance native coroutine fleet work
cpunion Jul 22, 2026
624f7fc
runtime: route poll and workers through native fleet
cpunion Jul 22, 2026
7ed82bf
coro: freeze architecture cutover gates
cpunion Jul 22, 2026
d92f539
coro: make helper SitePlan the production authority
cpunion Jul 22, 2026
edcfd94
coro: freeze intrinsic and elision SitePlans
cpunion Jul 22, 2026
561a3ec
coro: freeze physical proof and fault plans
cpunion Jul 22, 2026
0368746
coro: isolate physical emission sessions
cpunion Jul 22, 2026
995580a
coro: unify single-event park emission
cpunion Jul 22, 2026
c8ac949
coro: route channel parks through unified emitter
cpunion Jul 22, 2026
d940fb3
Merge pull request #44 from cpunion/coro/ir-events-timer
cpunion Jul 22, 2026
c35f079
coro: freeze local SSA semantics in program IR
cpunion Jul 22, 2026
bfa9b9b
coro: freeze await and spawn control recipes
cpunion Jul 22, 2026
3ac6a1d
coro: freeze channel operation recipes
cpunion Jul 22, 2026
ca20dd7
coro: freeze completion outcome recipes
cpunion Jul 22, 2026
bc6f40e
coro: centralize physical call and storage recipes
cpunion Jul 22, 2026
7049ea6
coro: hard cut over to one compiler profile
cpunion Jul 22, 2026
3f021ca
coro: select one native runtime target
cpunion Jul 22, 2026
ba8b9c3
coro: complete the single-track runtime cutover
cpunion Jul 22, 2026
f4e4e99
Merge xgo-dev/main into llvm-coro
cpunion Jul 22, 2026
5743892
coro: integrate upstream runtime ABI updates
cpunion Jul 22, 2026
5b9ef91
ci: re-enable full workflows for integrated coroutine PR
cpunion Jul 22, 2026
f631d56
coro: close target and Go compatibility gates
cpunion Jul 22, 2026
54f9322
runtime: preserve standard terminal panic text
cpunion Jul 22, 2026
1bd83e8
coro: close stdlib and library integration gaps
cpunion Jul 22, 2026
a066d90
runtime: preserve sync pool thread-local values
cpunion Jul 22, 2026
779b9e1
ci: allow complete target catalog validation
cpunion Jul 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
255 changes: 255 additions & 0 deletions .github/workflows/coroutine.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,255 @@
name: Coroutine

on:
pull_request:
branches:
- main
- llvm-coro
- "coro/**"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test:
name: ${{ matrix.check }}
runs-on: ubuntu-22.04
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- { llvm: 19, go: "1.26.5", tags: "llvm19", lane: "compat", check: "test (19, 1.26.5, llvm19)" }
- { llvm: 20, go: "1.26.5", tags: "llvm20", lane: "compat", check: "test (20, 1.26.5, llvm20)" }
- { llvm: 21, go: "1.26.5", tags: "llvm21", lane: "compat", check: "test (21, 1.26.5, llvm21)" }
- { llvm: 22, go: "1.26.5", tags: "llvm22", lane: "compat", check: "test (22, 1.26.5, llvm22)" }
- { llvm: 19, go: "1.26.5", tags: "llvm19", lane: "integration", check: "test integration (19, 1.26.5, llvm19)" }
- { llvm: 19, go: "1.26.5", tags: "llvm19", lane: "targets", check: "test targets (19, 1.26.5, llvm19)" }
steps:
- uses: actions/checkout@v7

- name: Install LLVM
run: |
echo 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-${{ matrix.llvm }} main' | sudo tee /etc/apt/sources.list.d/llvm.list
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install --no-install-recommends llvm-${{ matrix.llvm }}-dev clang-${{ matrix.llvm }} lld-${{ matrix.llvm }} libgc-dev
echo '/usr/lib/llvm-${{ matrix.llvm }}/bin' >> "$GITHUB_PATH"

- name: Set up Go
uses: ./.github/actions/setup-go
with:
go-version: ${{ matrix.go }}

# This focused LLVM/runtime matrix complements the regular upstream Go,
# cache, LLGo and target workflows, including their macOS lanes.
- name: Test coroutine analysis
if: matrix.lane == 'integration'
run: go test -race -shuffle=on ./internal/coro

- name: Test target-neutral coroutine runtime core
if: matrix.lane == 'compat'
run: |
cd runtime
go test -race -shuffle=on ./internal/coroalloc -count=1
go test -race -shuffle=on ./internal/coro -count=1
go test -race -shuffle=on ./internal/corodoorbell -count=1
# The run-decision wrapper needs the production coro package but a
# test-local abort shim, so select its two sources instead of loading
# the complete LLGo runtime package into the host Go runtime.
go test -race -shuffle=on -tags=coro_run_decision_abi_test \
./internal/runtime/coro_run_decision.go \
./internal/runtime/coro_run_decision_test.go \
-run '^Test(CoroRunDecisionOutputModeV1|NormalCoroRunDecisionWordsV1|CoroRunDecisionWrapperRejectsMalformedNormalOnlyMode)$' -count=1
go test . -run '^(TestCoroNativeTargetBuildSelection|TestCoroTimerOwnerV2SourceABI|TestTimeSleep)' -count=1
# The complete LLGo runtime package intentionally owns symbols that
# collide with the host Go runtime. Use the real production adapter
# sources plus test-only definitions of the compiler-owned C wrappers
# to exercise begin/run/destroy without adding production callbacks.
# Compiler tests separately cover the LLVM/LLGo side; this is not a
# cross-language linked smoke test.
go test -race -shuffle=on -tags=coro_runtime_adapter_test \
./internal/runtime/coro_run_slice.go \
./internal/runtime/coro_program.go \
./internal/runtime/coro_sched.go \
./internal/runtime/coro_executor.go \
./internal/runtime/coro_panic_payload.go \
./internal/runtime/coro_executor_driver_legacy.go \
./internal/runtime/coro_ready_distribution_default.go \
./internal/runtime/coro_target_executor_retired_default.go \
./internal/runtime/coro_target_test_adapter.go \
./internal/runtime/coro_program_test.go \
-run '^TestCoroProgram' -count=1
# The native fleet is a deliberately isolated production adapter:
# select only its real source plus its host test so LLGo runtime
# symbols do not collide with the host Go runtime.
go test -race -shuffle=on -tags=coro_native_fleet_test \
./internal/runtime/coro_run_slice.go \
./internal/runtime/coro_ready_distribution_default.go \
./internal/runtime/coro_native_fleet.go \
./internal/runtime/coro_native_fleet_reactor.go \
./internal/runtime/coro_native_fleet_test.go \
-run '^TestCoroNativeFleet' -count=1
GOOS=js GOARCH=wasm CGO_ENABLED=0 go test \
-tags=coro_runtime_adapter_test \
-exec="$(go env GOROOT)/lib/wasm/go_js_wasm_exec" \
./internal/runtime/coro_run_slice.go \
./internal/runtime/coro_program.go \
./internal/runtime/coro_sched.go \
./internal/runtime/coro_executor.go \
./internal/runtime/coro_panic_payload.go \
./internal/runtime/coro_executor_driver_legacy.go \
./internal/runtime/coro_ready_distribution_default.go \
./internal/runtime/coro_target_executor_retired_default.go \
./internal/runtime/coro_target_test_adapter.go \
./internal/runtime/coro_program_test.go \
-run '^TestCoroProgram' -count=1
# Exercise the production typed hchan queue and exact coroutine
# source transaction together. The host atomic shim exercises the
# portable no-suspend channel gate without an OS mutex dependency.
go test -race -shuffle=on -tags='coro_channel_adapter_test,coro_channel_owner_test' \
./internal/runtime/z_chan.go \
./internal/runtime/z_chan_coro.go \
./internal/runtime/z_chan_lock_coro.go \
./internal/runtime/z_chan_lock_coro_atomic_host.go \
./internal/runtime/coro_channel_adapter_test.go \
./internal/runtime/coro_channel_owner_lock_test.go \
-run '^TestCoroChannelAdapter' -count=1
GOOS=js GOARCH=wasm CGO_ENABLED=0 go test \
-tags='coro_channel_adapter_test,coro_channel_owner_test' \
-exec="$(go env GOROOT)/lib/wasm/go_js_wasm_exec" \
./internal/runtime/z_chan.go \
./internal/runtime/z_chan_coro.go \
./internal/runtime/z_chan_lock_coro.go \
./internal/runtime/z_chan_lock_coro_atomic_host.go \
./internal/runtime/coro_channel_adapter_test.go \
./internal/runtime/coro_channel_owner_lock_test.go \
-run '^TestCoroChannelAdapter' -count=1
# Semaphore and notify waits share one POD-only keyed registry. Race
# the exact production registry source to lock FIFO selection,
# generation reuse, cancellation, and single-owner posting.
go test -race -shuffle=on -tags=coro_sema_owner_test \
./internal/runtime/z_chan_lock_coro.go \
./internal/runtime/z_chan_lock_coro_atomic_host.go \
./internal/runtime/coro_keyed_park.go \
./internal/runtime/coro_keyed_post_test.go \
./internal/runtime/coro_keyed_registry_test.go \
-run '^TestCoroKeyed' -count=1
go test ./internal/corotimer -run '^TestDeadlineAfter$' -count=1

- name: Link named freestanding WebAssembly targets
if: matrix.lane == 'targets'
env:
LLGO_WASM_TARGET_SMOKE: "1"
run: |
go test -v ./internal/crosscompile -run '^TestFreestandingWasmTargetToolchainSmoke$' -count=1
go build -o /tmp/llgo-wasm-target ./cmd/llgo
for target in wasip2 wasm-unknown; do
output="/tmp/llgo-${target}.wasm"
LLGO_BUILD_CACHE=off LDFLAGS='--export=main' \
/tmp/llgo-wasm-target build -target="$target" -o "$output" \
./internal/crosscompile/testdata/wasm_allocator
test "$(od -An -t x1 -N4 "$output" | tr -d ' \n')" = '0061736d'
symbols="$(llvm-nm --defined-only --format=just-symbols "$output")"
for symbol in main malloc free sbrk abort; do
grep -Fx "$symbol" <<<"$symbols"
done
! grep -E '^GC_' <<<"$symbols"
test -z "$(llvm-nm --undefined-only --format=just-symbols "$output")"
if command -v wasmtime >/dev/null; then
result="$(wasmtime run --invoke main "$output" 0 0)"
test "$result" = '0'
fi
done

- name: Compile coroutine runtime adapter across targets
if: matrix.lane == 'targets'
run: |
cd runtime
GOOS=js GOARCH=wasm CGO_ENABLED=0 go test -c -o /tmp/coro-js-wasm.test ./internal/runtime
GOOS=wasip1 GOARCH=wasm CGO_ENABLED=0 go test -c -o /tmp/coro-wasip1-wasm.test ./internal/runtime
GOOS=linux GOARCH=arm CGO_ENABLED=0 go test -c -o /tmp/coro-linux-arm.test ./internal/runtime
GOOS=linux GOARCH=riscv64 CGO_ENABLED=0 go test -c -o /tmp/coro-linux-riscv64.test ./internal/runtime
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go test -c -o /tmp/coro-doorbell-linux-arm64.test ./internal/corodoorbell
GOOS=linux GOARCH=riscv64 CGO_ENABLED=0 go test -c -o /tmp/coro-doorbell-linux-riscv64.test ./internal/corodoorbell
GOOS=linux GOARCH=arm CGO_ENABLED=0 go test -c -tags='baremetal cortexm' -o /tmp/coro-cortexm-baremetal.test ./internal/runtime

- name: Test coroutine build integration
if: matrix.lane == 'integration'
# Keep the focused workflow exhaustive for the build-side coroutine
# contract. This includes park effect seeding, frozen foreign noblock
# certificates, IRQUnsafe handling, the explicit-status panic stop, and
# the native linked static-spawn scheduler-island execution smoke. The
# timer checks have their own LLVM 19-22 steps below, so do not run them
# twice in the LLVM 19 job.
run: go test ./internal/build -run 'Coro|Coroutine' -skip '^TestCoroNativeTimeSleepProductionPlanAndCodegen$' -timeout=10m -count=1

- name: Verify production time.Sleep coroutine plan
if: matrix.lane == 'compat'
run: go test -tags='${{ matrix.tags }}' -v ./internal/build -run '^TestCoroNativeTimeSleepProductionPlanAndCodegen$' -timeout=10m -count=1

- name: Test coroutine compiler integration
if: matrix.lane == 'integration'
run: |
go test -race ./cl/ssawrap -count=1
go test -race ./cl -run '^Test(CompilationCoroPlanObservationAndCacheRegistration|CoroEntryResolutionPlainPrimaryPreservesIR|ResolveFunctionSymbolUsesPrimaryAndExactPlan|CoroEntryRejectsUnsupportedBeforeCreatingSymbol|CoroEntryResolutionPreflightRejectsWholePlanBeforeCodegen|CoroEntryResolutionPreflightRejectsMissingPlanAndCache|Emission.*)$' -count=1
# Compile and execute one ordinary program through LLGo so the new
# runtime glue is checked by LLGo itself, not only by the host Go compiler.
go test ./cl -run '^TestRunAndTestFromTestgo/print$' -count=1

- name: Test structured LLVM coroutine builder
if: matrix.lane == 'compat'
run: go test -tags='${{ matrix.tags }}' -v ./ssa -run '^TestCoro' -count=1

- name: Test canonical coroutine plan digest and cache identity
if: matrix.lane == 'compat'
run: |
go test -tags='${{ matrix.tags }}' ./internal/coro -run '^TestCoroPlanDigest' -count=1
go test -tags='${{ matrix.tags }}' ./internal/build -run '^Test(BuildCoroPlanInstallsArchiveDigest|CoroutinePlanInputsAffectFingerprint|CoroEntryResolutionUsesPlanMatchedPackageCache|CoroPlanDigestMetadataUsesEffectiveLLVMTarget|CoroPhysicalABICacheRegistrationPreservesCollectedFuncInfo)$' -count=1
go test -tags='${{ matrix.tags }}' ./cl -run '^Test(CompilationCoroABIIdentityValidation|CoroEntryResolutionCacheRegistrationWithDigest|CoroPhysicalABICacheRegistrationPreservesPhysicalMetadata)$' -count=1

- name: Test coroutine physical ABI and function dispatch lowering
if: matrix.lane == 'compat'
# Run every compiler test whose name is part of the coroutine contract;
# in particular this covers pure SSA aggregates/PHI and caller-frame
# park lowering on native64 and wasm32 before and after CoroSplit.
run: go test -tags='${{ matrix.tags }}' -v ./cl -run '^Test(Coro|EmissionUniverse(ActiveABIMethodTablesUseFrozenWrapperSymbols|ABIMethodDemandReferencesAreExactRecursiveAndOwnerScoped))' -count=1

- name: Test coroutine TLS function dispatch proof
if: matrix.lane == 'compat'
run: go test -tags='${{ matrix.tags }}' -v ./internal/build -run '^TestCoroTLS' -count=1

- name: Test coroutine registry and control integration
if: matrix.lane == 'compat'
run: go test -tags='${{ matrix.tags }}' -v ./internal/build -run '^Test(CollectLinkedCoroRootAnchors|ActiveCoroABIVersions|BuildCoroPlanErrors|CoroProgramManifest.*|CoroProgramBootstrap.*|SelectCoroProgramBootstrap.*|GenMainModule.*Coro.*)$' -count=1

- name: Test LLVM 22 tool configuration
if: matrix.lane == 'compat' && matrix.llvm == 22
run: go test -tags=llvm22 ./xtool/env/llvm ./internal/xtool/llvm

- name: Test resolved LLVM target configuration
if: matrix.lane == 'targets'
run: |
go test ./internal/xtool/llvm -run '^TestGetTarget(Spec|Triple)$' -count=1
go test ./internal/crosscompile -run '^Test(UseTarget|UseExportsResolvedLLVMConfig|ResolvedLLVMTargetSpecWASIThreads)$' -count=1
go test ./internal/cabi -run '^TestDevLTOGlobalDCETargetArchAndNewTransformerArchSelection$' -count=1
go test -v ./ssa -run '^Test(ResolvedTargetConfig(|IsAuthoritativeAndFrozen)|TargetDataLegacyLayoutCompatibility|ResolvedPointerWidthMismatchFallsBack|NewProgramDefaultTargetCompatibility|ResolvedExternalBackendCompatibilityFallback|ResolvedTargetABINameControlsRISCVObject)$' -count=1
go test ./internal/build -run '^Test(NewLLSSATargetUsesResolvedLLVMConfig|LLVMCPUAndFeaturesAffectBuildFingerprint|DefaultTargetKeepsLegacyCacheIdentity|NonDefaultLLVMFeaturesEnterCacheIdentity|ResolvedTargetCompatibilityAudit)$' -count=1

- name: Check llgo-tag build
if: matrix.lane == 'integration'
run: go test -tags=llgo ./internal/coro

- name: Vet coroutine analysis
if: matrix.lane == 'integration'
run: |
go vet ./internal/coro ./internal/build ./cl/ssawrap ./internal/xtool/llvm ./internal/crosscompile ./internal/cabi
# The runtime package has pre-existing unsafe.Pointer findings.
(cd runtime && go vet ./internal/coro && go vet -unsafeptr=false ./internal/runtime)
# The compiler package has a pre-existing unsafe.Pointer finding.
# Disable only that analyzer and keep all other checks enabled.
go vet -unsafeptr=false ./cl
# The SSA package has pre-existing sync.Map copylocks findings. Keep
# every other analyzer active while coroutine slices are integrated.
go vet -copylocks=false ./ssa
7 changes: 6 additions & 1 deletion .github/workflows/fmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ jobs:
pushd "$dir" >/dev/null
# gofmt won't traverse directories that start with '_' or 'testdata',
# so mirror dev/local_ci.sh and scan every Go file explicitly.
# pthread.go intentionally keeps c2go's spaced `// llgo:link`
# directive adjacent to `//llgo:coro`; gofmt splits that single
# FuncDecl doc group and changes the compiler-visible contract.
fmt_output="$(
find . -name '*.go' -type f ! -name 'xgo_autogen.go' -print0 \
find . -name '*.go' -type f ! -name 'xgo_autogen.go' \
! -path './runtime/internal/clite/pthread/pthread.go' \
! -path './internal/clite/pthread/pthread.go' -print0 \
| xargs -0 gofmt -l \
| sed 's|^\\./||' \
|| true
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/targets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ concurrency:

jobs:
llgo:
timeout-minutes: 30
# The empty and defer probes compile the complete embedded target catalog
# sequentially. Coroutine planning makes the combined lane exceed the old
# 30-minute budget on hosted runners even while targets keep succeeding.
timeout-minutes: 45
strategy:
matrix:
os:
Expand Down
24 changes: 21 additions & 3 deletions _demo/embed/targetsbuild/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,27 @@ for target in "${targets_to_build[@]}"; do
continue
fi

output=$(../../../dev/llgo.sh build -target $target -o hello.elf "./$test_dir" 2>&1)
if [ $? -eq 0 ]; then
echo ✅ $target `file hello.elf`
# The named wasm target is the Emscripten environment, not the freestanding
# wasm-unknown or WASI target. Keep target resolution honest and report a
# missing optional SDK as a capability warning; dedicated WebAssembly jobs
# exercise the toolchain-independent wasm targets.
if [[ "$target" == "wasm" ]] && ! command -v emcc >/dev/null 2>&1; then
echo ⚠️ $target "(Emscripten SDK is not installed; wasm-unknown and WASI are tested separately)"
warned_targets+=("$target")
continue
fi

if output=$(../../../dev/llgo.sh build -target "$target" -o hello.elf "./$test_dir" 2>&1); then
artifact=hello.elf
if [[ "$target" == "wasm" ]]; then
artifact=hello.elf.wasm
fi
if [ ! -f "$artifact" ]; then
echo ❌ "$target (build succeeded without expected artifact $artifact)"
failed_targets+=("$target")
continue
fi
echo ✅ "$target $(file "$artifact")"
successful_targets+=("$target")
else
# Check if output contains warning messages
Expand Down
16 changes: 14 additions & 2 deletions cl/_testdata/llgosyscall/in.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ func syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr)
//go:linkname syscall6X llgo.syscall
func syscall6X(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr)

//go:linkname syscall32 llgo.syscall32
func syscall32(fn, a1, a2, a3 uintptr) (r1, r2, err uintptr)

//go:linkname syscall5f64 llgo.syscall
func syscall5f64(fn, a1, a2, a3, a4, a5 uintptr, f1 float64) (r1, r2, err uintptr)

//go:linkname syscallPtr llgo.syscall
//go:linkname syscallPtr llgo.syscallPtr
func syscallPtr(fn, a1, a2, a3 uintptr) (r1, r2, err uintptr)

//go:linkname rawSyscall llgo.syscall
Expand All @@ -36,6 +39,15 @@ func Use() uintptr {
return r1
}

// CHECK-LABEL: define i64 @"{{.*}}/llgosyscall.Use32"(){{.*}} {
// CHECK: %[[R:[0-9]+]] = call i64 null(i64 1, i64 2, i64 3)
// CHECK: %[[LOW:[0-9]+]] = trunc i64 %[[R]] to i32
// CHECK: %{{[0-9]+}} = icmp eq i32 %[[LOW]], -1
func Use32() uintptr {
r1, _, _ := syscall32(0, 1, 2, 3)
return r1
}

// CHECK-LABEL: define i64 @"{{.*}}/llgosyscall.Use5F64"(i64 %0, double %1){{.*}} {
// CHECK: %{{[0-9]+}} = inttoptr i64 %0 to ptr
// CHECK: %{{[0-9]+}} = call i64 %{{[0-9]+}}(i64 1, i64 2, i64 3, i64 4, i64 5, double %1)
Expand Down Expand Up @@ -79,7 +91,7 @@ func Use6X() uintptr {
// CHECK-LABEL: define i64 @"{{.*}}/llgosyscall.UsePtr"(){{.*}} {
// CHECK-NEXT: _llgo_0:
// CHECK-NEXT: %0 = call i64 null(i64 1, i64 2, i64 3)
// CHECK-NEXT: %1 = icmp eq i64 %0, -1
// CHECK-NEXT: %1 = icmp eq i64 %0, 0
// CHECK-NEXT: %2 = call i32 @cliteErrno()
// CHECK-NEXT: %3 = sext i32 %2 to i64
// CHECK-NEXT: %4 = select i1 %1, i64 %3, i64 0
Expand Down
Loading
Loading