Skip to content

Commit 6bcaa3e

Browse files
committed
---
yaml --- r: 20907 b: refs/heads/snap-stage3 c: 94aa38d h: refs/heads/master i: 20905: fcea5c4 20903: afcc341 v: v3
1 parent febaba6 commit 6bcaa3e

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,7 +1,7 @@
11
---
22
refs/heads/master: e430a699f2c60890d9b86069fd0c68a70ece7120
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: a3dd67ae9165ee87c98ba7e5585ce859fd3fbe68
4+
refs/heads/snap-stage3: 94aa38d470c713554a6973042f30fca0a5101a60
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

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