@@ -56,13 +56,21 @@ iface tr {
56
56
57
57
fn encode_inlined_item ( ecx : @e:: encode_ctxt ,
58
58
ebml_w : ebml:: writer ,
59
+ path : ast_map:: path ,
59
60
item : @ast:: item ) {
61
+ #debug[ "> Encoding inlined item: %s::%s (%u)" ,
62
+ ast_map:: path_to_str ( path) ,
63
+ item. ident ,
64
+ ebml_w. writer . tell ( ) ] ;
60
65
let id_range = compute_id_range ( item) ;
61
66
ebml_w. wr_tag ( c:: tag_ast as uint ) { ||
62
67
encode_id_range ( ebml_w, id_range) ;
63
68
encode_ast ( ebml_w, item) ;
64
69
encode_side_tables_for_item ( ecx, ebml_w, item) ;
65
70
}
71
+ #debug[ "< Encoded inlined item: %s (%u)" ,
72
+ ast_map:: path_to_str ( path) ,
73
+ ebml_w. writer . tell ( ) ] ;
66
74
}
67
75
68
76
fn decode_inlined_item ( cdata : cstore:: crate_metadata ,
@@ -74,15 +82,18 @@ fn decode_inlined_item(cdata: cstore::crate_metadata,
74
82
alt par_doc. opt_child ( c:: tag_ast) {
75
83
none { none }
76
84
some( ast_doc) {
85
+ #debug[ "> Decoding inlined item: %s" , ast_map:: path_to_str ( path) ] ;
77
86
let from_id_range = decode_id_range ( ast_doc) ;
78
87
let to_id_range = reserve_id_range ( dcx. tcx . sess , from_id_range) ;
79
88
let xcx = @{ dcx: dcx,
80
89
from_id_range: from_id_range,
81
90
to_id_range: to_id_range} ;
82
91
let raw_item = decode_ast ( ast_doc) ;
83
92
let item = renumber_ast ( xcx, raw_item) ;
93
+ #debug[ ">> Item named: %s" , item. ident ] ;
84
94
ast_map:: map_decoded_item ( dcx. tcx . items , path, item) ;
85
95
decode_side_tables ( xcx, ast_doc) ;
96
+ #debug[ "< Decoded inlined item: %s" , ast_map:: path_to_str ( path) ] ;
86
97
some ( item)
87
98
}
88
99
}
@@ -629,7 +640,7 @@ fn encode_side_tables_for_id(ecx: @e::encode_ctxt,
629
640
ebml_w. id ( id) ;
630
641
ebml_w. tag ( c:: tag_table_val) { ||
631
642
ebml_w. emit_from_vec ( * fv) { |fv_entry|
632
- encode_def ( ebml_w, fv_entry. def ) ;
643
+ encode_freevar_entry ( ebml_w, * fv_entry)
633
644
}
634
645
}
635
646
}
@@ -759,7 +770,7 @@ fn decode_side_tables(xcx: extended_decode_ctxt,
759
770
let id0 = entry_doc[ c:: tag_table_id] . as_int ( ) ;
760
771
let id = xcx. tr_id ( id0) ;
761
772
762
- #debug[ "side table document with tag 0x%x found for id %d (orig %d)" ,
773
+ #debug[ ">> Side table document with tag 0x%x found for id %d (orig %d)" ,
763
774
tag, id, id0] ;
764
775
765
776
if tag == ( c:: tag_table_mutbl as uint ) {
@@ -803,6 +814,8 @@ fn decode_side_tables(xcx: extended_decode_ctxt,
803
814
#fmt[ "Unknown tag found in side tables: %x" , tag] ) ;
804
815
}
805
816
}
817
+
818
+ #debug[ ">< Side table doc loaded" ] ;
806
819
}
807
820
}
808
821
0 commit comments