about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMark-Simulacrum <mark.simulacrum@gmail.com>2016-12-16 11:32:59 -0700
committerMark Simulacrum <mark.simulacrum@gmail.com>2016-12-20 20:02:53 -0700
commitbe981dce80f6d115b04a6898bb2d6bf316dc402d (patch)
tree0f8919d8a0ab5aebb97824035280d284011b85fd /src
parentbc0b172f3b3944eea0a326e032a961d0f5f5df11 (diff)
downloadrust-be981dce80f6d115b04a6898bb2d6bf316dc402d.tar.gz
rust-be981dce80f6d115b04a6898bb2d6bf316dc402d.zip
Start FunctionContext privatization and reduction
Diffstat (limited to 'src')
-rw-r--r--src/librustc_trans/common.rs10
-rw-r--r--src/librustc_trans/mir/mod.rs2
2 files changed, 4 insertions, 8 deletions
diff --git a/src/librustc_trans/common.rs b/src/librustc_trans/common.rs
index e2abb7779c9..1025f9d4051 100644
--- a/src/librustc_trans/common.rs
+++ b/src/librustc_trans/common.rs
@@ -269,7 +269,7 @@ pub struct FunctionContext<'a, 'tcx: 'a> {
     pub llfn: ValueRef,
 
     // always an empty parameter-environment NOTE: @jroesch another use of ParamEnv
-    pub param_env: ty::ParameterEnvironment<'tcx>,
+    param_env: ty::ParameterEnvironment<'tcx>,
 
     // A pointer to where to store the return value. If the return type is
     // immediate, this points to an alloca in the function. Otherwise, it's a
@@ -314,8 +314,8 @@ pub struct FunctionContext<'a, 'tcx: 'a> {
 
 impl<'a, 'tcx> FunctionContext<'a, 'tcx> {
     /// Create a function context for the given function.
-    /// Beware that you must call `fcx.init` or `fcx.bind_args`
-    /// before doing anything with the returned function context.
+    /// Beware that you must call `fcx.init` before doing anything with the returned function
+    /// context.
     pub fn new(ccx: &'a CrateContext<'a, 'tcx>,
                llfndecl: ValueRef,
                fn_ty: FnType,
@@ -603,10 +603,6 @@ impl<'blk, 'tcx> BlockAndBuilder<'blk, 'tcx> {
     pub fn llbb(&self) -> BasicBlockRef {
         self.llbb
     }
-
-    pub fn mir(&self) -> Ref<'tcx, Mir<'tcx>> {
-        self.fcx.mir()
-    }
 }
 
 impl<'blk, 'tcx> Deref for BlockAndBuilder<'blk, 'tcx> {
diff --git a/src/librustc_trans/mir/mod.rs b/src/librustc_trans/mir/mod.rs
index 60fd80a8f90..c3cc5a7a9b3 100644
--- a/src/librustc_trans/mir/mod.rs
+++ b/src/librustc_trans/mir/mod.rs
@@ -182,7 +182,7 @@ impl<'tcx> LocalRef<'tcx> {
 
 pub fn trans_mir<'blk, 'tcx: 'blk>(fcx: &'blk FunctionContext<'blk, 'tcx>) {
     let bcx = fcx.init(true);
-    let mir = bcx.mir();
+    let mir = fcx.mir();
 
     // Analyze the temps to determine which must be lvalues
     // FIXME