[Jsr308-statements] Re: statement ranges

Trevor Harmon trevor at vocaro.com
Wed Apr 18 15:41:57 EDT 2007


On Apr 18, 2007, at 5:09 AM, Eugene Kuleshov wrote:

>  However Option 2 is actually suggesting to use loop's own block,  
> which won't be affected by that issue:
>
>     for(...) @Loopcount(100) {
>        ...
>     }

I see. That is definitely better, but I still don't like it. :)

> There is actually one thing to worry about. We need to specify how  
> those blocks will be mapped to the bytecode. For example, consider  
> the following method:
>
> 35  private void boo1() {
> 36    int a = 1;
> 37    @Ann1 for (int i = 0;
> 38          i < 100;
> 39          i++) @Ann2 {
> 40      int b = 1;
> 41      boo();
> 42    }
> 43  }
>
>  Now, question is how ranges should look like for annotations Ann1  
> and Ann2?

Is a bytecode range strictly necessary in that example? How about  
giving both the same bytecode location, but marking Ann1 "pre- 
expression" and Ann2 "post-expression"?

>>> It might be good to elucidate the argument a bit, because I don't  
>>> think the above will convince any
>>> skeptics.  And this:
>>>> It wouldn't even be worth the effort of putting forth a  
>>>> specification, IMHO.
>>> definitely won't!
>> I wasn't expecting to win over anyone; I'm just saying that if the  
>> spec starts heading in that direction, I'll no longer have any  
>> interest in participating.
>  Hmm. What is this about? It seems like I missed an email or two...

My fault. Michael's email was only to me, but my reply was to the list.

Trevor




More information about the JSR308-statements mailing list