Commit Graph

110 Commits

Author SHA1 Message Date
bors
5a2b50b33d Auto merge of #38325 - frewsxcv:rollup, r=frewsxcv
Rollup of 7 pull requests

- Successful merges: #37052, #37941, #38067, #38164, #38202, #38264, #38299
- Failed merges:
2016-12-13 02:28:23 +00:00
Corey Farwell
a9dcfd0936 Rollup merge of #38202 - michaelwoerister:closure-ich-test, r=nikomatsakis
Some incr. comp. hash tests

r? @nikomatsakis
2016-12-12 14:10:33 -05:00
Michael Woerister
271fb22924 incr.comp.: Avoid creating an edge to DepNode::Krate when generating debuginfo namespaces. 2016-12-12 12:18:04 -05:00
Michael Woerister
90f0de8244 incr.comp.: Add test case for symbol visibility changes 2016-12-09 17:47:56 -05:00
Michael Woerister
9ccd5c5739 ICH: Add missing annotations for struct constructor expr test case. 2016-12-06 18:12:12 -05:00
Michael Woerister
5c3a69e779 ICH: Add test case for enum constructor expressions. 2016-12-06 18:11:47 -05:00
Michael Woerister
277675cb00 ICH: Add test case for indexing expressions. 2016-12-06 17:40:42 -05:00
Michael Woerister
45b89b82c2 ICH: Add test case sensitive to function bodies in metadata. 2016-12-06 16:59:07 -05:00
Michael Woerister
78fd220614 ICH: Add test case for closure expressions. 2016-12-06 16:58:23 -05:00
Corey Farwell
8916accc10 Rollup merge of #37919 - nikomatsakis:incremental-36168, r=mw
add regression test for #36168

Fixes #36168

r? @michaelwoerister
2016-12-03 15:39:51 -05:00
Florian Diebold
b10bbde335 Fix SVH tests some more 2016-11-29 13:04:27 +01:00
Florian Diebold
725cffb1d5 Address remaining review comments 2016-11-29 13:04:27 +01:00
Florian Diebold
d5a501d312 Fix remaining SVH tests 2016-11-29 13:04:27 +01:00
Niko Matsakis
dd1491cfbe WIP: update tests to pass -- not complete 2016-11-29 13:04:27 +01:00
Niko Matsakis
688946d671 restructure CollectItem dep-node to separate fn sigs from bodies
Setup two tasks, one of which only processes the signatures, in order to
isolate the typeck entries for signatures from those for bodies.

Fixes #36078
Fixes #37720
2016-11-29 13:04:27 +01:00
Florian Diebold
78b54c07e5 Make hello_world test work again
This used to work with the rustc_clean attribute, but doesn't anymore
since my rebase; but I don't know enough about the type checking to find
out what's wrong. The dep graph looks like this:

ItemSignature(xxxx) -> CollectItem(xxxx)
CollectItem(xxxx) -> ItemSignature(xxxx)
ItemSignature(xxxx) -> TypeckItemBody(yyyy)
HirBody(xxxx) -> CollectItem(xxxx)

The cycle between CollectItem and ItemSignature looks wrong, and my
guess is the CollectItem -> ItemSignature edge shouldn't be there, but
I'm not sure how to prevent it.
2016-11-29 13:04:27 +01:00
Florian Diebold
7b021298d9 Fix new tests 2016-11-29 13:04:27 +01:00
Florian Diebold
936dbbce37 Give function bodies their own dep graph node 2016-11-29 13:04:27 +01:00
Niko Matsakis
72fbf9f0fe fixup test cases 2016-11-28 17:06:10 -05:00
Michael Woerister
12f3caf6a8 ICH: Add test case for struct constructor expressions. 2016-11-22 15:49:58 -05:00
Niko Matsakis
dac987e355 add regression test for #36168
Fixes #36168
2016-11-21 13:23:14 -05:00
Guillaume Gomez
e8d38beddf Rollup merge of #37841 - michaelwoerister:ich-loop-tests, r=nikomatsakis
ICH: Add regression tests for various kinds of loops.

r? @nikomatsakis
2016-11-20 15:00:04 +01:00
Niko Matsakis
36f2af1999 remove FIXMEs; issue fixed 2016-11-18 13:37:36 -05:00
Niko Matsakis
95c6c9939c improve comments 2016-11-18 10:13:30 -05:00
Niko Matsakis
30b97aa410 add test for adding a field 2016-11-18 10:13:30 -05:00
Niko Matsakis
70a1459143 add test for changing pub inherent method signature 2016-11-18 10:13:30 -05:00
Niko Matsakis
a488979593 add test for changing pub inherent method body
Ideally, callers should not be affected, but they currently are.
2016-11-18 10:13:30 -05:00
bors
35e8924dc5 Auto merge of #37660 - nikomatsakis:incremental-36349, r=eddyb
Separate impl items from the parent impl

