<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/librustc_metadata/decoder.rs, branch 1.14.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.14.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.14.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2016-10-30T07:01:21+00:00</updated>
<entry>
<title>Auto merge of #37401 - eddyb:lazy-2, r=nikomatsakis</title>
<updated>2016-10-30T07:01:21+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2016-10-30T07:01:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=12382665a9b92b3e7af27f8c2d56e39eeffe95a6'/>
<id>urn:sha1:12382665a9b92b3e7af27f8c2d56e39eeffe95a6</id>
<content type='text'>
[2/n] rustc_metadata: move is_extern_item to trans.

*This is part of a series ([prev](https://github.com/rust-lang/rust/pull/37400) | [next](https://github.com/rust-lang/rust/pull/37402)) of patches designed to rework rustc into an out-of-order on-demand pipeline model for both better feature support (e.g. [MIR-based](https://github.com/solson/miri) early constant evaluation) and incremental execution of compiler passes (e.g. type-checking), with beneficial consequences to IDE support as well.
If any motivation is unclear, please ask for additional PR description clarifications or code comments.*
&lt;hr&gt;

Minor cleanup missed by #36551: `is_extern_item` is one of, if not the only `CrateStore` method who takes a `TyCtxt` but doesn't produce something cached in it, and such methods are going away.
</content>
</entry>
<entry>
<title>Auto merge of #37400 - eddyb:lazy-1, r=nikomatsakis</title>
<updated>2016-10-30T03:46:20+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2016-10-30T03:46:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ef6f74340762f145f780aeb1b549030bd84c5beb'/>
<id>urn:sha1:ef6f74340762f145f780aeb1b549030bd84c5beb</id>
<content type='text'>
[1/n] Move the MIR map into the type context.

*This is part of a series ([prev]() | [next](https://github.com/rust-lang/rust/pull/37401)) of patches designed to rework rustc into an out-of-order on-demand pipeline model for both better feature support (e.g. [MIR-based](https://github.com/solson/miri) early constant evaluation) and incremental execution of compiler passes (e.g. type-checking), with beneficial consequences to IDE support as well.
If any motivation is unclear, please ask for additional PR description clarifications or code comments.*
&lt;hr&gt;

The first commit reorganizes the `rustc::mir` module to contain the MIR types directly without an extraneous `repr` module which serves no practical purpose but is rather an eyesore.

The second commit performs the actual move of the MIR map into the type context, for the purposes of future integration with requesting analysis/lowering by-products through `TyCtxt`.

Local `Mir` bodies need to be mutated by passes (hence `RefCell`), and at least one pass (`qualify_consts`) needs simultaneous access to multiple `Mir` bodies (hence arena-allocation).
`Mir` bodies loaded from other crates appear as if immutably borrowed (by `.borrow()`-ing one `Ref` and subsequently "leaking" it) to avoid, at least dynamically, *any* possibility of their local mutation.

One caveat is that lint passes can now snoop at the MIR (helpful) or even mutate it (dangerous).
However, lints are unstable anyway and we can find a way to deal with this in due time.
Future work will result in a tighter API, potentially hiding mutation *completely* outside of MIR passes.
</content>
</entry>
<entry>
<title>Do not intern filemap to entry w/ mismatched length. Fix #37274 (I think).</title>
<updated>2016-10-28T15:16:34+00:00</updated>
<author>
<name>Felix S. Klock II</name>
<email>pnkfelix@pnkfx.org</email>
</author>
<published>2016-10-28T15:12:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3f639a0f11eda43d9a31ef407eaac793dd038a43'/>
<id>urn:sha1:3f639a0f11eda43d9a31ef407eaac793dd038a43</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Debug instrumentation for construction of ImportedFileMap table entries.</title>
<updated>2016-10-28T15:16:34+00:00</updated>
<author>
<name>Felix S. Klock II</name>
<email>pnkfelix@pnkfx.org</email>
</author>
<published>2016-10-28T15:10:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c40fad34e25f4e00b118d7d362e7639954a717f2'/>
<id>urn:sha1:c40fad34e25f4e00b118d7d362e7639954a717f2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rustc: move mir::repr::* to mir.</title>
<updated>2016-10-28T07:37:24+00:00</updated>
<author>
<name>Eduard Burtescu</name>
<email>edy.burt@gmail.com</email>
</author>
<published>2016-09-19T20:50:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=36340ba994a8e5b12df70f0889eeb7d58e2705fe'/>
<id>urn:sha1:36340ba994a8e5b12df70f0889eeb7d58e2705fe</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #37270 - Mark-Simulacrum:smallvec-optimized-arenas, r=eddyb</title>
<updated>2016-10-26T10:47:55+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2016-10-26T10:47:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a6b3b01b5f7f5a9d7d340dacf7dbf72be29e2c07'/>
<id>urn:sha1:a6b3b01b5f7f5a9d7d340dacf7dbf72be29e2c07</id>
<content type='text'>
Add ArrayVec and AccumulateVec to reduce heap allocations during interning of slices

Updates `mk_tup`, `mk_type_list`, and `mk_substs` to allow interning directly from iterators. The previous PR, #37220, changed some of the calls to pass a borrowed slice from `Vec` instead of directly passing the iterator, and these changes further optimize that to avoid the allocation entirely.

This change yields 50% less malloc calls in [some cases](https://pastebin.mozilla.org/8921686). It also yields decent, though not amazing, performance improvements:
```
futures-rs-test  4.091s vs  4.021s --&gt; 1.017x faster (variance: 1.004x, 1.004x)
helloworld       0.219s vs  0.220s --&gt; 0.993x faster (variance: 1.010x, 1.018x)
html5ever-2016-  3.805s vs  3.736s --&gt; 1.018x faster (variance: 1.003x, 1.009x)
hyper.0.5.0      4.609s vs  4.571s --&gt; 1.008x faster (variance: 1.015x, 1.017x)
inflate-0.1.0    3.864s vs  3.883s --&gt; 0.995x faster (variance: 1.232x, 1.005x)
issue-32062-equ  0.309s vs  0.299s --&gt; 1.033x faster (variance: 1.014x, 1.003x)
issue-32278-big  1.614s vs  1.594s --&gt; 1.013x faster (variance: 1.007x, 1.004x)
jld-day15-parse  1.390s vs  1.326s --&gt; 1.049x faster (variance: 1.006x, 1.009x)
piston-image-0. 10.930s vs 10.675s --&gt; 1.024x faster (variance: 1.006x, 1.010x)
reddit-stress    2.302s vs  2.261s --&gt; 1.019x faster (variance: 1.010x, 1.026x)
regex.0.1.30     2.250s vs  2.240s --&gt; 1.005x faster (variance: 1.087x, 1.011x)
rust-encoding-0  1.895s vs  1.887s --&gt; 1.005x faster (variance: 1.005x, 1.018x)
syntex-0.42.2   29.045s vs 28.663s --&gt; 1.013x faster (variance: 1.004x, 1.006x)
syntex-0.42.2-i 13.925s vs 13.868s --&gt; 1.004x faster (variance: 1.022x, 1.007x)
```

We implement a small-size optimized vector, intended to be used primarily for collection of presumed to be short iterators. This vector cannot be "upsized/reallocated" into a heap-allocated vector, since that would require (slow) branching logic, but during the initial collection from an iterator heap-allocation is possible.

We make the new `AccumulateVec` and `ArrayVec` generic over implementors of the `Array` trait, of which there is currently one, `[T; 8]`. In the future, this is likely to expand to other values of N.

Huge thanks to @nnethercote for collecting the performance and other statistics mentioned above.
</content>
</entry>
<entry>
<title>Utilize AccumulateVec to avoid heap allocations in mk_{substs, type_list, tup} calls.</title>
<updated>2016-10-26T02:06:17+00:00</updated>
<author>
<name>Mark-Simulacrum</name>
<email>mark.simulacrum@gmail.com</email>
</author>
<published>2016-10-25T00:23:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=982a48575b53e05cd53f679aac2fedf6346f78c7'/>
<id>urn:sha1:982a48575b53e05cd53f679aac2fedf6346f78c7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rustc_metadata: move is_extern_item to trans.</title>
<updated>2016-10-25T15:18:17+00:00</updated>
<author>
<name>Eduard Burtescu</name>
<email>edy.burt@gmail.com</email>
</author>
<published>2016-10-25T15:18:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3fb24c18ab669e9ee9f8f4bef8541bd90653ea33'/>
<id>urn:sha1:3fb24c18ab669e9ee9f8f4bef8541bd90653ea33</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Run rustfmt on metadata folder - (1/2)</title>
<updated>2016-10-23T03:07:50+00:00</updated>
<author>
<name>Srinivas Reddy Thatiparthy</name>
<email>thatiparthysreenivas@gmail.com</email>
</author>
<published>2016-10-23T03:02:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cac3e5a93556acd714963274162c0d599af697ce'/>
<id>urn:sha1:cac3e5a93556acd714963274162c0d599af697ce</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use TypedArena::alloc_slice in rustc.</title>
<updated>2016-10-19T13:53:56+00:00</updated>
<author>
<name>Mark-Simulacrum</name>
<email>mark.simulacrum@gmail.com</email>
</author>
<published>2016-10-17T03:21:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=83b198249f6a417a96bce9d4264257f53ff7b48f'/>
<id>urn:sha1:83b198249f6a417a96bce9d4264257f53ff7b48f</id>
<content type='text'>
</content>
</entry>
</feed>
