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. --- staptree.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'staptree.h') diff --git a/staptree.h b/staptree.h index a1a5ebd2..4584d32d 100644 --- a/staptree.h +++ b/staptree.h @@ -591,10 +591,8 @@ struct probe const token* tok; std::vector locals; std::vector unused_locals; - expression* condition; probe (); void print (std::ostream& o) const; - void add_condition (expression* e); virtual void printsig (std::ostream &o) const; virtual void collect_derivation_chain (std::vector &probes_list); virtual probe* basest () { return this; } -- cgit From edc22ba9b105fd944f39cf536346ff68c2c8d0aa Mon Sep 17 00:00:00 2001 From: brolley Date: Thu, 24 Jan 2008 16:43:13 +0000 Subject: 2008-01-24 Dave Brolley PR 5017. * staptree.cxx (): #include it. (required ): Remove 'static' from instantiation and move instantiation to here from... * staptree.h: ...here. --- staptree.h | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) (limited to 'staptree.h') diff --git a/staptree.h b/staptree.h index 4584d32d..5b4b56cd 100644 --- a/staptree.h +++ b/staptree.h @@ -846,31 +846,8 @@ require (deep_copy_visitor* v, T* dst, T src) } } -template <> static void -require (deep_copy_visitor* v, indexable** dst, indexable* src) -{ - if (src != NULL) - { - symbol *array_src=NULL, *array_dst=NULL; - hist_op *hist_src=NULL, *hist_dst=NULL; - - classify_indexable(src, array_src, hist_src); - - *dst = NULL; - - if (array_src) - { - require (v, &array_dst, array_src); - *dst = array_dst; - } - else - { - require (v, &hist_dst, hist_src); - *dst = hist_dst; - } - assert (*dst); - } -} +template <> void +require (deep_copy_visitor* v, indexable** dst, indexable* src); template void provide (deep_copy_visitor* v, T src) -- cgit