summaryrefslogtreecommitdiffstats
path: root/translate.h
diff options
context:
space:
mode:
authordsmith <dsmith>2007-04-25 14:21:43 +0000
committerdsmith <dsmith>2007-04-25 14:21:43 +0000
commit11b52b730139445b4dc46b091180398195bd86dc (patch)
tree4be14cea2b6a0a292ac394c9ce1f99cb02179904 /translate.h
parent92a116dac29f373abbb4cb5dbd0c2beaf9465875 (diff)
downloadsystemtap-steved-11b52b730139445b4dc46b091180398195bd86dc.tar.gz
systemtap-steved-11b52b730139445b4dc46b091180398195bd86dc.tar.xz
systemtap-steved-11b52b730139445b4dc46b091180398195bd86dc.zip
2007-04-25 David Smith <dsmith@redhat.com>
PR 2339 * translate.cxx: Renamed "qname" to "value" throughout, since there are times now when qname would refer to a constant value. (tmpvar::override): Added function to allow for overriding a temporary variable name with a string. (tmpvar::value): New function that returns either the overridden string or the temporary variable name. (c_unparser::c_expression): New function. (c_unparser_assignment::c_assignop): Speed up assignment when numeric or string constants are used. (c_tmpcounter::visit_block): Avoid empty structs inside the union of temporary variables. (c_tmpcounter_assignment::prepare_rvalue): New function. (c_tmpcounter_assignment::c_assignop): New function. (c_tmpcounter_assignment::visit_symbol): Update temporary declarations. (c_unparser_assignment::prepare_rvalue): Speed up use of rvalues by using numeric and string constants directly instead of copying them to temporaries first. (c_tmpcounter::load_map_indices): New function. (c_unparser::load_map_indices): Speed up use of numeric and string constants as map indices. (c_tmpcounter::visit_arrayindex): Updated temporary declarations. (c_tmpcounter_assignment::visit_arrayindex): Updated temporary declarations. * translate.h (class translator_output): Added tellp() and seekp() functions.
Diffstat (limited to 'translate.h')
-rw-r--r--translate.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/translate.h b/translate.h
index eae7534f..fde8af9f 100644
--- a/translate.h
+++ b/translate.h
@@ -34,6 +34,9 @@ public:
std::ostream& newline (int indent = 0);
void indent (int indent = 0);
std::ostream& line();
+
+ std::ostream::pos_type tellp() { return o.tellp(); }
+ std::ostream& seekp(std::ostream::pos_type p) { return o.seekp(p); }
};