From d98d459c440fb476869b34a84bb8a75d28fbb188 Mon Sep 17 00:00:00 2001 From: graydon Date: Tue, 9 Aug 2005 18:17:24 +0000 Subject: 2005-08-09 Graydon Hoare * elaborate.cxx: (delete_statement_symresolution_info): New struct. (symresolution_info::visit_delete_statement): Use it. (delete_statement_typeresolution_info): New struct. (typeresolution_info::visit_delete_statement): Use it. (symresolution_info::find_var): Accept -1 as 'unknown' arity. * elaborate.h: Update to reflect changes in .cxx. * translate.cxx (mapvar::del): New method. (c_unparser::getmap): Check arity >= 1; (delete_statement_operand_visitor): New struct. (c_unparser::visit_delete_statement): Use it. * staptree.cxx (vardecl::set_arity): Accept and ignore -1. (vardecl::compatible_arity): Likewise. * testsuite/buildok/eight.stp: New test for 'delete' operator. --- elaborate.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'elaborate.h') diff --git a/elaborate.h b/elaborate.h index 4b42e0be..86da8b51 100644 --- a/elaborate.h +++ b/elaborate.h @@ -35,10 +35,8 @@ public: // XXX: instead in systemtap_session? void derive_probes (match_node * root, probe *p, std::vector& dps); - -protected: - vardecl* find_var (const std::string& name, unsigned arity); + vardecl* find_var (const std::string& name, int arity); functiondecl* find_function (const std::string& name, unsigned arity); void visit_block (block *s); @@ -46,6 +44,7 @@ protected: void visit_foreach_loop (foreach_loop* e); void visit_arrayindex (arrayindex* e); void visit_functioncall (functioncall* e); + void visit_delete_statement (delete_statement* s); }; -- cgit