Skip to content

Commit

Permalink
Add DummyResolvedMethod flag to OMR Symbol
Browse files Browse the repository at this point in the history
Includes getter/setter functions. This flag is used to identify
symbols corresponding to dummy TR_ResolvedMethod that are not
really resolved, but treated as such as the resolution mechanism
involves resolving the arguments instead. An example of that is
linkToStatic, which is a VM internal native call that is created
for unresolved invokedynamic and invokehandle bytecodes.

Signed-off-by: Nazim Bhuiyan <nubhuiyan@ibm.com>
  • Loading branch information
nbhuiyan committed Jun 4, 2021
1 parent bb369d1 commit 316fe47
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
11 changes: 11 additions & 0 deletions compiler/il/OMRSymbol.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,9 @@ class OMR_EXTENSIBLE Symbol
void setIsPendingPush() { _flags2.set(PendingPush); }
bool isPendingPush() { return _flags2.testAny(PendingPush); }

inline void setDummyResolvedMethod();
inline bool isDummyResolvedMethod();

/**
* Enum values for _flags field.
*/
Expand Down Expand Up @@ -566,6 +569,14 @@ class OMR_EXTENSIBLE Symbol
NonSpecificConstObject = 0x00002000, // Constant object not specific to a type
BlockFrequency = 0x00004000,
RecompQueuedFlag = 0x00008000,
/**
* This flag is used to identify symbols corresponding to dummy TR_ResolvedMethod
* that are not really resolved, but treated as such as the resolution mechanism
* involves resolving the arguments instead. An example of that is linkToStatic,
* which is a VM internal native call that is created for unresolved invokedynamic
* and invokehandle bytecodes.
*/
DummyResolvedMethod = 0x00010000,
};

protected:
Expand Down
12 changes: 12 additions & 0 deletions compiler/il/OMRSymbol_inlines.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,18 @@ OMR::Symbol::isSyncVolatile()
return self()->isVolatile();
}

void
OMR::Symbol::setDummyResolvedMethod()
{
_flags2.set(DummyResolvedMethod);
}

bool
OMR::Symbol::isDummyResolvedMethod()
{
return _flags2.testAny(DummyResolvedMethod);
}

TR::RegisterMappedSymbol *
OMR::Symbol::getRegisterMappedSymbol()
{
Expand Down

0 comments on commit 316fe47

Please sign in to comment.