> On 17 Sep 2024, at 22:05, Jason Merrill <ja...@redhat.com> wrote: > > On 8/29/24 9:10 PM, Iain Sandoe wrote:
>> + /* deref the frame pointer, to use in member access code. */ >> + tree deref_fp >> + = cp_build_indirect_ref (loc, coro_fp, RO_UNARY_STAR, >> + tf_warning_or_error); >> + tree frame_needs_free >> + = coro_build_and_push_artificial_var_with_dve (loc, >> + coro_frame_needs_free_id, >> + boolean_type_node, >> + orig_fn_decl, NULL_TREE, >> + deref_fp, >> + coro_frame_needs_free_id); > > I notice that all the calls to _with_dve pass the same id twice, maybe the > "field" parameter should have a default argument of NULL_TREE that defaults > to the same as "name"? Good idea (done). Most of the cases will be like this - there’s no need to have a different local name from the frame entry. The important case where it is different is in the frame copies of the function parms, since they must be known by the parm name in the actor - but a different name in the ramp (which needs to init them from said parms). > OK either way. what was applied is attached thanks Iain
0001-c-coroutines-Rework-the-ramp-codegen.patch
Description: Binary data