Renamed capture_param functions to capture_call_param.
authorJustin Seyster <jseyster@cs.sunysb.edu>
Wed, 27 Oct 2010 20:56:23 +0000 (16:56 -0400)
committerJustin Seyster <jseyster@cs.sunysb.edu>
Wed, 27 Oct 2010 20:56:23 +0000 (16:56 -0400)
This is to strengthen the separation between call_param and in_param.

src/aop-pc-fun-call.c
src/aop-pointcut.c
src/aop.h
test/plugin-float-types.c
test/plugin-int-types.c
test/plugin-pointer-types.c
test/plugin-reinst1.c
test/plugin-reinst2.c
test/plugin-struct-types.c
workspace/advice_header.c

index e76d9055ae6697381487cc114f9a42aff1a66a8f..8e094f8da6c559222b868b5079ab6ef9142079ea 100644 (file)
@@ -337,7 +337,7 @@ aop_filter_call_pc_by_name (struct aop_pointcut *pc, const char *name)
  * pointcut, only the last one will have any effect.
  *
  * Note that you must filter a parameter by its type in order to
- * capture it with aop_capture_param().
+ * capture it with aop_capture_call_param().
  * \param pc The function call pointcut to filter.  Function call
  * pointcuts are created with aop_match_function_call().
  * \param n The index of the parameter to filter on.  Parameters are
@@ -546,7 +546,7 @@ op_get_param (struct aop_dynval *dv)
  * aop_filter_call_pc_by_param().
  */
 struct aop_dynval *