This change separates impl item bodies out of the impl itself. This gives incremental more resolution. In so doing, it refactors how the visitors work, and cleans up a bit of the collect/check logic (mostly by moving things out of collect that didn't really belong there, because they were just checking conditions).

However, this is not as effective as I expected, for a kind of frustrating reason. In particular, when invoking `foo.bar()` you still wind up with dependencies on private items. The problem is that the method resolution code scans that list for methods with the name `bar` -- and this winds up touching *all* the methods, even private ones.

I can imagine two obvious ways to fix this:

- separating fn bodies from fn sigs (#35078, currently being pursued by @flodiebold)
- a more aggressive model of incremental that @michaelwoerister has been advocating, in which we hash the intermediate results (e.g., the outputs of collect) so that we can see that the intermediate result hasn't changed, even if a particular impl item has changed.

So all in all I'm not quite sure whether to land this or not. =) It still seems like it has to be a win in some cases, but not with the test cases we have just now. I can try to gin up some test cases, but I'm not sure if they will be totally realistic. On the other hand, some of the early refactorings to the visitor trait seem worthwhile to me regardless.

cc #36349 -- well, this is basically a fix for that issue, I guess

r? @michaelwoerister

NB: Based atop of @eddyb's PR https://github.com/rust-lang/rust/pull/37402; don't land until that lands.
2016-11-17 17:31:01 -08:00
Niko Matsakis
c938007f90 add test for hashing trait impls 2016-11-17 15:12:43 -05:00
Michael Woerister
83ee4e93e0 ICH: Add regression tests for various kinds of loops. 2016-11-17 14:28:38 -05:00
Niko Matsakis
4e844ad1e5 fix change_private_impl_method_cc test 2016-11-17 13:44:22 -05:00
Niko Matsakis
b10b98169f hash the contents of impl-item-ref by adding them to visitor
Also simplify some of the `ty::AssociatedItem` representation,
in particular by folding `has_value` into `hir::Defaultness`
2016-11-17 13:44:22 -05:00
Niko Matsakis
34c361cfb2 when creating an AssociatedItem, read data from impl, not impl item
Before, when we created an AssociatedItem for impl item X, we would read
the impl item itself. Now we instead load up the impl I that contains X
and read the data from the `ImplItemRef` for X; actually, we do it for
all impl items in I pre-emptively.

This kills the last source of edges between a method X and a call to a
method Y defined in the same impl.

Fixes #37121
2016-11-17 13:44:21 -05:00
Michael Woerister
8e4097f6a8 ICH: Add test case for type alias definitions 2016-11-16 11:56:18 -05:00
Michael Woerister
790a2f9b00 Adapt accidentally fixed test case. 2016-11-13 19:49:57 -05:00
Eduard-Mihai Burtescu
5439cb5bdc Rollup merge of #37694 - michaelwoerister:test-if-ich, r=brson
ICH: Add test case for if- and if-let-expressions.

r? @nikomatsakis
2016-11-12 10:38:42 +02:00
Michael Woerister
f2b8d7bb31 ICH: Add test case for if- and if-let-expressions. 2016-11-10 15:06:51 -05:00
Michael Woerister
669102f0f0 ICH: Add test case for call expressions. 2016-11-10 13:26:19 -05:00
Eduard-Mihai Burtescu
60c74b76c4 Rollup merge of #37654 - michaelwoerister:test-let-ich, r=nikomatsakis
ICH: Add tests for let- and match-expressions.

r? @nikomatsakis
2016-11-09 20:51:19 +02:00
Michael Woerister
5d186d0ddd ICH: Add test case for match-expressions 2016-11-08 15:58:06 -05:00
Michael Woerister
f7d2a813d5 ICH: Add test case for let-expressions. 2016-11-08 15:57:56 -05:00
oldmanmike
5a2997d3d8 Fix typos and redundant code 2016-11-07 13:59:48 -05:00
oldmanmike
e2ca47ab1a Apply changes recommended in code review
Said code review and recommendations can be found here:
https://github.com/rust-lang/rust/pull/37610
2016-11-07 12:42:20 -05:00
oldmanmike
21814a5ebb Add unary and binary tests for incr-comp 2016-11-05 21:31:57 -04:00
Jonathan Turner
27f41b7001 Rollup merge of #37513 - michaelwoerister:hash-panic-spans, r=nikomatsakis
ICH: Hash expression spans if their source location is captured for panics.

Since the location of some expressions is captured in error message constants, it has an influence on machine code and consequently we need to take them into account by the incr. comp. hash. This PR makes this happen for `+, -, *, /, %` and for array indexing -- let me know if I forgot anything.

In the future we might want to change the codegen strategy for those error messages, so that they are stored in a separate object file with a stable symbol name, so that only this object file has to be regenerated when source locations change. This strategy would also eliminate unnecessary duplications due  to monomorphization, as @arielb1 has pointed out on IRC. I opened https://github.com/rust-lang/rust/issues/37512, so we don't forget about this.

r? @nikomatsakis
2016-11-02 15:09:42 -04:00
Michael Woerister
0e391bf22c ICH: Add test case for when overflow checks are disabled. 2016-11-02 10:00:11 -04:00
bors
ea4b94dab0 Auto merge of #37332 - nikomatsakis:incr-comp-benchmark-2, r=michaelwoerister
add more incremental reuse test cases

r? @michaelwoerister

This is basically a port of the "private method in impl". It works better when it's a top-level fn. =)
2016-11-01 07:04:33 -07:00
Michael Woerister
e3025a0733 ICH: Hash expression spans if their source location is captured for panics 2016-11-01 09:41:46 -04:00
Vadim Petrochenkov
811a2b91de Prohibit patterns in trait methods without bodies 2016-10-26 20:55:16 +03:00
Niko Matsakis
3dbf4d1e24 test case for changing a private fn in root of another crate 2016-10-21 18:31:34 -04:00