Skip to content

Commit

Permalink
Support resolved invokeHandle/invokeDynamic dispatch in SVM AOT
Browse files Browse the repository at this point in the history
Signed-off-by: Irwin D'Souza <[email protected]>
  • Loading branch information
dsouzai committed Oct 17, 2024
1 parent f9c7eba commit 1e73b80
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
24 changes: 24 additions & 0 deletions runtime/compiler/env/j9method.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1294,6 +1294,30 @@ TR_ResolvedRelocatableJ9Method::isUnresolvedMethodHandle(I_32 cpIndex)
return true;
}

bool
TR_ResolvedRelocatableJ9Method::isUnresolvedCallSiteTableEntry(int32_t callSiteIndex)
{
bool unresolved = true;
J9JavaVM * javaVM = fej9()->_jitConfig->javaVM;
if (J9_ARE_ALL_BITS_SET(javaVM->sharedClassConfig->runtimeFlags2, J9SHR_RUNTIMEFLAG2_SHARE_LAMBDAFORM))
{
unresolved = TR_ResolvedJ9Method::isUnresolvedCallSiteTableEntry(callSiteIndex);
}
return unresolved;
}

bool
TR_ResolvedRelocatableJ9Method::isUnresolvedMethodTypeTableEntry(int32_t cpIndex)
{
bool unresolved = true;
J9JavaVM * javaVM = fej9()->_jitConfig->javaVM;
if (J9_ARE_ALL_BITS_SET(javaVM->sharedClassConfig->runtimeFlags2, J9SHR_RUNTIMEFLAG2_SHARE_LAMBDAFORM))
{
unresolved = TR_ResolvedJ9Method::isUnresolvedMethodTypeTableEntry(cpIndex);
}
return unresolved;
}

TR_ResolvedMethod *
TR_ResolvedRelocatableJ9Method::getResolvedPossiblyPrivateVirtualMethod(
TR::Compilation *comp,
Expand Down
4 changes: 2 additions & 2 deletions runtime/compiler/env/j9method.h
Original file line number Diff line number Diff line change
Expand Up @@ -604,8 +604,8 @@ class TR_ResolvedRelocatableJ9Method : public TR_ResolvedJ9Method
virtual bool isUnresolvedMethodType(int32_t cpIndex);
virtual void * methodHandleConstant(int32_t cpIndex);
virtual bool isUnresolvedMethodHandle(int32_t cpIndex);
virtual bool isUnresolvedCallSiteTableEntry(int32_t callSiteIndex) { return true; }
virtual bool isUnresolvedMethodTypeTableEntry(int32_t cpIndex) { return true; }
virtual bool isUnresolvedCallSiteTableEntry(int32_t callSiteIndex);
virtual bool isUnresolvedMethodTypeTableEntry(int32_t cpIndex);

virtual bool fieldAttributes ( TR::Compilation *, int32_t cpIndex, uint32_t * fieldOffset, TR::DataType * type, bool * volatileP, bool * isFinal, bool *isPrivate, bool isStore, bool * unresolvedInCP, bool needsAOTValidation);

Expand Down

0 comments on commit 1e73b80

Please sign in to comment.