<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/test/codegen/async-fn-debug-msvc.rs, branch perf-tmp</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=perf-tmp</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=perf-tmp'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2023-01-11T09:32:08+00:00</updated>
<entry>
<title>Move /src/test to /tests</title>
<updated>2023-01-11T09:32:08+00:00</updated>
<author>
<name>Albert Larsan</name>
<email>74931857+albertlarsan68@users.noreply.github.com</email>
</author>
<published>2023-01-05T08:13:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cf2dff2b1e3fa55fa5415d524200070d0d7aacfe'/>
<id>urn:sha1:cf2dff2b1e3fa55fa5415d524200070d0d7aacfe</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[debuginfo] Update codegen tests for new cpp-like enum debuginfo encoding.</title>
<updated>2022-08-12T10:00:02+00:00</updated>
<author>
<name>Michael Woerister</name>
<email>michaelwoerister@posteo</email>
</author>
<published>2022-08-12T10:00:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ee634fbf0d754df41b875f9f67088ad406efa96c'/>
<id>urn:sha1:ee634fbf0d754df41b875f9f67088ad406efa96c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>debuginfo: change cpp-like naming for generator environments so that NatVis works for them</title>
<updated>2022-03-14T15:52:47+00:00</updated>
<author>
<name>Michael Woerister</name>
<email>michaelwoerister@posteo</email>
</author>
<published>2022-03-03T11:10:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3ad299aa670face2085d2abec6e8481fa582068a'/>
<id>urn:sha1:3ad299aa670face2085d2abec6e8481fa582068a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>debuginfo: Refactor debuginfo generation for types</title>
<updated>2022-03-14T15:49:06+00:00</updated>
<author>
<name>Michael Woerister</name>
<email>michaelwoerister@posteo</email>
</author>
<published>2022-03-03T10:15:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=07ebc13d87796622bb6e4ac46a7e6a054bc4c680'/>
<id>urn:sha1:07ebc13d87796622bb6e4ac46a7e6a054bc4c680</id>
<content type='text'>
This commit
- changes names to use di_node instead of metadata
- uniformly names all functions that build new debuginfo nodes build_xyz_di_node
- renames CrateDebugContext to CodegenUnitDebugContext (which is more accurate)
- moves TypeMap and functions that work directly work with it to a new type_map module
- moves and reimplements enum related builder functions to a new enums module
- splits enum debuginfo building for the native and cpp-like cases, since they are mostly separate
- uses SmallVec instead of Vec in many places
- removes the old infrastructure for dealing with recursion cycles (create_and_register_recursive_type_forward_declaration(), RecursiveTypeDescription, set_members_of_composite_type(), MemberDescription, MemberDescriptionFactory, prepare_xyz_metadata(), etc)
- adds type_map::build_type_with_children() as a replacement for dealing with recursion cycles
- adds many (doc-)comments explaining what's going on
- changes cpp-like naming for C-Style enums so they don't get a enum$&lt;...&gt; name (because the NatVis visualizer does not apply to them)
- fixes detection of what is a C-style enum because some enums where classified as C-style even though they have fields
- changes the position of discriminant debuginfo node so it is consistently nested inside the top-level union instead of, sometimes, next to it
</content>
</entry>
<entry>
<title>debuginfo: Make sure that type names for closure and generator environments are unique in debuginfo.</title>
<updated>2022-02-01T09:39:40+00:00</updated>
<author>
<name>Michael Woerister</name>
<email>michaelwoerister@posteo</email>
</author>
<published>2022-01-19T16:56:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fd7557b7ee454058fff84b556892adbef89f7d52'/>
<id>urn:sha1:fd7557b7ee454058fff84b556892adbef89f7d52</id>
<content type='text'>
Before this change, closure/generator environments coming from different
instantiations of the same generic function were all assigned the same
name even though they were distinct types with potentially different data
layout. Now we append the generic arguments of the originating function
to the type name.

