Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] dynamic tests on CFlow PCD threadlocal stack


Look at the pair of files 'CflowPointcut.java' and 'ConcreteCflowPointcut.java'.  The first
represents the 'top' of the cflow, the second represents the bottom.

CflowPointcut.concretize() :
- checks if the pointcut exposes state, if it does we use a stack to represent the cflow, if it doesnt we use a counter.
- adds the counter or stack to the aspect (use our existing type munger processing infrastructure to add it)
- creates a shadow munger to increase the counter (or push stuff onto the stack) at the top of the cflow.
- returns a ConcreteCflowPointcut that represents the bottom of the cflow

ConcreteCflowPointcut.findResidueInternal():
- Checks to see if the pointcut is represented by a stack or a counter
- If a counter is used returns a test for counter.isValid()
- If a stack is used, creates some state binding logic for the exposed state vars and returns a test for stack.isValid()

stacks/counters are shared if similar pointcut expressions are used multiple times.

Andy.


Valerio Schiavoni <ervalerio@xxxxxxxxxx>
Sent by: aspectj-dev-admin@xxxxxxxxxxx

04/03/2005 16:33

Please respond to
aspectj-dev@xxxxxxxxxxx

To
aspectj-dev@xxxxxxxxxxx
cc
Subject
Re: [aspectj-dev] dynamic tests on CFlow PCD threadlocal stack





Wes Isberg ha scritto:

>Pointcut evaluation is woven into the classes, so you might not find
>direct source code, though you might find code to generate the code.
>  
>
can you help me in finding this code generator ?
What I need to understand is how this dynamic test is implemented, in
terms of bytecode efficiency.

>In any case, reverse-engineering the implementation might not be theway
>to go. Are you trying to change the implementation or write ana spect?
>
>  
>
I'm not trying to change the implementation, but since i'm planning to
produce some aspects as alternatives to use interceptors (in an already
existing component framework), i'd like t know what I should expect from
the aspect implementation (so to be able of doing a a-priori and
a-posteriori analysis).
_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-dev


Back to the top