Hi,<br><br>Thanks for your response, but in my work I wish to match "For" loops to convert parallelisation form automatically, and it will be so good if I can match Openmp directive like :<br>"#pragma omp for ... "<br>
<br>Best regards<br>
Emir<br><br><div class="gmail_quote">2009/3/9 Stefan Marr <span dir="ltr"><<a href="mailto:aspectc@stefan-marr.de">aspectc@stefan-marr.de</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<div class="im"><br>
<br>
an advice directly on a specific language construct is not possible as far as I know.<br>
<br>
But if I read the language reference correctly, you might give "within()" a try. Actually, its only a guess on what you like to achieve.<br>
<br>
You cannot capture all similar loops with this, but at least you will be able to advice fct() if it is in the lexical body of somefunction()<br>
<br>
void somefunction() {<br></div><div class="im">
        for(i=0;i<count;i++) { fct(); }<br>
}<br>
<br></div><div class="im">
advice call("% fct()") && within("void somefunction()") : around() {<br>
        // this is similar to cflow, but matches hopefully<br>
        // only on calls lexically in the body of somefunction()<br>
}<br>
<br>
Totally unrelated:<br>
<br>
Is there a way to match macros?<br>
<br>
In the Lua VM there is a handy macro:<br>
#define GET_OPCODE(i)   (cast(OpCode, ((i)>>POS_OP) & MASK1(SIZE_OP,0)))<br>
<br>
and for profiling it would be great if I could write an advice like this:<br>
<br>
advice call("% GET_OPCODE(...)") && within("void luaV_execute (lua_State*, int)") && args(Instruction)<br>
: before(Instruction i) {<br>
        Profiler_add_bytecode(i);<br>
}<br>
<br>
Best regards<br>
Stefan<br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
</blockquote>
<br>
On 09 Mar 2009, at 10:06, BACCARI med emir wrote:<br>
<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
Hello,<br>
<br>
I want to match the execution of loop for like the code bellow in a C implementation :<br>
for(i=0;i<count;i++)<br>
      { fct(); }<br>
but I think that aspectC allow me to match only executions of functions :(<br>
If it's possible to capture different line in my code with joinpoint, please tell me how can I do it.<br>
Thanks.<br>
<br>
Best Regards.<br>
<br>
<br></div></div><div class="im">
_______________________________________________<br>
aspectc-user mailing list<br>
<a href="mailto:aspectc-user@aspectc.org" target="_blank">aspectc-user@aspectc.org</a><br>
<a href="http://www.aspectc.org/mailman/listinfo/aspectc-user" target="_blank">http://www.aspectc.org/mailman/listinfo/aspectc-user</a><br>
</div></blockquote><div><div></div><div class="h5">
<br>
-- <br>
Stefan Marr<br>
Programming Technology Lab<br>
Vrije Universiteit Brussel<br>
Pleinlaan 2 / B-1050 Brussels / Belgium<br>
<a href="http://prog.vub.ac.be/%7Esmarr" target="_blank">http://prog.vub.ac.be/~smarr</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Mohamed Emir BACCARI<br>Stagiare en mastere de recherche informatique<br>(TELECOM & Management SudParis) <br>e-mail : mohamed_emir.baccari@it-sudparis.eu <br>
tel      : 00 33 6 69 96 77 47<br>