Skip to content

Commit 8987091

Browse files
committed
---
yaml --- r: 23015 b: refs/heads/master c: 94aa38d h: refs/heads/master i: 23013: 7e517d5 23011: 13c8e0b 23007: 16ffff0 v: v3
1 parent 4242c33 commit 8987091

File tree

2 files changed

+16
-18
lines changed

2 files changed

+16
-18
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: a3dd67ae9165ee87c98ba7e5585ce859fd3fbe68
2+
refs/heads/master: 94aa38d470c713554a6973042f30fca0a5101a60
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/src/rustc/metadata/encoder.rs

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,21 @@ fn encode_info_for_item(ecx: @encode_ctxt, ebml_w: ebml::writer, item: @item,
777777
let bkts = create_index(idx, hash_node_id);
778778
encode_index(ebml_w, bkts, write_int);
779779
ebml_w.end_tag();
780+
781+
/* Encode the constructor */
782+
for ctor.each |ctor| {
783+
debug!{"encoding info for ctor %s %d", *item.ident,
784+
ctor.node.id};
785+
vec::push(*index, {
786+
val: ctor.node.id,
787+
pos: ebml_w.writer.tell()
788+
});
789+
encode_info_for_fn(ecx, ebml_w, ctor.node.id, item.ident,
790+
path, if tps.len() > 0u {
791+
some(ii_ctor(ctor, item.ident, tps,
792+
local_def(item.id))) }
793+
else { none }, tps, ctor.node.dec);
794+
}
780795
}
781796
item_impl(tps, traits, _, methods) => {
782797
add_to_index();
@@ -891,23 +906,6 @@ fn encode_info_for_items(ecx: @encode_ctxt, ebml_w: ebml::writer,
891906
match check ecx.tcx.items.get(i.id) {
892907
ast_map::node_item(_, pt) => {
893908
encode_info_for_item(ecx, ebml_w, i, index, *pt);
894-
/* encode ctor, then encode items */
895-
match i.node {
896-
item_class(tps, _, _, some(ctor), m_dtor) => {
897-
debug!{"encoding info for ctor %s %d", *i.ident,
898-
ctor.node.id};
899-
vec::push(*index, {
900-
val: ctor.node.id,
901-
pos: ebml_w.writer.tell()
902-
});
903-
encode_info_for_fn(ecx, ebml_w, ctor.node.id, i.ident,
904-
*pt, if tps.len() > 0u {
905-
some(ii_ctor(ctor, i.ident, tps,
906-
local_def(i.id))) }
907-
else { none }, tps, ctor.node.dec);
908-
}
909-
_ => {}
910-
}
911909
}
912910
}
913911
},

0 commit comments

Comments
 (0)