Commit Graph

26 Commits

Author SHA1 Message Date
Santiago Pastorino
6a74615fe3
Run rustfmt over bitvec.rs and region_infer/values.rs 2018-02-22 21:27:52 -03:00
Santiago Pastorino
aa3409c898
Fix typo otherwies -> otherwise 2018-02-22 21:27:52 -03:00
Santiago Pastorino
ff9eb56c6e
Use Sparse bitsets instead of dense ones for NLL results
Fixes #48170
2018-02-22 21:27:26 -03:00
Santiago Pastorino
e5d79c4bc7
Move word type and word size usage to constants & make it of 128 bits 2018-02-22 20:15:53 -03:00
Santiago Pastorino
da545cee60 Make region inference use a dirty list
Fixes #47602
2018-01-26 21:56:49 -03:00
Niko Matsakis
3db1a95a3f add/fix various comments to BitMatrix
Notably, the (hitherto unused) `less_than` method was not at all what it
purported to be. It in fact computes the opposite.
2017-11-02 04:40:49 -04:00
Esteban Küber
ddee9fbc99 Point at parameter type on E0301
On "the parameter type `T` may not live long enough" error, point to the
parameter type suggesting lifetime bindings:

```
error[E0310]: the parameter type `T` may not live long enough
  --> $DIR/lifetime-doesnt-live-long-enough.rs:28:5
   |
27 | struct Foo<T> {
   |            - help: consider adding an explicit lifetime bound `T: 'static`...
28 |     foo: &'static T
   |     ^^^^^^^^^^^^^^^
   |
note: ...so that the reference type `&'static T` does not outlive the data it points at
  --> $DIR/lifetime-doesnt-live-long-enough.rs:28:5
   |
28 |     foo: &'static T
   |     ^^^^^^^^^^^^^^^
```
2017-09-24 11:50:09 -07:00
Zack M. Davis
1b6c9605e4 use field init shorthand EVERYWHERE
Like #43008 (f668999), but _much more aggressive_.
2017-08-15 15:29:17 -07:00
Isaac van Bakel
400075d9d9 Fixed all unnecessary muts in language core 2017-08-01 23:01:24 +01:00
Simonas Kazlauskas
aac82d9b13 SwitchInt over Switch
This removes another special case of Switch by replacing it with the more general SwitchInt. While
this is more clunky currently, there’s no reason we can’t make it nice (and efficient) to use.
2017-02-10 19:42:41 +02:00
Michael Woerister
71274ac9ad Mark some BitVector methods with #[inline] 2017-01-12 15:13:02 -05:00
Niko Matsakis
9978cbc8f4 generalize BitMatrix to be NxM and not just NxN 2016-08-09 08:26:06 -04:00
Niko Matsakis
0e97240f98 isolate predecessor computation
The new `Predecessors` type computes a set of interesting targets and
their HIR predecessors, and discards everything in between.
2016-08-09 08:26:05 -04:00
Srinivas Reddy Thatiparthy
99e9f2ddc1 remove redundant test case 2016-06-11 20:59:58 +05:30
Scott A Carr
79bf586d4b switch to BitVector, simplify target_block logic
clarify comments and panic message
2016-06-01 10:23:56 -07:00
Michael Woerister
0fc9f9a200 Make the codegen unit partitioner also emit item declarations. 2016-04-28 16:53:00 -04:00
James Miller
605bc04264 Use a BitVector instead of Vec<bool> for recording cleanup blocks
Also adds a FromIterator impl for BitVector to allow construction of a
BitVector from an iterator yeilding bools.
2016-04-03 14:58:34 +12:00
James Miller
60a28e60aa Add some standard traversal iterators for MIR
Adds Preorder, Postorder and Reverse Postorder traversal iterators.

Also makes trans/mir use Reverse Postorder traversal for blocks.
2016-03-30 12:57:43 +13:00
Niko Matsakis
43dc48c7ff apply rustfmt to librustc_data_structures, correcting rust-lang-nursery/rustfmt#836 2016-03-05 08:40:33 -05:00
Simonas Kazlauskas
b92e2437f5 [MIR] Change SimplifyCfg pass to use bitvec
BitVector is much more space efficient.
2016-02-23 11:43:52 +02:00
Simonas Kazlauskas
e74aa2bdff [MIR] Promote temps to alloca on multi-assignment
Fixes #31002
2016-01-21 19:01:43 +02:00
Niko Matsakis
b247402666 nits from pnkfelix 2015-08-21 14:40:07 -04:00
Niko Matsakis
5448de72c2 generalize bitvector code into a bitmatrix; write some unit tests, but
probably not enough. This code is so simple, what could possibly go
wrong?
2015-08-18 17:36:32 -04:00
Ulrik Sverdrup
836f32e769 Use vec![elt; n] where possible
The common pattern `iter::repeat(elt).take(n).collect::<Vec<_>>()` is
exactly equivalent to `vec![elt; n]`, do this replacement in the whole
tree.

(Actually, vec![] is smart enough to only call clone n - 1 times, while
the former solution would call clone n times, and this fact is
virtually irrelevant in practice.)
2015-07-09 11:05:32 +02:00
Niko Matsakis
65ccffd224 Add licenses. 2015-04-17 10:12:55 -04:00
Niko Matsakis
7ab0d1ab67 Port to using the newer graph, which offers iterators instead of the
older `each` method, but is otherwise identical.
2015-04-17 10:12:55 -04:00