verifier: preserve resource obligations across CFG handoff
This commit is contained in:
1 parent
0e98638bc6
commit
09fbf8a5bc
34 files changed
+1267
-67
No files matched your search
@@ -0,0 +1,31 @@
|
||||
; The scope and its task are passed together through block arguments; the renamed scope ends while the renamed task is unjoined.
|
||||
; expect: reject E4301
|
||||
; phase: 3
|
||||
; spec: docs/spec/04-concurrency-and-atomics.md §33
|
||||
module test.cfg_provenance_scope_task
|
||||
air 0
|
||||
lang 0.1
|
||||
features [cancellation, effects, ownership, tasks]
|
||||
|
||||
fn @main() -> u8
|
||||
effects [task.spawn, task.wait]
|
||||
entry:
|
||||
%sc = task.scope.begin
|
||||
%t = task.spawn %sc, @zero()
|
||||
br @next(%sc, %t)
|
||||
next(%s2: scope, %t2: task<u8>):
|
||||
task.scope.end %s2
|
||||
%v = const.u8 0
|
||||
ret %v
|
||||
|
||||
fn @rd(%p: ref<u8>) -> u8
|
||||
effects []
|
||||
entry:
|
||||
%v = load %p
|
||||
ret %v
|
||||
|
||||
fn @zero() -> u8
|
||||
effects []
|
||||
entry:
|
||||
%z = const.u8 0
|
||||
ret %z
|
||||
Reference in new issue
Block a user