Skip to content

Commit 0c49517

Browse files
committed
---
yaml --- r: 31677 b: refs/heads/dist-snap c: 94aa38d h: refs/heads/master i: 31675: 65ac439 v: v3
1 parent 49ab124 commit 0c49517

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
@@ -7,6 +7,6 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
10-
refs/heads/dist-snap: a3dd67ae9165ee87c98ba7e5585ce859fd3fbe68
10+
refs/heads/dist-snap: 94aa38d470c713554a6973042f30fca0a5101a60
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/dist-snap/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)