<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/librustc_allocator, branch 1.34.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.34.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.34.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2019-02-12T12:10:10+00:00</updated>
<entry>
<title>Auto merge of #58098 - oli-obk:maybe_allow_internal_unstable, r=petrochenkov</title>
<updated>2019-02-12T12:10:10+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2019-02-12T12:10:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c84e7976423bb910bb5eb5eecffc7e33a897a97f'/>
<id>urn:sha1:c84e7976423bb910bb5eb5eecffc7e33a897a97f</id>
<content type='text'>
Require a list of features in `#[allow_internal_unstable]`

The blanket-permission slip is not great and will likely give us trouble some point down the road.
</content>
</entry>
<entry>
<title>Use `Rc&lt;[Symbol]&gt;` instead of `Vec&lt;Symbol&gt;` to reduce # of allocs</title>
<updated>2019-02-11T14:08:17+00:00</updated>
<author>
<name>Oliver Scherer</name>
<email>github35764891676564198441@oli-obk.de</email>
</author>
<published>2019-02-07T13:19:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b681433b9d40ce1d851d22bedb7ccb483bedda06'/>
<id>urn:sha1:b681433b9d40ce1d851d22bedb7ccb483bedda06</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Require a list of features to allow in `allow_internal_unstable`</title>
<updated>2019-02-11T14:08:16+00:00</updated>
<author>
<name>Oliver Scherer</name>
<email>github35764891676564198441@oli-obk.de</email>
</author>
<published>2019-02-03T11:55:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d3c212c5527f901fcb44d59d031695248762c340'/>
<id>urn:sha1:d3c212c5527f901fcb44d59d031695248762c340</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Revert removed #![feature(nll)]</title>
<updated>2019-02-10T07:13:30+00:00</updated>
<author>
<name>Taiki Endo</name>
<email>te316e89@gmail.com</email>
</author>
<published>2019-02-10T07:13:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2be0993c4e219994b355a06e82394c966a2cfa5d'/>
<id>urn:sha1:2be0993c4e219994b355a06e82394c966a2cfa5d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>librustc_allocator =&gt; 2018</title>
<updated>2019-02-06T13:55:03+00:00</updated>
<author>
<name>Taiki Endo</name>
<email>te316e89@gmail.com</email>
</author>
<published>2019-02-06T13:55:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=44b2cc0941e63cb8b12fd3a361d8eb8564504a73'/>
<id>urn:sha1:44b2cc0941e63cb8b12fd3a361d8eb8564504a73</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>
<entry>
<title>Upgrade `smallvec` to 0.6.7 and use the new `may_dangle` feature.</title>
<updated>2018-12-09T22:31:27+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>nnethercote@mozilla.com</email>
</author>
<published>2018-11-28T21:52:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ecf6cd4b3c8d4e04e47f1e49a6a8fb4cda19700e'/>
<id>urn:sha1:ecf6cd4b3c8d4e04e47f1e49a6a8fb4cda19700e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Bump to 1.31.0 and bootstrap from 1.30 beta</title>
<updated>2018-09-28T03:52:53+00:00</updated>
<author>
<name>Josh Stone</name>
<email>jistone@redhat.com</email>
</author>
<published>2018-09-26T21:26:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ce034951fb907c8aa6abd5e6e04769e5e628953c'/>
<id>urn:sha1:ce034951fb907c8aa6abd5e6e04769e5e628953c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove OneVector</title>
<updated>2018-09-26T08:43:37+00:00</updated>
<author>
<name>ljedrz</name>
<email>ljedrz@gmail.com</email>
</author>
<published>2018-08-30T09:42:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=130a32fa7259d348dc3a684b38e688da398c30bb'/>
<id>urn:sha1:130a32fa7259d348dc3a684b38e688da398c30bb</id>
<content type='text'>
</content>
</entry>
</feed>
