<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_codegen_ssa/src/debuginfo, branch 1.60.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.60.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.60.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2022-02-15T05:19:59+00:00</updated>
<entry>
<title>Overhaul `Const`.</title>
<updated>2022-02-15T05:19:59+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2022-02-02T03:24:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a95fb8b150a256856aedeca7ebf30b662d2e5141'/>
<id>urn:sha1:a95fb8b150a256856aedeca7ebf30b662d2e5141</id>
<content type='text'>
Specifically, rename the `Const` struct as `ConstS` and re-introduce `Const` as
this:
```
pub struct Const&lt;'tcx&gt;(&amp;'tcx Interned&lt;ConstS&gt;);
```
This now matches `Ty` and `Predicate` more closely, including using
pointer-based `eq` and `hash`.

Notable changes:
- `mk_const` now takes a `ConstS`.
- `Const` was copy, despite being 48 bytes. Now `ConstS` is not, so need a
  we need separate arena for it, because we can't use the `Dropless` one any
  more.
- Many `&amp;'tcx Const&lt;'tcx&gt;`/`&amp;Const&lt;'tcx&gt;` to `Const&lt;'tcx&gt;` changes
- Many `ct.ty` to `ct.ty()` and `ct.val` to `ct.val()` changes.
- Lots of tedious sigil fiddling.
</content>
</entry>
<entry>
<title>Overhaul `TyS` and `Ty`.</title>
<updated>2022-02-15T05:03:24+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2022-01-25T03:13:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e9a0c429c5da5a34c0469117774fe32694a0281c'/>
<id>urn:sha1:e9a0c429c5da5a34c0469117774fe32694a0281c</id>
<content type='text'>
Specifically, change `Ty` from this:
```
pub type Ty&lt;'tcx&gt; = &amp;'tcx TyS&lt;'tcx&gt;;
```
to this
```
pub struct Ty&lt;'tcx&gt;(Interned&lt;'tcx, TyS&lt;'tcx&gt;&gt;);
```
There are two benefits to this.
- It's now a first class type, so we can define methods on it. This
  means we can move a lot of methods away from `TyS`, leaving `TyS` as a
  barely-used type, which is appropriate given that it's not meant to
  be used directly.
- The uniqueness requirement is now explicit, via the `Interned` type.
  E.g. the pointer-based `Eq` and `Hash` comes from `Interned`, rather
  than via `TyS`, which wasn't obvious at all.

Much of this commit is boring churn. The interesting changes are in
these files:
- compiler/rustc_middle/src/arena.rs
- compiler/rustc_middle/src/mir/visit.rs
- compiler/rustc_middle/src/ty/context.rs
- compiler/rustc_middle/src/ty/mod.rs

Specifically:
- Most mentions of `TyS` are removed. It's very much a dumb struct now;
  `Ty` has all the smarts.
- `TyS` now has `crate` visibility instead of `pub`.
- `TyS::make_for_test` is removed in favour of the static `BOOL_TY`,
  which just works better with the new structure.
- The `Eq`/`Ord`/`Hash` impls are removed from `TyS`. `Interned`s impls
  of `Eq`/`Hash` now suffice. `Ord` is now partly on `Interned`
  (pointer-based, for the `Equal` case) and partly on `TyS`
  (contents-based, for the other cases).
- There are many tedious sigil adjustments, i.e. adding or removing `*`
  or `&amp;`. They seem to be unavoidable.
</content>
</entry>
<entry>
<title>debuginfo: Bring back DW_AT_containing_type for vtables -- address review comments</title>
<updated>2022-02-08T14:31:09+00:00</updated>
<author>
<name>Michael Woerister</name>
<email>michaelwoerister@posteo</email>
</author>
<published>2022-02-08T14:31:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ed21805aee9ad1abed5dc5157ac568e95fd84afb'/>
<id>urn:sha1:ed21805aee9ad1abed5dc5157ac568e95fd84afb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>debuginfo: Bring back DW_AT_containing_type for vtables after it has accidentally been</title>
<updated>2022-02-03T09:03:16+00:00</updated>
<author>
<name>Michael Woerister</name>
<email>michaelwoerister@posteo</email>
</author>
<published>2022-01-25T13:34:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fc7f419a63e4c98a928729d0ad59c426ccb84963'/>
<id>urn:sha1:fc7f419a63e4c98a928729d0ad59c426ccb84963</id>
<content type='text'>
removed in https://github.com/rust-lang/rust/pull/89597.

Also describe vtables as structs with a field for each entry.
</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>Add term to ExistentialProjection</title>
<updated>2022-01-17T20:01:22+00:00</updated>
<author>
<name>kadmin</name>
<email>julianknodt@gmail.com</email>
</author>
<published>2022-01-13T07:39:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1c1ce2fbda9c5d385fcb222d98d948aa4616fe91'/>
<id>urn:sha1:1c1ce2fbda9c5d385fcb222d98d948aa4616fe91</id>
<content type='text'>
Also prevent ICE when adding a const in associated const equality.
</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>Store a `Symbol` instead of an `Ident` in `VariantDef`/`FieldDef`</title>
<updated>2022-01-11T15:16:22+00:00</updated>
<author>
<name>Aaron Hill</name>
<email>aa1ronham@gmail.com</email>
</author>
<published>2022-01-03T03:37:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=450ef8613ce80278b98e1b1a73448ea810322567'/>
<id>urn:sha1:450ef8613ce80278b98e1b1a73448ea810322567</id>
<content type='text'>
The field is also renamed from `ident` to `name. In most cases,
we don't actually need the `Span`. A new `ident` method is added
to `VariantDef` and `FieldDef`, which constructs the full `Ident`
using `tcx.def_ident_span()`. This method is used in the cases
where we actually need an `Ident`.

This makes incremental compilation properly track changes
to the `Span`, without all of the invalidations caused by storing
a `Span` directly via an `Ident`.
</content>
</entry>
<entry>
<title>Consolidate checking for msvc when generating debuginfo</title>
<updated>2022-01-07T17:36:09+00:00</updated>
<author>
<name>Wesley Wiser</name>
<email>wesleywiser@microsoft.com</email>
</author>
<published>2021-12-28T21:57:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=836addcbc4fa825e07c78c6feb7f6a0b776ed41a'/>
<id>urn:sha1:836addcbc4fa825e07c78c6feb7f6a0b776ed41a</id>
<content type='text'>
If the target we're generating code for is msvc, then we do two main
things differently: we generate type names in a C++ style instead of a
Rust style and we generate debuginfo for enums differently.

I've refactored the code so that there is one function
(`cpp_like_debuginfo`) which determines if we should use the C++ style
of naming types and other debuginfo generation or the regular Rust one.
</content>
</entry>
<entry>
<title>Auto merge of #91957 - nnethercote:rm-SymbolStr, r=oli-obk</title>
<updated>2021-12-19T09:31:37+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2021-12-19T09:31:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a41a6925badac7508d7a72cc1fc20f43dc6ad75e'/>
<id>urn:sha1:a41a6925badac7508d7a72cc1fc20f43dc6ad75e</id>
<content type='text'>
Remove `SymbolStr`

This was originally proposed in https://github.com/rust-lang/rust/pull/74554#discussion_r466203544. As well as removing the icky `SymbolStr` type, it allows the removal of a lot of `&amp;` and `*` occurrences.

Best reviewed one commit at a time.

r? `@oli-obk`
</content>
</entry>
</feed>
