Andrew Haley wrote: > It's not just static compilation: if you look at > VMThread.currentThread() you'll probably see something like > > extern DWORD _Jv_ThreadKey; > return (java::lang::Thread *) TlsGetValue(_Jv_ThreadKey); > > or > > extern pthread_key_t _Jv_ThreadKey; > return (java::lang::Thread *) pthread_getspecific (_Jv_ThreadKey); > > You see my point?
It's probably me, but taking PTHREAD_KEYS_MAX, non-conservative GC and thread local inheritance into account makes me think that the current approach is superior. Not to mention the VMs that already have Thread.currentThread() specific optimizations. (IKVM doesn't support GNU Classpath anymore, so I don't care either way.) Regards, Jeroen