Uh oh!
There was an error while loading. Please reload this page.
librustc: WIP for write barriers - #4454
Conversation
nikomatsakis
commented
Jan 12, 2013
This seems like the right approach to me. As for the write barriers, that's a good question. I had always imagined that trans would compute where they are needed but I guess there's some computation involved, so perhaps it's best to put that into the I imagine that to actually implement the write barriers you might want to use a similar table to the rooting table, since you will have to insert the write barriers potentially on auto-derefs of intermediate expressions. So if someone wrote: then the write barrier at (1) would have to check |
pcwalton
commented
Jan 15, 2013
Here's some more code. There is currently a problem whereby basic blocks are appended to after termination, preventing self-hosting—I need to work that out before this is done. However, the test case works. |
pcwalton
commented
Jan 16, 2013
This implements enough to get |
nikomatsakis
commented
Jan 16, 2013
r+ This looks pretty good. As I wrote in the comments, I think the current modifications to I notice there seems to be no tests for write barriers. I think you should add some tests that freeze an |
pcwalton
commented
Jan 18, 2013
nikomatsakis
commented
Jan 20, 2013
r- but pretty close: this is unsound unless you loan out Question: Are there run-fail tests corresponding to the various write-guard failures that can take place? I feel like in general there are a host of new tests that should be added but I guess I have to step back and review what's there. Oh, and one nit: I personally would prefer if the tests that are testing the borrow checker have a name like |
nikomatsakis
commented
Jan 20, 2013
One other thing---can you add the paragraph I wrote explaining why re_free is sound as the scope of a loan as a comment on the relevant bit of code where you had the "XXX"? |
…`&mut` loanable to `&`.
pcwalton
commented
Jan 22, 2013
nikomatsakis
commented
Jan 22, 2013
r+, but can you add a compile-fail test like the following and also mention its name in the comment about loans with scope |
graydon
commented
Jan 23, 2013
This landed, yes? Close if so. |
pcwalton
commented
Jan 23, 2013
Not yet. |
move our data structures into a central location
I.e. - `Self(x)` or `Self` in tuple/unit struct impls - `Self::Variant(x)` or `Self::Variant` in enum impls - the same in patterns Fixesrust-lang#4454.
4470: Handle `Self` in values and patterns r=matklad a=flodiebold I.e. - `Self(x)` or `Self` in tuple/unit struct impls - `Self::Variant(x)` or `Self::Variant` in enum impls - the same in patterns Fixesrust-lang#4454. Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
This is a preliminary review only—do not pull!
r? @nikomatsakis. I'd like to know whether you feel this is on the right track. This includes the dynamic component to the
@mut→&immborrow only and not the write barriers. I'd like to get your opinion as to the best way to implement the write barriers—another pass that usesmem_categorizationperhaps?