Skip to content

Commit 5a431b2

Browse files
committed
---
yaml --- r: 2219 b: refs/heads/master c: c4e13cd h: refs/heads/master i: 2217: e111a11 2215: d6dfdc1 v: v3
1 parent ba5b699 commit 5a431b2

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
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: da328b1ba951bf2dbeb188120ab6344115a28631
2+
refs/heads/master: c4e13cd1fa451327a756efc0c23bbbdbb9e7e1ae

trunk/src/comp/middle/metadata.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@ const uint tag_index_table = 0x15u;
4545
// Type encoding
4646

4747
// Compact string representation for ty.t values. API ty_str & parse_from_str.
48-
// (The second has to be authed pure.) Extra parameters are for converting
49-
// to/from def_ids in the string rep. Whatever format you choose should not
50-
// contain pipe characters.
48+
// Extra parameters are for converting to/from def_ids in the string rep.
49+
// Whatever format you choose should not contain pipe characters.
5150

5251
mod Encode {
5352

trunk/src/comp/middle/trans.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,8 @@ fn type_of_inner(@crate_ctxt cx, ty.t t) -> TypeRef {
786786
}
787787

788788
check (llty as int != 0);
789-
llvm.LLVMAddTypeName(cx.llmod, _str.buf(ty.ty_to_str(cx.tcx, t)), llty);
789+
llvm.LLVMAddTypeName(cx.llmod, _str.buf(ty.ty_to_abbrev_str(cx.tcx, t)),
790+
llty);
790791
cx.lltypes.insert(t, llty);
791792
ret llty;
792793
}
@@ -1645,7 +1646,7 @@ fn declare_tydesc(@local_ctxt cx, ty.t t) {
16451646
auto glue_fn_ty = T_ptr(T_glue_fn(ccx.tn));
16461647

16471648
auto name = sanitize(ccx.names.next("tydesc_" +
1648-
ty.ty_to_str(cx.ccx.tcx, t)));
1649+
ty.ty_to_abbrev_str(cx.ccx.tcx, t)));
16491650
auto gvar = llvm.LLVMAddGlobal(ccx.llmod, T_tydesc(ccx.tn),
16501651
_str.buf(name));
16511652
auto tydesc = C_struct(vec(C_null(T_ptr(T_ptr(T_tydesc(ccx.tn)))),

trunk/src/comp/middle/ty.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,12 @@ fn ty_to_str(ctxt cx, &t typ) -> str {
627627
ret s;
628628
}
629629

630+
fn ty_to_abbrev_str(ctxt cx, t typ) -> str {
631+
auto f = def_to_str;
632+
auto ecx = @rec(ds=f, tcx=cx);
633+
ret metadata.Encode.ty_str(ecx, typ);
634+
}
635+
630636
// Type folds
631637

632638
type ty_walk = fn(t);

0 commit comments

Comments
 (0)