eclipse / omr

Eclipse OMR™ Cross platform components for building reliable, high performance language runtimes
http://www.eclipse.org/omr
Other
945 stars 396 forks source link

Polymorphic inline caches #1602

Open amitin opened 7 years ago

amitin commented 7 years ago

From the OMR source code I can see that OMR has an implementation to support PICs. How might we make use of polymorphic inline caches in OMR?

ymanton commented 7 years ago

I don't think there is actually any (working) support for this in the OMR compiler itself, what you are seeing are likely just remnants of the J9 JIT compiler. The conventional implementation would be in a "linkage," which is the part of the code generator that actually emits calls based on the calling convention/ABI that is in use in the code being compiled and/or the code being called.

Linkages are responsible for generating code that will perform direct calls, indirect calls, virtual calls, interface calls, and whatever other calls make sense in your environment. Last time I looked the linkages we have in the OMR compiler on most platforms are "system" linkages, i.e. they implement basic C ABI calls (direct and indirect), but not virtual or interface calls, hence you won't find PICs in them.

DanHeidinga commented 7 years ago

For the J9 JIT, watch the https://github.com/eclipse/openj9 project for when the "rest" of the code appears there =)