Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add override specifier to virtual declarations #19797

Merged
merged 1 commit into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions runtime/compiler/env/J9SharedCache.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -682,27 +682,27 @@ class TR_J9JITServerSharedCache : public TR_J9SharedCache

virtual uintptr_t getClassChainOffsetIdentifyingLoader(TR_OpaqueClassBlock *clazz, uintptr_t **classChain = NULL) override;

virtual J9SharedClassCacheDescriptor *getCacheDescriptorList();
virtual J9SharedClassCacheDescriptor *getCacheDescriptorList() override;

void setStream(JITServer::ServerStream *stream) { _stream = stream; }
void setCompInfoPT(TR::CompilationInfoPerThread *compInfoPT) { _compInfoPT = compInfoPT; }
virtual const void *storeSharedData(J9VMThread *vmThread, const char *key, const J9SharedDataDescriptor *descriptor) override;

private:

virtual bool isPointerInMetadataSectionInCache(const J9SharedClassCacheDescriptor *cacheDesc, void *ptr)
virtual bool isPointerInMetadataSectionInCache(const J9SharedClassCacheDescriptor *cacheDesc, void *ptr) override
{
return isPointerInCache(cacheDesc, ptr);
}
virtual bool isOffsetInMetadataSectionInCache(const J9SharedClassCacheDescriptor *cacheDesc, uintptr_t offset)
virtual bool isOffsetInMetadataSectionInCache(const J9SharedClassCacheDescriptor *cacheDesc, uintptr_t offset) override
{
return (isOffsetFromEnd(offset) && isOffsetInCache(cacheDesc, offset));
}
virtual bool isPointerInROMClassesSectionInCache(const J9SharedClassCacheDescriptor *cacheDesc, void *ptr)
virtual bool isPointerInROMClassesSectionInCache(const J9SharedClassCacheDescriptor *cacheDesc, void *ptr) override
{
return isPointerInCache(cacheDesc, ptr);
}
virtual bool isOffsetinROMClassesSectionInCache(const J9SharedClassCacheDescriptor *cacheDesc, uintptr_t offset)
virtual bool isOffsetinROMClassesSectionInCache(const J9SharedClassCacheDescriptor *cacheDesc, uintptr_t offset) override
{
return (isOffsetFromStart(offset) && isOffsetInCache(cacheDesc, offset));
}
Expand Down
4 changes: 2 additions & 2 deletions runtime/compiler/env/VMJ9Server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ class TR_J9ServerVM: public TR_J9VM
virtual intptr_t getVFTEntry(TR_OpaqueClassBlock *clazz, int32_t offset) override;
virtual bool isClassArray(TR_OpaqueClassBlock *klass) override;
virtual uintptr_t getFieldOffset(TR::Compilation * comp, TR::SymbolReference* classRef, TR::SymbolReference* fieldRef) override { return 0; } // safe answer
virtual bool canDereferenceAtCompileTime(TR::SymbolReference *fieldRef, TR::Compilation *comp) { return false; } // safe answer, might change in the future
virtual bool canDereferenceAtCompileTime(TR::SymbolReference *fieldRef, TR::Compilation *comp) override { return false; } // safe answer, might change in the future
virtual bool instanceOfOrCheckCast(J9Class *instanceClass, J9Class* castClass) override;
virtual bool instanceOfOrCheckCastNoCacheUpdate(J9Class *instanceClass, J9Class* castClass) override;
virtual bool transformJlrMethodInvoke(J9Method *callerMethod, J9Class *callerClass) override;
Expand Down Expand Up @@ -228,7 +228,7 @@ class TR_J9ServerVM: public TR_J9VM
virtual UDATA getLowTenureAddress() override;
virtual UDATA getHighTenureAddress() override;

virtual MethodOfHandle methodOfDirectOrVirtualHandle(uintptr_t *mh, bool isVirtual);
virtual MethodOfHandle methodOfDirectOrVirtualHandle(uintptr_t *mh, bool isVirtual) override;

// Openjdk implementation
#if defined(J9VM_OPT_OPENJDK_METHODHANDLE)
Expand Down
2 changes: 1 addition & 1 deletion runtime/compiler/env/j9methodServer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ class TR_ResolvedRelocatableJ9JITServerMethod : public TR_ResolvedJ9JITServerMet
virtual bool getUnresolvedVirtualMethodInCP(int32_t cpIndex) override;
/* No need to override the stringConstant method as the parent method will be sufficient */
virtual bool fieldAttributes(TR::Compilation * comp, int32_t cpIndex, uint32_t * fieldOffset, TR::DataType * type, bool * volatileP, bool * isFinal, bool * isPrivate, bool isStore, bool * unresolvedInCP, bool needAOTValidation) override;
virtual bool staticAttributes(TR::Compilation * comp, int32_t cpIndex, void * * address,TR::DataType * type, bool * volatileP, bool * isFinal, bool * isPrivate, bool isStore, bool * unresolvedInCP, bool needAOTValidation);
virtual bool staticAttributes(TR::Compilation * comp, int32_t cpIndex, void * * address,TR::DataType * type, bool * volatileP, bool * isFinal, bool * isPrivate, bool isStore, bool * unresolvedInCP, bool needAOTValidation) override;
virtual TR_ResolvedMethod * getResolvedImproperInterfaceMethod(TR::Compilation * comp, I_32 cpIndex) override;

virtual TR_OpaqueMethodBlock *getNonPersistentIdentifier() override;
Expand Down
6 changes: 3 additions & 3 deletions runtime/compiler/runtime/RelocationRuntime.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -522,9 +522,9 @@ class TR_JITServerRelocationRuntime : public TR_RelocationRuntime {
static uint8_t *copyDataToCodeCache(const void *startAddress, size_t totalSize, TR_J9VMBase *fe);

private:
virtual uint8_t * allocateSpaceInCodeCache(UDATA codeSize);
virtual uint8_t * allocateSpaceInDataCache(UDATA metaDataSize, UDATA type);
virtual void initializeCacheDeltas();
virtual uint8_t * allocateSpaceInCodeCache(UDATA codeSize) override;
virtual uint8_t * allocateSpaceInDataCache(UDATA metaDataSize, UDATA type) override;
virtual void initializeCacheDeltas() override;
virtual void initializeAotRuntimeInfo() override { _classReloAmount = 1; }
};
#endif /* defined(J9VM_OPT_JITSERVER) */
Expand Down