Start FunctionContext privatization and reduction
This commit is contained in:
parent
bc0b172f3b
commit
be981dce80
2 changed files with 4 additions and 8 deletions
|
|
@ -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> {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue