Skip to content

Commit c943232

Browse files
committed
librustc: Change @mut Block to @Block.
1 parent f74b8f0 commit c943232

21 files changed

+605
-589
lines changed

src/librustc/middle/trans/_match.rs

Lines changed: 51 additions & 51 deletions
Large diffs are not rendered by default.

src/librustc/middle/trans/adt.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ pub struct Struct {
111111
* these, for places in trans where the `ty::t` isn't directly
112112
* available.
113113
*/
114-
pub fn represent_node(bcx: @mut Block, node: ast::NodeId) -> @Repr {
114+
pub fn represent_node(bcx: @Block, node: ast::NodeId) -> @Repr {
115115
represent_type(bcx.ccx(), node_id_type(bcx, node))
116116
}
117117

@@ -458,7 +458,7 @@ fn struct_llfields(cx: &mut CrateContext, st: &Struct, sizing: bool) -> ~[Type]
458458
*
459459
* This should ideally be less tightly tied to `_match`.
460460
*/
461-
pub fn trans_switch(bcx: @mut Block, r: &Repr, scrutinee: ValueRef)
461+
pub fn trans_switch(bcx: @Block, r: &Repr, scrutinee: ValueRef)
462462
-> (_match::branch_kind, Option<ValueRef>) {
463463
match *r {
464464
CEnum(..) | General(..) => {
@@ -476,7 +476,7 @@ pub fn trans_switch(bcx: @mut Block, r: &Repr, scrutinee: ValueRef)
476476

477477

478478
/// Obtain the actual discriminant of a value.
479-
pub fn trans_get_discr(bcx: @mut Block, r: &Repr, scrutinee: ValueRef, cast_to: Option<Type>)
479+
pub fn trans_get_discr(bcx: @Block, r: &Repr, scrutinee: ValueRef, cast_to: Option<Type>)
480480
-> ValueRef {
481481
let signed;
482482
let val;
@@ -505,7 +505,7 @@ pub fn trans_get_discr(bcx: @mut Block, r: &Repr, scrutinee: ValueRef, cast_to:
505505
}
506506
}
507507

508-
fn nullable_bitdiscr(bcx: @mut Block, nonnull: &Struct, nndiscr: Disr, ptrfield: uint,
508+
fn nullable_bitdiscr(bcx: @Block, nonnull: &Struct, nndiscr: Disr, ptrfield: uint,
509509
scrutinee: ValueRef) -> ValueRef {
510510
let cmp = if nndiscr == 0 { IntEQ } else { IntNE };
511511
let llptr = Load(bcx, GEPi(bcx, scrutinee, [0, ptrfield]));
@@ -514,7 +514,7 @@ fn nullable_bitdiscr(bcx: @mut Block, nonnull: &Struct, nndiscr: Disr, ptrfield:
514514
}
515515

516516
/// Helper for cases where the discriminant is simply loaded.
517-
fn load_discr(bcx: @mut Block, ity: IntType, ptr: ValueRef, min: Disr, max: Disr)
517+
fn load_discr(bcx: @Block, ity: IntType, ptr: ValueRef, min: Disr, max: Disr)
518518
-> ValueRef {
519519
let llty = ll_inttype(bcx.ccx(), ity);
520520
assert_eq!(val_ty(ptr), llty.ptr_to());
@@ -542,7 +542,7 @@ fn load_discr(bcx: @mut Block, ity: IntType, ptr: ValueRef, min: Disr, max: Disr
542542
*
543543
* This should ideally be less tightly tied to `_match`.
544544
*/
545-
pub fn trans_case(bcx: @mut Block, r: &Repr, discr: Disr) -> _match::opt_result {
545+
pub fn trans_case(bcx: @Block, r: &Repr, discr: Disr) -> _match::opt_result {
546546
match *r {
547547
CEnum(ity, _, _) => {
548548
_match::single_result(rslt(bcx, C_integral(ll_inttype(bcx.ccx(), ity),
@@ -567,7 +567,7 @@ pub fn trans_case(bcx: @mut Block, r: &Repr, discr: Disr) -> _match::opt_result
567567
* representation. The fields, if any, should then be initialized via
568568
* `trans_field_ptr`.
569569
*/
570-
pub fn trans_start_init(bcx: @mut Block, r: &Repr, val: ValueRef, discr: Disr) {
570+
pub fn trans_start_init(bcx: @Block, r: &Repr, val: ValueRef, discr: Disr) {
571571
match *r {
572572
CEnum(ity, min, max) => {
573573
assert_discr_in_range(ity, min, max, discr);
@@ -623,7 +623,7 @@ pub fn num_args(r: &Repr, discr: Disr) -> uint {
623623
}
624624

625625
/// Access a field, at a point when the value's case is known.
626-
pub fn trans_field_ptr(bcx: @mut Block, r: &Repr, val: ValueRef, discr: Disr,
626+
pub fn trans_field_ptr(bcx: @Block, r: &Repr, val: ValueRef, discr: Disr,
627627
ix: uint) -> ValueRef {
628628
// Note: if this ever needs to generate conditionals (e.g., if we
629629
// decide to do some kind of cdr-coding-like non-unique repr
@@ -656,7 +656,7 @@ pub fn trans_field_ptr(bcx: @mut Block, r: &Repr, val: ValueRef, discr: Disr,
656656
}
657657
}
658658

659-
fn struct_field_ptr(bcx: @mut Block, st: &Struct, val: ValueRef, ix: uint,
659+
fn struct_field_ptr(bcx: @Block, st: &Struct, val: ValueRef, ix: uint,
660660
needs_cast: bool) -> ValueRef {
661661
let ccx = bcx.ccx();
662662

@@ -672,7 +672,7 @@ fn struct_field_ptr(bcx: @mut Block, st: &Struct, val: ValueRef, ix: uint,
672672
}
673673

674674
/// Access the struct drop flag, if present.
675-
pub fn trans_drop_flag_ptr(bcx: @mut Block, r: &Repr, val: ValueRef) -> ValueRef {
675+
pub fn trans_drop_flag_ptr(bcx: @Block, r: &Repr, val: ValueRef) -> ValueRef {
676676
match *r {
677677
Univariant(ref st, true) => GEPi(bcx, val, [0, st.fields.len() - 1]),
678678
_ => bcx.ccx().sess.bug("tried to get drop flag of non-droppable type")

src/librustc/middle/trans/asm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use middle::trans::type_::Type;
2727
use syntax::ast;
2828

2929
// Take an inline assembly expression and splat it out via LLVM
30-
pub fn trans_inline_asm(bcx: @mut Block, ia: &ast::inline_asm) -> @mut Block {
30+
pub fn trans_inline_asm(bcx: @Block, ia: &ast::inline_asm) -> @Block {
3131

3232
let mut bcx = bcx;
3333
let mut constraints = ~[];

0 commit comments

Comments
 (0)