From 5d23847db6a2b8ccacc992f76a1e387898047236 Mon Sep 17 00:00:00 2001 From: fche Date: Fri, 18 Jan 2008 13:07:13 +0000 Subject: PR 4936: probe pont conditions part 2; reorg in prep for full rewriting 2008-01-17 Frank Ch. Eigler PR 4935. Reorganize probe condition implementation. * elaborate.cxx (add_condition): New function. (derived_probe): Remove condition member. (derived_probe ctors): Assert non-null incoming probe/location ptrs. (insert_condition_statement): Remove; turn into ... (semantic_pass_conditions): New pass-2 subpass. (semantic_pass_symbols, visit_symbol, visit_functioncall, find_var): Detect some condition-related error cases. (match_key): Change type to exp_type from tok_type. Update callers. (alias_expansion_builder): Propagate probe conditions. * staptree.cxx (probe): Remove condition field and related functions. * tapsets.cxx (dwarf_derived_probe ctor): Compute replacement wildcard-expanded probe_point preserving more of the original location. (mark_derived_probe ctor): Make similar to others - take location rather than condition parameters. * translate.cxx (emit_common_header): Tweak ordering of tmpcounter traversal and hashkey expression generation. * elaborate.h: Corresponding changes. 2008-01-17 Frank Ch. Eigler PR 4935. * semko/forty.stp, fortyone.stp, fortytwo.stp: New tests. * semok/twentynine.stp: Weaken test since condition expressions have become more tightly constrained. --- elaborate.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'elaborate.h') diff --git a/elaborate.h b/elaborate.h index 13246b86..5f396526 100644 --- a/elaborate.h +++ b/elaborate.h @@ -118,7 +118,6 @@ struct derived_probe: public probe virtual probe_point* sole_location () const; virtual void printsig (std::ostream &o) const; void printsig_nested (std::ostream &o) const; - void insert_condition_statement (void); virtual void collect_derivation_chain (std::vector &probes_list); virtual void emit_probe_context_vars (translator_output*) {} @@ -197,7 +196,7 @@ match_key { std::string name; bool have_parameter; - token_type parameter_type; + exp_type parameter_type; match_key(std::string const & n); match_key(probe_point::component const & c); -- cgit