You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Robin Garner <ro...@anu.edu.au> on 2006/08/18 18:02:50 UTC

Re: [drlvm][vm, mmtk] adding thread-local storage functionality to vmmagic

> On 8/18/06, Robin Garner <ro...@anu.edu.au> wrote:
>>
>> Object org.vmmagic.utility.accessVmStructure(<identifier>)
>
> This is a good idea to keep in mind. We can introduce it when needed.
> At the moment for service fast-path inlining, I guess specific JIT
> intrisics are enough.

It strikes me that this single intrinsic is extensible and just as easily
implemented as the JIT specific ones.  And heads off a potentially messy
proliferation of ad-hoc methods right at the start.

>> or even better, declare object instances with a pragma annotation
>>
>> @IntrinsicDataStructure("name")
>> MutatorContext myMutatorContext;
>>
>> and the compiler generates code to fetch the address.  Has better type
>> safety, potentially.
>
> hmm, I am not sure how this syntactic suger can have better type safety.

Because an annotation that is seen by the JIT gives it the opportunity to
check the type of the declared instance with the VM structure it
corresponds to.  I think dismissing annotations as syntactic sugar is a
bit unfair.

> Thanks,
> xiaofeng
>

cheers,
Robin


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org