From 0e98e64bc2eb1ed87dfcb030a92c9e112c5df7a2 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Thu, 5 Jan 2012 01:19:50 -0500 Subject: [PATCH] Add more item types to the ast_map so the test suite can build with debug info. --- src/comp/middle/ast_map.rs | 8 ++++++++ src/comp/middle/debuginfo.rs | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) 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() -> std::map::hashmap { 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 { } } } - 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) {