Changeset b583113 for libcfa/src/concurrency/coroutine.cfa
- Timestamp:
- Apr 21, 2021, 3:44:58 PM (3 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 578c09a
- Parents:
- 7711064
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/coroutine.cfa
r7711064 rb583113 46 46 47 47 //----------------------------------------------------------------------------- 48 EHM_VIRTUAL_TABLE(SomeCoroutineCancelled, std_coroutine_cancelled);49 50 48 forall(T &) 51 49 void copy(CoroutineCancelled(T) * dst, CoroutineCancelled(T) * src) { … … 62 60 // This code should not be inlined. It is the error path on resume. 63 61 forall(T & | is_coroutine(T)) 64 void __cfaehm_cancelled_coroutine( T & cor, $coroutine * desc ) { 62 void __cfaehm_cancelled_coroutine( 63 T & cor, $coroutine * desc, _EHM_VTABLE_TYPE(CoroutineCancelled)(T) & const _default_vtable ) { 65 64 verify( desc->cancellation ); 66 65 desc->state = Cancelled; … … 68 67 69 68 // TODO: Remove explitate vtable set once trac#186 is fixed. 70 SomeCoroutineCancelledexcept;71 except.virtual_table = & std_coroutine_cancelled;69 CoroutineCancelled(T) except; 70 except.virtual_table = &_default_vtable; 72 71 except.the_coroutine = &cor; 73 72 except.the_exception = except; 74 73 // Why does this need a cast? 75 throwResume ( SomeCoroutineCancelled&)except;74 throwResume (CoroutineCancelled(T) &)except; 76 75 77 76 except->virtual_table->free( except ); … … 146 145 // Part of the Public API 147 146 // Not inline since only ever called once per coroutine 148 forall(T & | is_coroutine(T) )147 forall(T & | is_coroutine(T) | { _EHM_VTABLE_TYPE(CoroutineCancelled)(T) & const _default_vtable; }) 149 148 void prime(T& cor) { 150 149 $coroutine* this = get_coroutine(cor);
Note: See TracChangeset
for help on using the changeset viewer.