)]}'
{
  "commit": "c5a735fa9df7eca4666c8da5e51ed9c5ab7cc81a",
  "tree": "87ad38cdd386dfe7e74c9ee171f0bbf21f8cc6a6",
  "parents": [
    "de07cff96abd43f6f65dcf333958899c2ec42598"
  ],
  "author": {
    "name": "Iain Sandoe",
    "email": "iain@sandoe.co.uk",
    "time": "Wed Jul 07 20:01:54 2021 +0100"
  },
  "committer": {
    "name": "Iain Sandoe",
    "email": "iain@sandoe.co.uk",
    "time": "Tue Sep 14 16:55:37 2021 +0100"
  },
  "message": "coroutines: Expose implementation state to the debugger.\n\nIn the process of transforming a coroutine into the separate representation\nas the ramp function and a state machine, we generate some variables that\nare of interest to a user during debugging.  Any variable that is persistent\nfor the execution of the coroutine is placed into the coroutine frame.\n\nIn particular:\n  The promise object.\n  The function pointers for the resumer and destroyer.\n  The current resume index (suspend point).\n  The handle that represents this coroutine \u0027self handle\u0027.\n  Any handle provided for a continuation coroutine.\n  Whether the coroutine frame is allocated and needs to be freed.\n\nVisibility of some of these has already been requested by end users.\n\nThis patch ensures that such variables have names that are usable in a\ndebugger, but are in the reserved namespace for the implementation (they\nall begin with _Coro_).  The identifiers are generated lazily when the\nfirst coroutine is encountered.\n\nWe place the variables into the outermost bind expression and then add a\nDECL_VALUE_EXPR to each that points to the frame entry.\n\nThese changes simplify the handling of the variables in the body of the\nfunction (in particular, the use of the DECL_VALUE_EXPR means that we now\nno longer need to rewrite proxies for the promise and coroutine handles into\nthe frame-\u003eoffset form).\n\nPartial improvement to debugging (PR c++/99215).\n\nSigned-off-by: Iain Sandoe \u003ciain@sandoe.co.uk\u003e\n\ngcc/cp/ChangeLog:\n\n\t* coroutines.cc (coro_resume_fn_id, coro_destroy_fn_id,\n\tcoro_promise_id, coro_frame_needs_free_id, coro_resume_index_id,\n\tcoro_self_handle_id, coro_actor_continue_id,\n\tcoro_frame_i_a_r_c_id): New.\n\t(coro_init_identifiers): Initialize new name identifiers.\n\t(coro_promise_type_found_p): Use pre-built identifiers.\n\t(struct await_xform_data): Remove unused fields.\n\t(transform_await_expr): Delete code that is now unused.\n\t(build_actor_fn): Simplify interface, use pre-built identifiers and\n\tremove transforms that are no longer needed.\n\t(build_destroy_fn): Use revised field names.\n\t(register_local_var_uses): Use pre-built identifiers.\n\t(coro_rewrite_function_body): Simplify interface, use pre-built\n\tidentifiers.  Generate proxy vars in the outer bind expr scope for the\n\timplementation state that we wish to expose.\n\t(morph_fn_to_coro): Adjust comments for new variable names, use pre-\n\tbuilt identifiers.  Remove unused code to generate frame entries for\n\tthe implementation state.  Adjust call for build_actor_fn.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9ab2be04266953a5a7f892fcf438ee9a45a3f601",
      "old_mode": 33188,
      "old_path": "gcc/cp/coroutines.cc",
      "new_id": "cd774b78ae0fae408d22d8dcbd7d3002a3d7675e",
      "new_mode": 33188,
      "new_path": "gcc/cp/coroutines.cc"
    }
  ]
}
