Skip to content

Commit 3ff6de7

Browse files
committed
---
yaml --- r: 147539 b: refs/heads/try2 c: b941677 h: refs/heads/master i: 147537: 846c6ba 147535: 7de5156 v: v3
1 parent a465b7b commit 3ff6de7

24 files changed

+175
-175
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 2418cc021240f9e2b3a9a487561f387d8b97f752
8+
refs/heads/try2: b941677ea3175ea0bba14bb6ced050c8e8fca3cf
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustc/back/link.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ pub fn symbol_hash(tcx: ty::ctxt,
520520
hash.to_managed()
521521
}
522522

523-
pub fn get_symbol_hash(ccx: &mut CrateContext, t: ty::t) -> @str {
523+
pub fn get_symbol_hash(ccx: &CrateContext, t: ty::t) -> @str {
524524
{
525525
let type_hashcodes = ccx.type_hashcodes.borrow();
526526
match type_hashcodes.get().find(&t) {
@@ -662,7 +662,7 @@ pub fn exported_name(sess: Session,
662662
mangle(sess, path, Some(hash), Some(vers.as_slice()))
663663
}
664664

665-
pub fn mangle_exported_name(ccx: &mut CrateContext,
665+
pub fn mangle_exported_name(ccx: &CrateContext,
666666
path: path,
667667
t: ty::t) -> ~str {
668668
let hash = get_symbol_hash(ccx, t);
@@ -671,7 +671,7 @@ pub fn mangle_exported_name(ccx: &mut CrateContext,
671671
ccx.link_meta.pkgid.version_or_default());
672672
}
673673

674-
pub fn mangle_internal_name_by_type_only(ccx: &mut CrateContext,
674+
pub fn mangle_internal_name_by_type_only(ccx: &CrateContext,
675675
t: ty::t,
676676
name: &str) -> ~str {
677677
let s = ppaux::ty_to_short_str(ccx.tcx, t);
@@ -683,7 +683,7 @@ pub fn mangle_internal_name_by_type_only(ccx: &mut CrateContext,
683683
None);
684684
}
685685

686-
pub fn mangle_internal_name_by_type_and_seq(ccx: &mut CrateContext,
686+
pub fn mangle_internal_name_by_type_and_seq(ccx: &CrateContext,
687687
t: ty::t,
688688
name: &str) -> ~str {
689689
let s = ppaux::ty_to_str(ccx.tcx, t);
@@ -695,15 +695,15 @@ pub fn mangle_internal_name_by_type_and_seq(ccx: &mut CrateContext,
695695
None);
696696
}
697697

698-
pub fn mangle_internal_name_by_path_and_seq(ccx: &mut CrateContext,
698+
pub fn mangle_internal_name_by_path_and_seq(ccx: &CrateContext,
699699
mut path: path,
700700
flav: &str) -> ~str {
701701
let (_, name) = gensym_name(flav);
702702
path.push(name);
703703
mangle(ccx.sess, path, None, None)
704704
}
705705

706-
pub fn mangle_internal_name_by_path(ccx: &mut CrateContext, path: path) -> ~str {
706+
pub fn mangle_internal_name_by_path(ccx: &CrateContext, path: path) -> ~str {
707707
mangle(ccx.sess, path, None, None)
708708
}
709709

branches/try2/src/librustc/middle/trans/adt.rs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ pub fn represent_node(bcx: @Block, node: ast::NodeId) -> @Repr {
116116
}
117117

118118
/// Decides how to represent a given type.
119-
pub fn represent_type(cx: &mut CrateContext, t: ty::t) -> @Repr {
119+
pub fn represent_type(cx: &CrateContext, t: ty::t) -> @Repr {
120120
debug!("Representing: {}", ty_to_str(cx.tcx, t));
121121
{
122122
let adt_reprs = cx.adt_reprs.borrow();
@@ -133,7 +133,7 @@ pub fn represent_type(cx: &mut CrateContext, t: ty::t) -> @Repr {
133133
return repr;
134134
}
135135

136-
fn represent_type_uncached(cx: &mut CrateContext, t: ty::t) -> Repr {
136+
fn represent_type_uncached(cx: &CrateContext, t: ty::t) -> Repr {
137137
match ty::get(t).sty {
138138
ty::ty_tup(ref elems) => {
139139
return Univariant(mk_struct(cx, *elems, false), false)
@@ -255,7 +255,7 @@ pub fn is_ffi_safe(tcx: ty::ctxt, def_id: ast::DefId) -> bool {
255255
// this should probably all be in ty
256256
struct Case { discr: Disr, tys: ~[ty::t] }
257257
impl Case {
258-
fn is_zerolen(&self, cx: &mut CrateContext) -> bool {
258+
fn is_zerolen(&self, cx: &CrateContext) -> bool {
259259
mk_struct(cx, self.tys, false).size == 0
260260
}
261261
fn find_ptr(&self) -> Option<uint> {
@@ -273,7 +273,7 @@ fn get_cases(tcx: ty::ctxt, def_id: ast::DefId, substs: &ty::substs) -> ~[Case]
273273
}
274274

275275

276-
fn mk_struct(cx: &mut CrateContext, tys: &[ty::t], packed: bool) -> Struct {
276+
fn mk_struct(cx: &CrateContext, tys: &[ty::t], packed: bool) -> Struct {
277277
let lltys = tys.map(|&ty| type_of::sizing_type_of(cx, ty));
278278
let llty_rec = Type::struct_(lltys, packed);
279279
Struct {
@@ -291,15 +291,15 @@ struct IntBounds {
291291
uhi: u64
292292
}
293293

294-
fn mk_cenum(cx: &mut CrateContext, hint: Hint, bounds: &IntBounds) -> Repr {
294+
fn mk_cenum(cx: &CrateContext, hint: Hint, bounds: &IntBounds) -> Repr {
295295
let it = range_to_inttype(cx, hint, bounds);
296296
match it {
297297
attr::SignedInt(_) => CEnum(it, bounds.slo as Disr, bounds.shi as Disr),
298298
attr::UnsignedInt(_) => CEnum(it, bounds.ulo, bounds.uhi)
299299
}
300300
}
301301

302-
fn range_to_inttype(cx: &mut CrateContext, hint: Hint, bounds: &IntBounds) -> IntType {
302+
fn range_to_inttype(cx: &CrateContext, hint: Hint, bounds: &IntBounds) -> IntType {
303303
debug!("range_to_inttype: {:?} {:?}", hint, bounds);
304304
// Lists of sizes to try. u64 is always allowed as a fallback.
305305
static choose_shortest: &'static[IntType] = &[
@@ -339,14 +339,14 @@ fn range_to_inttype(cx: &mut CrateContext, hint: Hint, bounds: &IntBounds) -> In
339339
return attr::UnsignedInt(ast::ty_u64);
340340
}
341341

342-
pub fn ll_inttype(cx: &mut CrateContext, ity: IntType) -> Type {
342+
pub fn ll_inttype(cx: &CrateContext, ity: IntType) -> Type {
343343
match ity {
344344
attr::SignedInt(t) => Type::int_from_ty(cx, t),
345345
attr::UnsignedInt(t) => Type::uint_from_ty(cx, t)
346346
}
347347
}
348348

349-
fn bounds_usable(cx: &mut CrateContext, ity: IntType, bounds: &IntBounds) -> bool {
349+
fn bounds_usable(cx: &CrateContext, ity: IntType, bounds: &IntBounds) -> bool {
350350
debug!("bounds_usable: {:?} {:?}", ity, bounds);
351351
match ity {
352352
attr::SignedInt(_) => {
@@ -380,24 +380,24 @@ pub fn ty_of_inttype(ity: IntType) -> ty::t {
380380
* and fill in the actual contents in a second pass to prevent
381381
* unbounded recursion; see also the comments in `trans::type_of`.
382382
*/
383-
pub fn type_of(cx: &mut CrateContext, r: &Repr) -> Type {
383+
pub fn type_of(cx: &CrateContext, r: &Repr) -> Type {
384384
generic_type_of(cx, r, None, false)
385385
}
386-
pub fn sizing_type_of(cx: &mut CrateContext, r: &Repr) -> Type {
386+
pub fn sizing_type_of(cx: &CrateContext, r: &Repr) -> Type {
387387
generic_type_of(cx, r, None, true)
388388
}
389-
pub fn incomplete_type_of(cx: &mut CrateContext, r: &Repr, name: &str) -> Type {
389+
pub fn incomplete_type_of(cx: &CrateContext, r: &Repr, name: &str) -> Type {
390390
generic_type_of(cx, r, Some(name), false)
391391
}
392-
pub fn finish_type_of(cx: &mut CrateContext, r: &Repr, llty: &mut Type) {
392+
pub fn finish_type_of(cx: &CrateContext, r: &Repr, llty: &mut Type) {
393393
match *r {
394394
CEnum(..) | General(..) => { }
395395
Univariant(ref st, _) | NullablePointer{ nonnull: ref st, .. } =>
396396
llty.set_struct_body(struct_llfields(cx, st, false), st.packed)
397397
}
398398
}
399399

400-
fn generic_type_of(cx: &mut CrateContext, r: &Repr, name: Option<&str>, sizing: bool) -> Type {
400+
fn generic_type_of(cx: &CrateContext, r: &Repr, name: Option<&str>, sizing: bool) -> Type {
401401
match *r {
402402
CEnum(ity, _, _) => ll_inttype(cx, ity),
403403
Univariant(ref st, _) | NullablePointer{ nonnull: ref st, .. } => {
@@ -449,7 +449,7 @@ fn generic_type_of(cx: &mut CrateContext, r: &Repr, name: Option<&str>, sizing:
449449
}
450450
}
451451

452-
fn struct_llfields(cx: &mut CrateContext, st: &Struct, sizing: bool) -> ~[Type] {
452+
fn struct_llfields(cx: &CrateContext, st: &Struct, sizing: bool) -> ~[Type] {
453453
if sizing {
454454
st.fields.map(|&ty| type_of::sizing_type_of(cx, ty))
455455
} else {
@@ -705,7 +705,7 @@ pub fn trans_drop_flag_ptr(bcx: @Block, r: &Repr, val: ValueRef) -> ValueRef {
705705
* this could be changed in the future to avoid allocating unnecessary
706706
* space after values of shorter-than-maximum cases.
707707
*/
708-
pub fn trans_const(ccx: &mut CrateContext, r: &Repr, discr: Disr,
708+
pub fn trans_const(ccx: &CrateContext, r: &Repr, discr: Disr,
709709
vals: &[ValueRef]) -> ValueRef {
710710
match *r {
711711
CEnum(ity, min, max) => {
@@ -750,7 +750,7 @@ pub fn trans_const(ccx: &mut CrateContext, r: &Repr, discr: Disr,
750750
* a two-element struct will locate it at offset 4, and accesses to it
751751
* will read the wrong memory.
752752
*/
753-
fn build_const_struct(ccx: &mut CrateContext, st: &Struct, vals: &[ValueRef])
753+
fn build_const_struct(ccx: &CrateContext, st: &Struct, vals: &[ValueRef])
754754
-> ~[ValueRef] {
755755
assert_eq!(vals.len(), st.fields.len());
756756

@@ -791,7 +791,7 @@ fn padding(size: u64) -> ValueRef {
791791
fn roundup(x: u64, a: u64) -> u64 { ((x + (a - 1)) / a) * a }
792792

793793
/// Get the discriminant of a constant value. (Not currently used.)
794-
pub fn const_get_discrim(ccx: &mut CrateContext, r: &Repr, val: ValueRef)
794+
pub fn const_get_discrim(ccx: &CrateContext, r: &Repr, val: ValueRef)
795795
-> Disr {
796796
match *r {
797797
CEnum(ity, _, _) => {
@@ -825,7 +825,7 @@ pub fn const_get_discrim(ccx: &mut CrateContext, r: &Repr, val: ValueRef)
825825
* (Not to be confused with `common::const_get_elt`, which operates on
826826
* raw LLVM-level structs and arrays.)
827827
*/
828-
pub fn const_get_field(ccx: &mut CrateContext, r: &Repr, val: ValueRef,
828+
pub fn const_get_field(ccx: &CrateContext, r: &Repr, val: ValueRef,
829829
_discr: Disr, ix: uint) -> ValueRef {
830830
match *r {
831831
CEnum(..) => ccx.sess.bug("element access in C-like enum const"),
@@ -836,7 +836,7 @@ pub fn const_get_field(ccx: &mut CrateContext, r: &Repr, val: ValueRef,
836836
}
837837

838838
/// Extract field of struct-like const, skipping our alignment padding.
839-
fn const_struct_field(ccx: &mut CrateContext, val: ValueRef, ix: uint)
839+
fn const_struct_field(ccx: &CrateContext, val: ValueRef, ix: uint)
840840
-> ValueRef {
841841
// Get the ix-th non-undef element of the struct.
842842
let mut real_ix = 0; // actual position in the struct

0 commit comments

Comments
 (0)