Skip to content

Commit a121b27

Browse files
committed
---
yaml --- r: 1464 b: refs/heads/master c: 9869aeb h: refs/heads/master v: v3
1 parent 1192503 commit a121b27

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
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: 7cae0c8c4d15546cbccacb6a937759903df608d7
2+
refs/heads/master: 9869aebf7d21e5076e16193f2fad9c7f9446fdc6

trunk/src/comp/middle/trans.rs

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ type glue_fns = rec(ValueRef activate_glue,
6161

6262
type tag_info = rec(
6363
type_handle th,
64-
mutable uint size,
6564
mutable @hashmap[ast.def_id,ValueRef] lldiscrims
6665
);
6766

@@ -4491,15 +4490,6 @@ fn trans_tag_variant(@crate_ctxt cx, ast.def_id tag_id,
44914490
auto arg_tys = arg_tys_of_fn(variant.ann);
44924491
copy_args_to_allocas(bcx, none[TypeRef], fn_args, arg_tys);
44934492

4494-
// FIXME: This is wrong for generic tags. We should be dynamically
4495-
// computing "size" below based on the tydescs passed in.
4496-
auto info = cx.tags.get(mk_plain_tag(tag_id));
4497-
4498-
auto lltagty = T_struct(vec(T_int(), T_array(T_i8(), info.size)));
4499-
4500-
// FIXME: better name.
4501-
llvm.LLVMAddTypeName(cx.llmod, _str.buf("tag"), lltagty);
4502-
45034493
auto lldiscrimptr = bcx.build.GEP(fcx.llretptr,
45044494
vec(C_int(0), C_int(0)));
45054495
bcx.build.Store(C_int(index), lldiscrimptr);
@@ -4718,7 +4708,6 @@ fn collect_item(&@crate_ctxt cx, @ast.item i) -> @crate_ctxt {
47184708

47194709
auto info = @rec(
47204710
th=mk_type_handle(),
4721-
mutable size=0u,
47224711
mutable lldiscrims=@new_def_hash[ValueRef]()
47234712
);
47244713

@@ -4780,6 +4769,9 @@ fn collect_tag_ctors(@crate_ctxt cx, @ast.crate crate) {
47804769
fn resolve_tag_types_for_item(&@crate_ctxt cx, @ast.item i) -> @crate_ctxt {
47814770
alt (i.node) {
47824771
case (ast.item_tag(_, ?variants, _, ?tag_id)) {
4772+
// FIXME: This is all wrong. Now sizes and alignments are computed
4773+
// dynamically instead of up front.
4774+
47834775
auto max_align = 0u;
47844776
auto max_size = 0u;
47854777

@@ -4799,8 +4791,6 @@ fn resolve_tag_types_for_item(&@crate_ctxt cx, @ast.item i) -> @crate_ctxt {
47994791
}
48004792
}
48014793

4802-
info.size = max_size;
4803-
48044794
// FIXME: alignment is wrong here, manually insert padding I
48054795
// guess :(
48064796
auto tag_ty = T_struct(vec(T_int(), T_array(T_i8(), max_size)));

0 commit comments

Comments
 (0)