forked from pool/systemtap
72 lines
1.6 KiB
Diff
72 lines
1.6 KiB
Diff
diff -ruN src-old/staptree.cxx src/staptree.cxx
|
|
--- src-old/staptree.cxx 2007-12-11 14:45:28.000000000 +0100
|
|
+++ src/staptree.cxx 2007-12-17 16:05:19.000000000 +0100
|
|
@@ -2390,3 +2390,30 @@
|
|
require <expression*> (&v, &n, s);
|
|
return n;
|
|
}
|
|
+
|
|
+template <> void
|
|
+require <indexable *> (deep_copy_visitor* v, indexable** dst, indexable* src)
|
|
+{
|
|
+ if (src != NULL)
|
|
+ {
|
|
+ symbol *array_src=NULL, *array_dst=NULL;
|
|
+ hist_op *hist_src=NULL, *hist_dst=NULL;
|
|
+
|
|
+ classify_indexable(src, array_src, hist_src);
|
|
+
|
|
+ *dst = NULL;
|
|
+
|
|
+ if (array_src)
|
|
+ {
|
|
+ require <symbol*> (v, &array_dst, array_src);
|
|
+ *dst = array_dst;
|
|
+ }
|
|
+ else
|
|
+ {
|
|
+ require <hist_op*> (v, &hist_dst, hist_src);
|
|
+ *dst = hist_dst;
|
|
+ }
|
|
+ assert (*dst);
|
|
+ }
|
|
+}
|
|
+
|
|
diff -ruN src-old/staptree.h src/staptree.h
|
|
--- src-old/staptree.h 2007-12-11 14:45:29.000000000 +0100
|
|
+++ src/staptree.h 2007-12-17 16:06:15.000000000 +0100
|
|
@@ -848,31 +848,8 @@
|
|
}
|
|
}
|
|
|
|
-template <> static void
|
|
-require <indexable *> (deep_copy_visitor* v, indexable** dst, indexable* src)
|
|
-{
|
|
- if (src != NULL)
|
|
- {
|
|
- symbol *array_src=NULL, *array_dst=NULL;
|
|
- hist_op *hist_src=NULL, *hist_dst=NULL;
|
|
-
|
|
- classify_indexable(src, array_src, hist_src);
|
|
-
|
|
- *dst = NULL;
|
|
-
|
|
- if (array_src)
|
|
- {
|
|
- require <symbol*> (v, &array_dst, array_src);
|
|
- *dst = array_dst;
|
|
- }
|
|
- else
|
|
- {
|
|
- require <hist_op*> (v, &hist_dst, hist_src);
|
|
- *dst = hist_dst;
|
|
- }
|
|
- assert (*dst);
|
|
- }
|
|
-}
|
|
+template <> void
|
|
+require <indexable *> (deep_copy_visitor* v, indexable** dst, indexable* src);
|
|
|
|
template <typename T> void
|
|
provide (deep_copy_visitor* v, T src)
|