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. --- testsuite/buildok/eight.stp | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 testsuite/buildok/eight.stp (limited to 'testsuite') diff --git a/testsuite/buildok/eight.stp b/testsuite/buildok/eight.stp new file mode 100755 index 00000000..84390270 --- /dev/null +++ b/testsuite/buildok/eight.stp @@ -0,0 +1,10 @@ +#! stap -p4 + +global foo + +probe begin { + foo[1] = 1 + delete foo[1] + delete foo[foo[foo[foo[1]]]] + delete foo +} -- cgit