This commit also emits '{closure_env#0}' as the name of these types in
order to disambiguate them from the accompanying closure function
'{closure#0}'. Previously both were assigned the same name.
</content>
</entry>
<entry>
<title>Generate more precise generator names</title>
<updated>2022-01-13T23:38:03+00:00</updated>
<author>
<name>Eric Holk</name>
<email>ericholk@microsoft.com</email>
</author>
<published>2022-01-13T23:31:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=05e1f0d7691860e44e87595e8a6a572f7c14d605'/>
<id>urn:sha1:05e1f0d7691860e44e87595e8a6a572f7c14d605</id>
<content type='text'>
Currently all generators are named with a `generator$N` suffix,
regardless of where they come from. This means an `async fn` shows up as
a generator in stack traces, which can be surprising to async
programmers since they should not need to know that async functions are
implementated using generators.

This change generators a different name depending on the generator kind,
allowing us to tell whether the generator is the result of an async
block, an async closure, an async fn, or a plain generator.
</content>
</entry>
<entry>
<title>Fix async-fn-debug-msvc and generator-debug-msvc codegen tests</title>
<updated>2021-07-05T22:38:15+00:00</updated>
<author>
<name>Wesley Wiser</name>
<email>wesleywiser@microsoft.com</email>
</author>
<published>2021-07-05T22:38:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=38b9061d0a9dabbccc023f96d9b9cee647ea42dd'/>
<id>urn:sha1:38b9061d0a9dabbccc023f96d9b9cee647ea42dd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Improve debug symbol names to avoid ambiguity and work better with MSVC's debugger</title>
<updated>2021-06-30T18:10:29+00:00</updated>
<author>
<name>Daniel Paoliello</name>
<email>danpao@microsoft.com</email>
</author>
<published>2021-06-24T17:36:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=aac8a885520854e4b60ea5733b8b06f9e0cc1fcc'/>
<id>urn:sha1:aac8a885520854e4b60ea5733b8b06f9e0cc1fcc</id>
<content type='text'>
There are several cases where names of types and functions in the debug info are either ambiguous, or not helpful, such as including ambiguous placeholders (e.g., `{{impl}}`, `{{closure}}` or `dyn _'`) or dropping qualifications (e.g., for dynamic types).

Instead, each debug symbol name should be unique and useful:
* Include disambiguators for anonymous `DefPathDataName` (closures and generators), and unify their formatting when used as a path-qualifier vs item being qualified.
* Qualify the principal trait for dynamic types.
* If there is no principal trait for a dynamic type, emit all other traits instead.
* Respect the `qualified` argument when emitting ref and pointer types.
* For implementations, emit the disambiguator.
* Print const generics when emitting generic parameters or arguments.

Additionally, when targeting MSVC, its debugger treats many command arguments as C++ expressions, even when the argument is defined to be a symbol name. As such names in the debug info need to be more C++-like to be parsed correctly:
* Avoid characters with special meaning (`#`, `[`, `"`, `+`).
* Never start a name with `&lt;` or `{` as this is treated as an operator.
* `&gt;&gt;` is always treated as a right-shift, even when parsing generic arguments (so add a space to avoid this).
* Emit function declarations using C/C++ style syntax (e.g., leading return type).
* Emit arrays as a synthetic `array$&lt;type, size&gt;` type.
* Include a `$` in all synthetic types as this is a legal character for C++, but not Rust (thus we avoid collisions with user types).
</content>
</entry>
<entry>
<title>Update generator tests</title>
<updated>2021-06-02T20:09:23+00:00</updated>
<author>
<name>Wesley Wiser</name>
<email>wesleywiser@microsoft.com</email>
</author>
<published>2021-06-02T20:09:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=94c45ef1089bfd9fa4304cf67dedce4788883051'/>
<id>urn:sha1:94c45ef1089bfd9fa4304cf67dedce4788883051</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove artificial flag from generator variants</title>
<updated>2021-04-30T14:36:08+00:00</updated>
<author>
<name>lrh2000</name>
<email>lrh2000@pku.edu.cn</email>
</author>
<published>2021-04-30T12:02:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5bf989ece9e29941f2c517a39289a60bfb8595c0'/>
<id>urn:sha1:5bf989ece9e29941f2c517a39289a60bfb8595c0</id>
<content type='text'>
 - Literally, variants are not artificial. We have `yield` statements,
   upvars and inner variables in the source code.
 - Functionally, we don't want debuggers to suppress the variants. It
   contains the state of the generator, which is useful when debugging.
   So they shouldn't be marked artificial.
 - Debuggers may use artificial flags to find the active variant. In
   this case, marking variants artificial will make debuggers not work
   properly.

Fixes #79009.
</content>
</entry>
</feed>
