<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/librustc_data_structures/thin_vec.rs, branch beta</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=beta</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=beta'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2020-08-30T15:45:07+00:00</updated>
<entry>
<title>mv compiler to compiler/</title>
<updated>2020-08-30T15:45:07+00:00</updated>
<author>
<name>mark</name>
<email>markm@cs.wisc.edu</email>
</author>
<published>2020-08-28T03:58:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9e5f7d5631b8f4009ac1c693e585d4b7108d4275'/>
<id>urn:sha1:9e5f7d5631b8f4009ac1c693e585d4b7108d4275</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rework `rustc_serialize`</title>
<updated>2020-08-14T16:34:30+00:00</updated>
<author>
<name>Matthew Jasper</name>
<email>mjjasper1@gmail.com</email>
</author>
<published>2020-06-11T14:49:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cbcef3effcf64bd0d89ea2dc8973e18d7fcf94c3'/>
<id>urn:sha1:cbcef3effcf64bd0d89ea2dc8973e18d7fcf94c3</id>
<content type='text'>
- Move the type parameter from `encode` and `decode` methods to
  the trait.
- Remove `UseSpecialized(En|De)codable` traits.
- Remove blanket impls for references.
- Add `RefDecodable` trait to allow deserializing to arena-allocated
  references safely.
- Remove ability to (de)serialize HIR.
- Create proc-macros `(Ty)?(En|De)codable` to help implement these new
  traits.
</content>
</entry>
<entry>
<title>Add Extend::{extend_one,extend_reserve}</title>
<updated>2020-05-30T00:05:17+00:00</updated>
<author>
<name>Josh Stone</name>
<email>jistone@redhat.com</email>
</author>
<published>2020-05-13T03:09:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6700e186883a83008963d1fdba23eff2b1713e56'/>
<id>urn:sha1:6700e186883a83008963d1fdba23eff2b1713e56</id>
<content type='text'>
This adds new optional methods on `Extend`: `extend_one` add a single
element to the collection, and `extend_reserve` pre-allocates space for
the predicted number of incoming elements. These are used in `Iterator`
for `partition` and `unzip` as they shuffle elements one-at-a-time into
their respective collections.
</content>
</entry>
<entry>
<title>Format the world</title>
<updated>2019-12-22T22:42:47+00:00</updated>
<author>
<name>Mark Rousskov</name>
<email>mark.simulacrum@gmail.com</email>
</author>
<published>2019-12-22T22:42:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a06baa56b95674fc626b3c3fd680d6a65357fe60'/>
<id>urn:sha1:a06baa56b95674fc626b3c3fd680d6a65357fe60</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove many unnecessary trait derivations.</title>
<updated>2019-10-21T09:59:18+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>nnethercote@mozilla.com</email>
</author>
<published>2019-10-20T04:54:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ac6daed384d17abd31f84fc8205c21eee6a248be'/>
<id>urn:sha1:ac6daed384d17abd31f84fc8205c21eee6a248be</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Switch over all StableHash impls to new format</title>
<updated>2019-09-28T15:47:36+00:00</updated>
<author>
<name>Mark Rousskov</name>
<email>mark.simulacrum@gmail.com</email>
</author>
<published>2019-09-26T22:54:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=14a5aefb01bb4f18749ab56cd9fd37bf93c86a37'/>
<id>urn:sha1:14a5aefb01bb4f18749ab56cd9fd37bf93c86a37</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Allow attributes in formal function parameters</title>
<updated>2019-06-09T10:58:40+00:00</updated>
<author>
<name>Caio</name>
<email>c410.f3r@gmail.com</email>
</author>
<published>2019-06-09T10:58:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1eaaf440d5173f090d6e937f4b4cffec6c038984'/>
<id>urn:sha1:1eaaf440d5173f090d6e937f4b4cffec6c038984</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use derive macro for HashStable</title>
<updated>2019-03-12T23:03:13+00:00</updated>
<author>
<name>John Kåre Alsaker</name>
<email>john.kare.alsaker@gmail.com</email>
</author>
<published>2018-12-03T00:14:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3936aff2169a1f61633de2bc475face3a2682efb'/>
<id>urn:sha1:3936aff2169a1f61633de2bc475face3a2682efb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Overhaul `syntax::fold::Folder`.</title>
<updated>2019-02-05T22:06:27+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>nnethercote@mozilla.com</email>
</author>
<published>2019-02-05T04:20:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9fcb1658ab13a7f722e4747c5a4b691291e88a3b'/>
<id>urn:sha1:9fcb1658ab13a7f722e4747c5a4b691291e88a3b</id>
<content type='text'>
This commit changes `syntax::fold::Folder` from a functional style
(where most methods take a `T` and produce a new `T`) to a more
imperative style (where most methods take and modify a `&amp;mut T`), and
renames it `syntax::mut_visit::MutVisitor`.

The first benefit is speed. The functional style does not require any
reallocations, due to the use of `P::map` and
`MoveMap::move_{,flat_}map`. However, every field in the AST must be
overwritten; even those fields that are unchanged are overwritten with
the same value. This causes a lot of unnecessary memory writes. The
imperative style reduces instruction counts by 1--3% across a wide range
of workloads, particularly incremental workloads.

The second benefit is conciseness; the imperative style is usually more
concise. E.g. compare the old functional style:
```
fn fold_abc(&amp;mut self, abc: ABC) {
    ABC {
        a: fold_a(abc.a),
        b: fold_b(abc.b),
        c: abc.c,
    }
}
```
with the imperative style:
```
fn visit_abc(&amp;mut self, ABC { a, b, c: _ }: &amp;mut ABC) {
    visit_a(a);
    visit_b(b);
}
```
(The reductions get larger in more complex examples.)

Overall, the patch removes over 200 lines of code -- even though the new
code has more comments -- and a lot of the remaining lines have fewer
characters.

Some notes:

- The old style used methods called `fold_*`. The new style mostly uses
  methods called `visit_*`, but there are a few methods that map a `T`
  to something other than a `T`, which are called `flat_map_*` (`T` maps
  to multiple `T`s) or `filter_map_*` (`T` maps to 0 or 1 `T`s).

- `move_map.rs`/`MoveMap`/`move_map`/`move_flat_map` are renamed
  `map_in_place.rs`/`MapInPlace`/`map_in_place`/`flat_map_in_place` to
  reflect their slightly changed signatures.

- Although this commit renames the `fold` module as `mut_visit`, it
  keeps it in the `fold.rs` file, so as not to confuse git. The next
  commit will rename the file.
</content>
</entry>
<entry>
<title>Remove licenses</title>
<updated>2018-12-26T04:08:33+00:00</updated>
<author>
<name>Mark Rousskov</name>
<email>mark.simulacrum@gmail.com</email>
</author>
<published>2018-12-25T15:56:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2a663555ddf36f6b041445894a8c175cd1bc718c'/>
<id>urn:sha1:2a663555ddf36f6b041445894a8c175cd1bc718c</id>
<content type='text'>
</content>
</entry>
</feed>
