diff options
| author | Josh Matthews <josh@joshmatthews.net> | 2012-01-05 01:19:50 -0500 |
|---|---|---|
| committer | Josh Matthews <josh@joshmatthews.net> | 2012-01-05 01:20:51 -0500 |
| commit | 0e98e64bc2eb1ed87dfcb030a92c9e112c5df7a2 (patch) | |
| tree | d3ccb3948da1293abeffed3c88e584da85797a27 | |
| parent | 1dec1c8813768f86e6c0f581fb0bea07fa70a4c8 (diff) | |
| download | rust-0e98e64bc2eb1ed87dfcb030a92c9e112c5df7a2.tar.gz rust-0e98e64bc2eb1ed87dfcb030a92c9e112c5df7a2.zip | |
Add more item types to the ast_map so the test suite can build with debug info.
| -rw-r--r-- | src/comp/middle/ast_map.rs | 8 | ||||
| -rw-r--r-- | src/comp/middle/debuginfo.rs | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/comp/middle/ast_map.rs b/src/comp/middle/ast_map.rs index 2d2ef2e4c17..abf3d0cac1e 100644 --- a/src/comp/middle/ast_map.rs +++ b/src/comp/middle/ast_map.rs @@ -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> { diff --git a/src/comp/middle/debuginfo.rs b/src/comp/middle/debuginfo.rs index 0cc6cc7b79d..bdb76dfd921 100644 --- a/src/comp/middle/debuginfo.rs +++ b/src/comp/middle/debuginfo.rs @@ -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) { |
