Skip to content

Commit 120e9a6

Browse files
committed
---
yaml --- r: 3601 b: refs/heads/master c: 993e471 h: refs/heads/master i: 3599: 50687b8 v: v3
1 parent 4e2b1aa commit 120e9a6

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: f279e0d76e3cfb7753074bc4c77926c0e7e48990
2+
refs/heads/master: 993e47175fcf8ae109d1ea7cdc27b6b9edb85e74

trunk/src/comp/middle/trans.rs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,16 @@ type fn_ctxt =
180180
// env*, int, int). These are also available via
181181
// llvm::LLVMGetParam(llfn, uint) where uint = 1, 2, 0 respectively,
182182
// but we unpack them into these fields for convenience.
183+
184+
// Points to the current task.
183185
ValueRef lltaskptr,
186+
187+
// Points to the current environment (bindings of variables to
188+
// values), if this is a regular function; points to the current
189+
// object, if this is a method.
184190
ValueRef llenv,
191+
192+
// Points to where the return value of this function should end up.
185193
ValueRef llretptr,
186194

187195
// The next three elements: "hoisted basic blocks" containing
@@ -1726,19 +1734,19 @@ fn get_derived_tydesc(&@block_ctxt cx, &ty::t t, bool escapes,
17261734

17271735
fn get_tydesc(&@block_ctxt cx, &ty::t t, bool escapes,
17281736
&mutable option::t[@tydesc_info] static_ti) -> result {
1729-
// Is the supplied type a type param? If so, return the passed-in tydesc.
17301737

1738+
// Is the supplied type a type param? If so, return the passed-in tydesc.
17311739
alt (ty::type_param(cx.fcx.lcx.ccx.tcx, t)) {
17321740
case (some(?id)) { ret rslt(cx, cx.fcx.lltydescs.(id)); }
17331741
case (none) {/* fall through */ }
17341742
}
1735-
// Does it contain a type param? If so, generate a derived tydesc.
17361743

1744+
// Does it contain a type param? If so, generate a derived tydesc.
17371745
if (ty::type_contains_params(cx.fcx.lcx.ccx.tcx, t)) {
17381746
ret get_derived_tydesc(cx, t, escapes, static_ti);
17391747
}
1740-
// Otherwise, generate a tydesc if necessary, and return it.
17411748

1749+
// Otherwise, generate a tydesc if necessary, and return it.
17421750
auto info = get_static_tydesc(cx, t, []);
17431751
static_ti = some[@tydesc_info](info);
17441752
ret rslt(cx, info.tydesc);
@@ -5003,8 +5011,8 @@ fn trans_field(&@block_ctxt cx, &span sp, ValueRef v, &ty::t t0,
50035011
r.bcx.build.GEP(r.val,
50045012
[C_int(0), C_int(abi::obj_field_vtbl)]);
50055013
vtbl = r.bcx.build.Load(vtbl);
5006-
// +1 because slot #0 contains the destructor
50075014

5015+
// +1 because slot #0 contains the destructor
50085016
auto v = r.bcx.build.GEP(vtbl, [C_int(0), C_int(ix + 1u as int)]);
50095017
auto lvo = lval_mem(r.bcx, v);
50105018
let ty::t fn_ty =
@@ -7760,11 +7768,10 @@ fn trans_fn(@local_ctxt cx, &span sp, &ast::_fn f, ValueRef llfndecl,
77607768
if (!is_terminated(rslt.bcx)) {
77617769
// FIXME: until LLVM has a unit type, we are moving around
77627770
// C_nil values rather than their void type.
7763-
77647771
rslt.bcx.build.RetVoid();
77657772
}
7766-
// Insert the mandatory first few basic blocks before lltop.
77677773

7774+
// Insert the mandatory first few basic blocks before lltop.
77687775
finish_fn(fcx, lltop);
77697776
}
77707777

0 commit comments

Comments
 (0)