]> git.lizzy.rs Git - rust.git/commitdiff
Fix some comments.
authorFelix S. Klock II <pnkfelix@pnkfx.org>
Wed, 25 May 2016 12:52:40 +0000 (14:52 +0200)
committerFelix S. Klock II <pnkfelix@pnkfx.org>
Wed, 25 May 2016 12:52:40 +0000 (14:52 +0200)
src/librustc_borrowck/borrowck/mir/dataflow/mod.rs

index dad0c9251860ecb7f229b979357ff8a78b58b4f9..da7a85c1a8a683fa4eef08ee9e64596f35a83036 100644 (file)
@@ -324,9 +324,9 @@ pub trait BitDenotation {
     /// "transfer-function" represnting the overall-effect of the
     /// block, represented via GEN and KILL sets.
     ///
-    /// The statement here is `idx_stmt.1`; `idx_stmt.0` is just
-    /// an identifying index: namely, the index of the statement
-    /// in the basic block.
+    /// The statement is identified as `bb_data[idx_stmt]`, where
+    /// `bb_data` is the sequence of statements identifed by `bb` in
+    /// the MIR.
     fn statement_effect(&self,
                         ctxt: &Self::Ctxt,
                         sets: &mut BlockSets<Self::Idx>,
@@ -341,10 +341,6 @@ fn statement_effect(&self,
     /// "transfer-function" represnting the overall-effect of the
     /// block, represented via GEN and KILL sets.
     ///
-    /// The terminator here is `idx_term.1`; `idx_term.0` is just an
-    /// identifying index: namely, the number of statements in `bb`
-    /// itself.
-    ///
     /// The effects applied here cannot depend on which branch the
     /// terminator took.
     fn terminator_effect(&self,
@@ -367,6 +363,11 @@ fn terminator_effect(&self,
     /// flow-dependent, the current MIR cannot encode them via just
     /// GEN and KILL sets attached to the block, and so instead we add
     /// this extra machinery to represent the flow-dependent effect.
+    ///
+    /// FIXME: Right now this is a bit of a wart in the API. It might
+    /// be better to represent this as an additional gen- and
+    /// kill-sets associated with each edge coming out of the basic
+    /// block.
     fn propagate_call_return(&self,
                              ctxt: &Self::Ctxt,
                              in_out: &mut IdxSet<Self::Idx>,