From 1b07c728305a32a8d1fa1bb5da9d428e34dddf4e Mon Sep 17 00:00:00 2001 From: fche Date: Tue, 25 Apr 2006 17:40:53 +0000 Subject: 2006-04-25 Frank Ch. Eigler PR 2427. * staptree.cxx (varuse_collecting_visitor::visit_embeddedcode): Support /* pure */ declaration. Stop using __tvar_ naming hack. (v_c_u::visit_print_format): Mark sprint and sprintf as side-effect-free. (deep_copy_visitor::visit_print_format): Propagate raw_components. * stap.1.in: Document declaration. * elaborate.cxx (semantic_pass_opt2): Verbose message tweak. (dead_stmtexpr_remover): Extend for more aggressive optimization. * tapsets.cxx (dwarf,mark_var_expanding_copy_visotor): Add /* pure */ declaration to rvalue expansions. * tapset/*.stp: Added /* pure */ declarations to many functions. * testsuite/parseok/unparsers.stp: Propagate guru mode flag. * testsuite/buildok/twentyfour.stp: New test. --- tapset/string.stp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tapset/string.stp') diff --git a/tapset/string.stp b/tapset/string.stp index 249ff831..19b8f81f 100644 --- a/tapset/string.stp +++ b/tapset/string.stp @@ -8,7 +8,7 @@ * @param s string * @return Returns the length of the string. */ -function strlen:long(s:string) %{ +function strlen:long(s:string) %{ /* pure */ THIS->__retvalue=strlen(THIS->s); %} @@ -17,7 +17,7 @@ function strlen:long(s:string) %{ * @param str string * @return Returns the length of the string. */ -function substr:string(str:string,start:long,stop:long) %{ +function substr:string(str:string,start:long,stop:long) %{ /* pure */ int len=strlen(THIS->str); if(THIS->start<0 || THIS->stop<0 || THIS->start>len || THIS->stop>len || @@ -39,7 +39,7 @@ function substr:string(str:string,start:long,stop:long) %{ * @param s2 string * @return Returns 1 if s2 is in s1. */ -function isinstr:long(s1:string,s2:string) %{ +function isinstr:long(s1:string,s2:string) %{ /* pure */ if(strstr(THIS->s1,THIS->s2)!=NULL) THIS->__retvalue = 1; else -- cgit