Assignment Pointcut Functions

Functions

const char * aop_capture_lhs_name (struct aop_joinpoint *jp)
struct aop_dynvalaop_capture_lhs_addr (struct aop_joinpoint *jp)
struct aop_dynvalaop_capture_assigned_value (struct aop_joinpoint *jp)
void aop_filter_include_temps (struct aop_pointcut *pc)
void aop_filter_exclude_temps (struct aop_pointcut *pc)
struct aop_pointcutaop_match_assignment_by_type (const struct aop_type *type)
int aop_capture_lhs_var_scope (struct aop_joinpoint *jp)

Function Documentation

struct aop_dynval* aop_capture_assigned_value ( struct aop_joinpoint jp  )  [read]

Get a dynval for the value being assigned at an assignment join point. The type of the dynval is determined by the the type originally passed to aop_match_assignment_by_type().

Parameters:
jp An assignment joinpoint. Assignment joinpoints are obtained by joining on an aop_match_assignment_by_type() pointcut.
Returns:
A dynval with type corresponding the the assignment pointcut's type.
struct aop_dynval* aop_capture_lhs_addr ( struct aop_joinpoint jp  )  [read]

Get a dynval representing the address of the variable being assigned to at an assignment joinpoint. Note that this capture function will return NULL if the joinpoint is an assignment to a temporary variable: temporary variables are never addressable. You only need to worry about non-addressable temporary variables in a pointcut if you filter it with aop_filter_include_temps().

Parameters:
jp An assignment joinpoint. Assignment joinpoints are obtained by joining on an aop_match_assignment_by_type() pointcut.
Returns:
A dynval with (void *) type or NULL if the assignment target is not addressable.
const char* aop_capture_lhs_name ( struct aop_joinpoint jp  ) 

Get the name of the variable being assigned to in an assignment joinpoint.

Parameters:
jp An assignment joinpoint. Assignment joinpoints are obtained by joining on an aop_match_assignment_by_type() pointcut.
Returns:
For a direct assignment to a variable, the name of that variable, otherwise NULL.
int aop_capture_lhs_var_scope ( struct aop_joinpoint jp  ) 

Return the scope of the variable that an assignment statement assigns to (i.e., the left-hand side), which will be an integer index or one of several special values.

If the assignment is to a global or file-local variable, the return value will simply be AOP_GLOBAL_SCOPE or AOP_FILE_SCOPE, respectively. The return value for a function-local variable is a non-negative index that corresponds to a lexical block in the function. A single function may have multiple variables with the same name, but those variables will have a different block index.

Note that you can use the AOP_LOCAL_SCOPE() macro to check if a return value indicates function-local scope.

If the assignment assigns to something other than a variable, such as a field in a struct or a dereferenced pointer, the return value will be AOP_MEMORY_SCOPE.

Parameters:
jp An assignment joinpoint. Assignment joinpoints are obtained by joining on an aop_match_assignment_by_type() pointcut.
Returns:
For a direct assignment to a variable, the scope of that variable (as a non-negative index or a special value), otherwise AOP_MEMORY_SCOPE.
void aop_filter_exclude_temps ( struct aop_pointcut pc  ) 

Exclude compiler-created temporary variables from an assignment pointcut.

This function is provided to undo the effect of aop_filter_include_temps(); by default, you do not need to call it.

Parameters:
pc The assignment pointcut to filter. Assignment pointcuts are created with aop_match_assignment_by_type().
void aop_filter_include_temps ( struct aop_pointcut pc  ) 

Include compiler-created temporary variables in an assignment pointcut.

By default, assignment pointcuts do not include assignments to temporary variables. These assignments will usually only be useful to users trying to debug the compiler with InterAsepct.

Parameters:
pc The assignment pointcut to filter. Assignment pointcuts are created with aop_match_assignment_by_type().
struct aop_pointcut* aop_match_assignment_by_type ( const struct aop_type type  )  [read]

Return a pointcut that matches all assignments to a variable with the given type.

Parameters:
type The type to filter assignments by.
Returns:
The resulting pointcut.
Generated on Tue Jul 31 21:46:42 2012 for InterAspect by doxygen 1.6.1