]> git.lizzy.rs Git - rust.git/commit
Modify trans to use an outer walk and ensure that we rotate as we
authorNiko Matsakis <niko@alum.mit.edu>
Wed, 18 Nov 2015 10:38:50 +0000 (05:38 -0500)
committerNiko Matsakis <niko@alum.mit.edu>
Thu, 19 Nov 2015 00:23:29 +0000 (19:23 -0500)
commit06f2d9da87ae4c5112cfa1540ae7ea15b76d3e5b
tree00e280dad1744816585092ed3836533a3bf33c21
parent0bc61402a92670e8c170fec1e35f5c5a19378221
Modify trans to use an outer walk and ensure that we rotate as we
encounter each module. This is somewhat different than how it used to
work; it should ensure a more equitable distribution of work than
before. The reason is that, before, when we rotated, we would rotate
before we had seen the full contents of the current module. So e.g.  if
we have `mod a { mod b { .. } .. }`, then we rotate when we encounter
`b`, but we haven't processed the remainder of `a` yet. Unclear if this
makes any difference in practice, but it seemed suboptimal. Also, this
structure (with an outer walk over modules) is closer to what we will
want for an incremental setting.
src/librustc_trans/trans/base.rs