From 77de5e9eca19f041e85681439f41ea35d30a37c9 Mon Sep 17 00:00:00 2001 From: graydon Date: Fri, 29 Jul 2005 01:47:56 +0000 Subject: 2005-07-28 Graydon Hoare * elaborate.cxx (derived_probe::derived_probe): Accept NULL probe. * staptree.cxx (provide, require): Move from here... * staptree.h: to here, and virtualize deep-copy methods. * translate.cxx (c_unparser::emit_common_header): Include loc2c-runtime.h * tapsets.cxx (dwflpp::iterate_over_modules): Use new, faster getmodules loop. (dwflpp::literal_stmt_for_local): New method, call loc2c. (var_expanding_copy_visitor): New struct which expands $-vars. (dwarf_derived_probe): Rebuild this->body using var expander. (query_function): Refactor logic a bit for speed. * loc2c.{c,h}: Copies (with minor changes) of Roland's work from elfutils CVS. * Makefile.am (AM_CFLAGS): Set to elfutils-style. (stap_SOURCES): Add loc2c.c. * Makefile.in: Regenerate. 2005-07-28 Graydon Hoare * loc2c-runtime.h: New file from elfutils CVS. --- staptree.cxx | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'staptree.cxx') diff --git a/staptree.cxx b/staptree.cxx index fb7c56aa..7f672c38 100644 --- a/staptree.cxx +++ b/staptree.cxx @@ -1020,25 +1020,6 @@ throwing_visitor::visit_functioncall (functioncall* e) // ------------------------------------------------------------------------ -template static void -require (deep_copy_visitor* v, T* dst, T src) -{ - *dst = NULL; - if (src != NULL) - { - v->targets.push(static_cast(dst)); - src->visit(v); - v->targets.pop(); - assert(*dst); - } -} - -template static void -provide (deep_copy_visitor* v, T src) -{ - assert(!v->targets.empty()); - *(static_cast(v->targets.top())) = src; -} void deep_copy_visitor::visit_block (block* s) -- cgit