-aop_capture_param (struct aop_joinpoint *jp, int n)
+aop_capture_call_param (struct aop_joinpoint *jp, int n)
 {
   struct aop_pointcut *pc;
   struct aop_dynval *dv;
@@ -594,8 +594,8 @@ aop_capture_param (struct aop_joinpoint *jp, int n)
  * NULL if there is no matching parameter n.
  */
 struct aop_dynval *
-aop_capture_param_by_type (struct aop_joinpoint *jp, int n,
-                          const struct aop_type *type)
+aop_capture_call_param_by_type (struct aop_joinpoint *jp, int n,
+                               const struct aop_type *type)
 {
   struct aop_pointcut *pc;
   struct aop_dynval *dv;
index ca1cae88440b7a37c373b88335b9b98676974a51..fe35f73b93339c50303058131ba82886d7a67b20 100644 (file)
@@ -185,7 +185,7 @@ check_in_params (struct aop_pointcut *pc)
  * fuction.  Be careful not to capture the <code>in_param</code> of
  * the current function when you actually intend to capture the
  * <code>call_param</code> being passed to a function call join point.
- * (For the latter, use aop_capture_param() instead).
+ * (For the latter, use aop_capture_call_param() instead).
  *
  * Note that you must use aop_filter_by_in_param() to filter a
  * pointcut by parameter type for any parameter you wish to capture
index a4fae70356eb1d95582f88401337b463a711ebc1..c0108e9a99eef7e190ab274c03dce74473e80ad1 100644 (file)
--- a/src/aop.h
+++ b/src/aop.h
@@ -357,9 +357,9 @@ extern const char *aop_capture_called_function_name(struct aop_joinpoint *jp);
 extern struct aop_dynval *aop_capture_return_value (struct aop_joinpoint *jp);
 extern struct aop_dynval *aop_capture_return_value_by_type (
   struct aop_joinpoint *jp, const struct aop_type *type);
-extern struct aop_dynval *aop_capture_param (struct aop_joinpoint *jp,
-                                            int param_index);
-extern struct aop_dynval *aop_capture_param_by_type (
+extern struct aop_dynval *aop_capture_call_param (struct aop_joinpoint *jp,
+                                                 int param_index);
+extern struct aop_dynval *aop_capture_call_param_by_type (
   struct aop_joinpoint *jp, int n, const struct aop_type *type);
 
 extern struct aop_pointcut *aop_match_assignment_by_type (
index e8e82b875834e80de7b52f73dc7eb3d4791a3a2b..49877b25b7b3769f96913262c7934429a99236a2 100644 (file)
@@ -11,7 +11,7 @@ static void plugin_join_on_call(struct aop_joinpoint *jp, void *data)
   struct aop_dynval *n;
 
   name = aop_capture_called_function_name(jp);
-  n = aop_capture_param(jp, 0);
+  n = aop_capture_call_param(jp, 0);
   aop_insert_advice(jp, advice_name, AOP_INSERT_BEFORE, AOP_STR_CST(name), AOP_DYNVAL(n), AOP_DYNVAL(n), AOP_TERM_ARG);
 }
 
index f5bec2a27903dd0c8acf5b2d00bde9232df34c4f..eac06b92e15b650bb51e71fe7361d31772f34fae 100644 (file)
@@ -11,7 +11,7 @@ static void plugin_join_on_call(struct aop_joinpoint *jp, void *data)
   struct aop_dynval *n;
 
   name = aop_capture_called_function_name(jp);
-  n = aop_capture_param(jp, 0);
+  n = aop_capture_call_param(jp, 0);
   aop_insert_advice(jp, advice_name, AOP_INSERT_BEFORE, AOP_STR_CST(name), AOP_DYNVAL(n), AOP_DYNVAL(n), AOP_TERM_ARG);
 }
 
index 06468ea29b0eaab8995510e2555cd4cceba0daa6..d65f834a02d7c42cd666ce458eaf5eb530d5df87 100644 (file)
@@ -18,7 +18,7 @@ static void plugin_join_on_call(struct aop_joinpoint *jp, void *data)
   called = aop_capture_called_function_name(jp);
 
   if (called == NULL || *called != '_') {
-    p = aop_capture_param(jp, 0);
+    p = aop_capture_call_param(jp, 0);
     aop_insert_advice(jp, advice_name, AOP_INSERT_BEFORE, AOP_STR_CST(called), AOP_DYNVAL(p), AOP_TERM_ARG);
   }
 }
index a9e150f55480e0986d45f801c0149d9894afdf1e..e72c36dc46d103e6aa1e3bd22ae3286379aa6e1d 100644 (file)
@@ -8,7 +8,7 @@ static void plugin_join_on_foo(struct aop_joinpoint *jp, void *data)
 {
   struct aop_dynval *n;
 
-  n = aop_capture_param(jp, 1);
+  n = aop_capture_call_param(jp, 1);
   aop_insert_advice(jp, "_advice_foo", AOP_INSERT_BEFORE, AOP_DYNVAL(n), AOP_TERM_ARG);
 }
 
@@ -16,7 +16,7 @@ static void plugin_join_on_advice(struct aop_joinpoint *jp, void *data)
 {
   struct aop_dynval *n;
 
-  n = aop_capture_param(jp, 0);
+  n = aop_capture_call_param(jp, 0);
   aop_insert_advice(jp, "_advice_hook_bad", AOP_INSERT_BEFORE, AOP_DYNVAL(n), AOP_TERM_ARG);
 }
 
index ca4379938e9c3a60170e003d87120233de1458a2..d2c1f3ca9e83715e0b55ecfe2383411e6b4083c8 100644 (file)
@@ -11,7 +11,7 @@ static void plugin_join_on_advice(struct aop_joinpoint *jp, void *data)
 {
   struct aop_dynval *n;
 
-  n = aop_capture_param(jp, 0);
+  n = aop_capture_call_param(jp, 0);
   aop_insert_advice(jp, "_advice_hook_good", AOP_INSERT_BEFORE, AOP_DYNVAL(n), AOP_TERM_ARG);
 }
 
index a4f808ffdb2c74a6f737bf14426a75f5b6da482c..cc49192756d6104420d6ace674be8f8efdf60945 100644 (file)
@@ -11,7 +11,7 @@ static void plugin_join_on_call(struct aop_joinpoint *jp, void *data)
   struct aop_dynval *n;
 
   name = aop_capture_called_function_name(jp);
-  n = aop_capture_param(jp, 0);
+  n = aop_capture_call_param(jp, 0);
   aop_insert_advice(jp, advice_name, AOP_INSERT_BEFORE, AOP_STR_CST(name), AOP_DYNVAL(n), AOP_DYNVAL(n), AOP_TERM_ARG);
 }
 
index 875f4c08bae6c93badc4025a4ffce8c1fb6e96fe..f234c9aafa9f38c0149ce4ec523ff83fdcbc089d 100644 (file)
@@ -21,8 +21,8 @@ static void join_on_printf(struct aop_joinpoint *jp, void *data)
   struct aop_dynval *format;
   struct aop_dynval *int_arg;
 
-  format = aop_capture_param(jp, 0);
-  int_arg = aop_capture_param_by_type(jp, 1, aop_t_all_signed());
+  format = aop_capture_call_param(jp, 0);
+  int_arg = aop_capture_call_param_by_type(jp, 1, aop_t_all_signed());
 
   if (int_arg == NULL) {
     /* Second argument is not a signed integer. */