diff options
author | fche <fche> | 2005-05-30 21:28:44 +0000 |
---|---|---|
committer | fche <fche> | 2005-05-30 21:28:44 +0000 |
commit | ce10591c2048cc3c5e4979b15e14fecc2a384968 (patch) | |
tree | 09b4a09692e1810809091ad474e35e0b3f752a81 /testsuite/transok | |
parent | 4383d78cedb616af407f35c996c4eff808704ea6 (diff) | |
download | systemtap-steved-ce10591c2048cc3c5e4979b15e14fecc2a384968.tar.gz systemtap-steved-ce10591c2048cc3c5e4979b15e14fecc2a384968.tar.xz systemtap-steved-ce10591c2048cc3c5e4979b15e14fecc2a384968.zip |
2005-05-30 Frank Ch. Eigler <fche@redhat.com>
More fully parse & elaborate "expr in array" construct.
* staptree.h (array_in): Make this unary. Update .cxx to match.
* parse.cxx (parse_array_in): Rewrite.
(parse_symbol_plain): Removed. Update .h to match.
* elaborate.cxx (typeresolution_info::visit_array_in): New function.
(find_array): Tentatively, accept arity=0.
* translate.cxx (c_unparser::c_assign): New functions to eliminate
much ugly duplication. Use throughout.
(visit_symbol): Correct function formal argument search.
(c_tmpcounter*::visit): Add missing recursion in several functions.
* testsuite/*: Add new tests for array-in construct. Add the
first "transok" test.
* Makefile.am: Add transok tests.
* Makefile.in: Regenerated.
Diffstat (limited to 'testsuite/transok')
-rwxr-xr-x | testsuite/transok/three.stp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/transok/three.stp b/testsuite/transok/three.stp new file mode 100755 index 00000000..ce94531c --- /dev/null +++ b/testsuite/transok/three.stp @@ -0,0 +1,27 @@ +#! stap + +function f1 (a, b) { + c = 1; + d = "hello"; + # poo[c] = bab[d] = "hi" + bab = "hi"; + bab = poo[c]; + return 0 +} + +function f2 () { + return f1 (4, "zoo"); +} + +global koo +global poo, bab + +probe z { + f2 (); + koo = 1 +} + +probe x,y { + f2 (); + f1 (f1 (3, "foo"), "canoe") +} |