From 3a20432bc0a0aa6d8651561d508cc730e6dabc97 Mon Sep 17 00:00:00 2001 From: fche Date: Fri, 12 Aug 2005 19:43:55 +0000 Subject: 2005-08-12 Frank Ch. Eigler PR systemtap/1122 et alii * parse.cxx (parse_literal): Parse and range-limit 64-bit numbers. (parse_unary): Correct precedence glitch. * staptree.h (literal_number): Store an int64_t. * staptree.cxx: Corresponding changes. * translate.cxx (check_dbz): Remove - insufficient. (emit_function): Define CONTEXT macro sibling for THIS. (c_typename): pe_long -> int64_t. (visit_literal_number): Format literal rigorously and uglily. (c_assignop, visit_binary_expression): Handle div/mod via new helper functions in runtime. * tapset/builtin_logging.stp: Add error, exit builtins. * testsuite/buildok/ten,eleven.stp: New tests. * testsuite/parse{ko,ok}/six.stp: Modify for larger numbers. * testsuite/transok/one.stp: Add more ";"s, maybe unnecessarily. 2005-08-12 Frank Ch. Eigler * arith.c: New file to contain arithmetic helper functions. * builtin_functions.h: Remove, unused. * runtime.h: Include it. --- staptree.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'staptree.h') diff --git a/staptree.h b/staptree.h index 93537921..8edb3ecc 100644 --- a/staptree.h +++ b/staptree.h @@ -14,7 +14,9 @@ #include #include #include - +extern "C" { +#include +} struct token; // parse.h struct semantic_error: public std::runtime_error @@ -38,8 +40,8 @@ struct semantic_error: public std::runtime_error enum exp_type { pe_unknown, - pe_long, - pe_string, + pe_long, // int64_t + pe_string, // std::string pe_stats }; @@ -77,9 +79,8 @@ struct literal_string: public literal struct literal_number: public literal { - // XXX: s/long/long long/ throughout - long value; - literal_number (long v); + int64_t value; + literal_number (int64_t v); void print (std::ostream& o); void visit (visitor* u); }; -- cgit