Skip to content

Commit

Permalink
Add more item types to the ast_map so the test suite can build with d…
Browse files Browse the repository at this point in the history
…ebug info.
  • Loading branch information
jdm committed Jan 5, 2012
1 parent 1dec1c8 commit 0e98e64
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/comp/middle/ast_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ fn map_native_item(cx: ctx, i: @native_item) {

fn map_expr(cx: ctx, ex: @expr) {
cx.map.insert(ex.id, node_expr(ex));
alt ex.node {
expr_anon_obj(ao) {
for m in ao.methods {
cx.map.insert(m.id, node_obj_method(m));
}
}
_ {}
}
}

fn new_smallintmap_int_adapter<copy V>() -> std::map::hashmap<int, V> {
Expand Down
2 changes: 1 addition & 1 deletion src/comp/middle/debuginfo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ fn create_function(fcx: @fn_ctxt) -> @metadata<subprogram_md> {
}
}
}
ast_map::node_obj_method(method) {
ast_map::node_obj_method(method) | ast_map::node_method(method) {
(method.ident, method.decl.output, method.id)
}
ast_map::node_res_ctor(item) {
Expand Down

0 comments on commit 0e98e64

Please sign in to comment.