Skip to content

rustfmt libcoretest #33790

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 179 commits into from
Closed

rustfmt libcoretest #33790

wants to merge 179 commits into from

Conversation

srinivasreddy
Copy link
Contributor

@alexcrichton @Manishearth Do you guys encourage this? I want to do this for libcoretest module

@rust-highfive
Copy link
Contributor

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

@srinivasreddy
Copy link
Contributor Author

r? @alexcrichton

@rust-highfive rust-highfive assigned alexcrichton and unassigned brson May 22, 2016
@Manishearth
Copy link
Member

@bors r+ rollup

yep, thanks!

@bors
Copy link
Collaborator

bors commented May 22, 2016

📌 Commit 780fb93 has been approved by Manishearth

@bors
Copy link
Collaborator

bors commented May 22, 2016

⌛ Testing commit 780fb93 with merge 082018e...

@srinivasreddy
Copy link
Contributor Author

cc @nrc

@srinivasreddy srinivasreddy changed the title rustfmt any.rs file rustfmt libcoretest May 23, 2016
@srinivasreddy
Copy link
Contributor Author

@Manishearth take a look and approve

@bors
Copy link
Collaborator

bors commented May 26, 2016

☔ The latest upstream changes (presumably #33699) made this pull request unmergeable. Please resolve the merge conflicts.

srinivasreddy and others added 17 commits May 28, 2016 09:38
Replace binary search of ranges with trie lookup using leaves of
64-bit bitmap chunks. Benchmarks suggest this is approximately 10x
faster than the bsearch approach.
Somehow got in my head that >> 8 was the right shift for a chunk of 64.
Oops, sorry.
Adds a comment which explains the trie structure, and also does a
little arithmetic on lookup (no measurable impact, looks like modern
CPUs do this arithmetic in parallel with the memory lookup to find the
node) to save a bit of space. As a result, the memory impact of the
compiled tables is within a couple hundred bytes of the old
bsearch-range structure.
(bug was cut/pasted into `rustc_borrowck::bitslice`, so I fixed it
there as well.)
…outines.

(The crucial thing these changes are working toward (but are not yet
in this commit) is a way to pretty-print MIR without having the
`NodeId` for that MIR in hand.)
…nreferenced.

includes misc bug fixes and removal of useless code.
Incorporates many fixes contributed by arielb1.

----

revise borrowck::mir::dataflow code to allow varying domain for bitvectors.

This particular code implements the `BitDenotation` trait for three
analyses:

 * `MovingOutStatements`, which, like `borrowck::move_data`, maps each
   bit-index to a move instruction, and a 1 means "the effect of this
   move reaches this point" (and the assigned l-value, if a scoped
   declaration, is still in scope).

 * `MaybeInitializedLvals`, which maps each bit-index to an l-value.
   A 1 means "there exists a control flow path to this point that
   initializes the associated l-value."

 * `MaybeUninitializedLvals`, which maps each bit-index to an l-value
   A 1 means "there exists a control flow path to this point that
   de-initializes the associated l-value."

----

Revised `graphviz` dataflow-rendering support in `borrowck::mir`.

One big difference is that this code is now parameterized over the
`BitDenotation`, so that it can be used to render dataflow results
independent of how the dataflow bitvectors are interpreted; see where
reference to `MoveOut` is replaced by the type parameter `D`.

----

Factor out routine to query subattributes in `#[rustc_mir(..)]`.

(Later commits build upon this for some unit testing and instrumentation.)

----

thread through a tcx so that I can query types of lvalues as part of analysis.

----

Revised `BitDenotation::Ctxt`, allowing variation beyond `MoveData`.

The main motivation is to ease threading through a `TyCtxt`.

(In hindsight it might have been better to instead attach the `TyCtxt`
to each of the different dataflow implementations, but that would
require e.g. switching away from having a `Default` impl, so I am
leaving that experiment for another time.)
its own needs based on attributes attached to the function where it
appears.
(The static semantics of `rustc_peek` is derived from attributes
attached to the function being compiled; in this case,
`rustc_peek(&expr)` observes the dataflow state for the l-value
`expr`.)
jseyfried and others added 28 commits May 29, 2016 07:55
In #28662, `size_hint` was made exact for `EscapeUnicode` and
`EscapeDefault`, but neither was marked as `ExactSizeIterator`.
Trivial implementation, as both are `ExactSizeIterator`s.

Part of #24214.
Simply a micro-optimization to reduce code size and to open up
inlining opportunities.
By accident, I found the `make tips` target, which helped me to gain more insight on how to work with the system more quickly.
to also check that it is legitimately an `ExactSizeIterator`.
@srinivasreddy srinivasreddy deleted the rustfmt branch May 29, 2016 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.