From f5064a75445685bc72cf2eeb6043b8521a20b685 Mon Sep 17 00:00:00 2001 From: Daryl Maier Date: Wed, 19 Jun 2019 16:22:28 -0400 Subject: [PATCH] Create TR::Method typedef and modify TR_Method references Prepare to make the `TR_Method` base class an extensible class. Introduce a typedef of `TR_Method` to `TR::Method` and modify references throughout the OMR compiler. Signed-off-by: Daryl Maier --- compiler/compile/Method.cpp | 48 ++++++++++++------------ compiler/compile/OMRCompilation.cpp | 2 +- compiler/compile/OMRMethod.hpp | 3 ++ compiler/compile/ResolvedMethod.hpp | 2 +- compiler/il/symbol/MethodSymbol.hpp | 2 +- compiler/il/symbol/OMRMethodSymbol.cpp | 10 ++--- compiler/il/symbol/OMRMethodSymbol.hpp | 10 ++--- compiler/optimizer/CallInfo.hpp | 6 +-- compiler/optimizer/DebuggingCounters.hpp | 3 +- compiler/optimizer/Inliner.cpp | 2 +- compiler/optimizer/OMROptimizer.cpp | 4 +- compiler/optimizer/UseDefInfo.cpp | 10 ++--- compiler/optimizer/VPHandlers.cpp | 8 ++-- compiler/ras/Debug.cpp | 4 +- compiler/ras/Debug.hpp | 6 +-- compiler/ras/LimitFile.cpp | 10 ++--- fvtest/compilertest/compile/Method.hpp | 8 ++-- jitbuilder/compile/Method.hpp | 8 ++-- 18 files changed, 75 insertions(+), 71 deletions(-) diff --git a/compiler/compile/Method.cpp b/compiler/compile/Method.cpp index ac872f28b03..54a01033dbb 100644 --- a/compiler/compile/Method.cpp +++ b/compiler/compile/Method.cpp @@ -297,61 +297,61 @@ bool TR_ResolvedMethod::isDAAIntrinsicMethod() #endif } -uint32_t TR_Method::numberOfExplicitParameters() { TR_UNIMPLEMENTED(); return 0; } -TR::DataType TR_Method::parmType(uint32_t) { TR_UNIMPLEMENTED(); return TR::NoType; } -TR::ILOpCodes TR_Method::directCallOpCode() { TR_UNIMPLEMENTED(); return TR::BadILOp; } -TR::ILOpCodes TR_Method::indirectCallOpCode() { TR_UNIMPLEMENTED(); return TR::BadILOp; } -TR::DataType TR_Method::returnType() { TR_UNIMPLEMENTED(); return TR::NoType; } -bool TR_Method::returnTypeIsUnsigned() { TR_UNIMPLEMENTED(); return TR::NoType;} -uint32_t TR_Method::returnTypeWidth() { TR_UNIMPLEMENTED(); return 0; } -TR::ILOpCodes TR_Method::returnOpCode() { TR_UNIMPLEMENTED(); return TR::BadILOp; } -uint16_t TR_Method::classNameLength() { TR_UNIMPLEMENTED(); return 0; } -uint16_t TR_Method::nameLength() { TR_UNIMPLEMENTED(); return 0; } -uint16_t TR_Method::signatureLength() { TR_UNIMPLEMENTED(); return 0; } -char * TR_Method::classNameChars() { TR_UNIMPLEMENTED(); return 0; } -char * TR_Method::nameChars() { TR_UNIMPLEMENTED(); return 0; } -char * TR_Method::signatureChars() { TR_UNIMPLEMENTED(); return 0; } -bool TR_Method::isConstructor() { TR_UNIMPLEMENTED(); return false; } -bool TR_Method::isFinalInObject() { TR_UNIMPLEMENTED(); return false; } -const char * TR_Method::signature(TR_Memory *, TR_AllocationKind) { TR_UNIMPLEMENTED(); return 0; } -void TR_Method::setArchetypeSpecimen(bool b) { TR_UNIMPLEMENTED(); } +uint32_t TR::Method::numberOfExplicitParameters() { TR_UNIMPLEMENTED(); return 0; } +TR::DataType TR::Method::parmType(uint32_t) { TR_UNIMPLEMENTED(); return TR::NoType; } +TR::ILOpCodes TR::Method::directCallOpCode() { TR_UNIMPLEMENTED(); return TR::BadILOp; } +TR::ILOpCodes TR::Method::indirectCallOpCode() { TR_UNIMPLEMENTED(); return TR::BadILOp; } +TR::DataType TR::Method::returnType() { TR_UNIMPLEMENTED(); return TR::NoType; } +bool TR::Method::returnTypeIsUnsigned() { TR_UNIMPLEMENTED(); return TR::NoType;} +uint32_t TR::Method::returnTypeWidth() { TR_UNIMPLEMENTED(); return 0; } +TR::ILOpCodes TR::Method::returnOpCode() { TR_UNIMPLEMENTED(); return TR::BadILOp; } +uint16_t TR::Method::classNameLength() { TR_UNIMPLEMENTED(); return 0; } +uint16_t TR::Method::nameLength() { TR_UNIMPLEMENTED(); return 0; } +uint16_t TR::Method::signatureLength() { TR_UNIMPLEMENTED(); return 0; } +char * TR::Method::classNameChars() { TR_UNIMPLEMENTED(); return 0; } +char * TR::Method::nameChars() { TR_UNIMPLEMENTED(); return 0; } +char * TR::Method::signatureChars() { TR_UNIMPLEMENTED(); return 0; } +bool TR::Method::isConstructor() { TR_UNIMPLEMENTED(); return false; } +bool TR::Method::isFinalInObject() { TR_UNIMPLEMENTED(); return false; } +const char * TR::Method::signature(TR_Memory *, TR_AllocationKind) { TR_UNIMPLEMENTED(); return 0; } +void TR::Method::setArchetypeSpecimen(bool b) { TR_UNIMPLEMENTED(); } TR_MethodParameterIterator * -TR_Method::getParameterIterator(TR::Compilation&, TR_ResolvedMethod *) +TR::Method::getParameterIterator(TR::Compilation&, TR_ResolvedMethod *) { TR_UNIMPLEMENTED(); return 0; } bool -TR_Method::isBigDecimalMethod(TR::Compilation * comp) +TR::Method::isBigDecimalMethod(TR::Compilation * comp) { TR_UNIMPLEMENTED(); return false; } bool -TR_Method::isUnsafeCAS(TR::Compilation * comp) +TR::Method::isUnsafeCAS(TR::Compilation * comp) { TR_UNIMPLEMENTED(); return false; } bool -TR_Method::isUnsafeWithObjectArg(TR::Compilation * comp) +TR::Method::isUnsafeWithObjectArg(TR::Compilation * comp) { TR_UNIMPLEMENTED(); return false; } bool -TR_Method::isBigDecimalConvertersMethod(TR::Compilation * comp) +TR::Method::isBigDecimalConvertersMethod(TR::Compilation * comp) { TR_UNIMPLEMENTED(); return false; } -TR_Method * TR_ResolvedMethod::convertToMethod() { TR_UNIMPLEMENTED(); return 0; } +TR::Method *TR_ResolvedMethod::convertToMethod() { TR_UNIMPLEMENTED(); return 0; } uint32_t TR_ResolvedMethod::numberOfParameters() { TR_UNIMPLEMENTED(); return 0; } uint32_t TR_ResolvedMethod::numberOfExplicitParameters() { TR_UNIMPLEMENTED(); return 0; } TR::DataType TR_ResolvedMethod::parmType(uint32_t) { TR_UNIMPLEMENTED(); return TR::NoType; } diff --git a/compiler/compile/OMRCompilation.cpp b/compiler/compile/OMRCompilation.cpp index 9a432cbd896..36a0573ec5c 100644 --- a/compiler/compile/OMRCompilation.cpp +++ b/compiler/compile/OMRCompilation.cpp @@ -1163,7 +1163,7 @@ int32_t OMR::Compilation::compile() TR::Node*node = tt->getNode()->getFirstChild(); if (node->getOpCode().isCall()) { - TR_Method *method = node->getSymbol()->getMethodSymbol()->getMethod(); + TR::Method *method = node->getSymbol()->getMethodSymbol()->getMethod(); if (method) { TR_ByteCodeInfo &bcInfo = node->getByteCodeInfo(); diff --git a/compiler/compile/OMRMethod.hpp b/compiler/compile/OMRMethod.hpp index e1df826d68d..4235833d1d5 100644 --- a/compiler/compile/OMRMethod.hpp +++ b/compiler/compile/OMRMethod.hpp @@ -163,4 +163,7 @@ typedef struct TR_AOTMethodInfo int32_t cpIndex; } TR_AOTMethodInfo; + +namespace TR { typedef ::TR_Method Method; } + #endif diff --git a/compiler/compile/ResolvedMethod.hpp b/compiler/compile/ResolvedMethod.hpp index 84bc887efae..ef91597bd6e 100644 --- a/compiler/compile/ResolvedMethod.hpp +++ b/compiler/compile/ResolvedMethod.hpp @@ -51,7 +51,7 @@ class TR_ResolvedMethod { public: TR::RecognizedMethod getRecognizedMethod() { return convertToMethod()->getRecognizedMethod(); } - virtual TR_Method *convertToMethod(); + virtual TR::Method *convertToMethod(); virtual uint32_t numberOfParameters(); virtual uint32_t numberOfExplicitParameters(); // excludes receiver if any diff --git a/compiler/il/symbol/MethodSymbol.hpp b/compiler/il/symbol/MethodSymbol.hpp index ae4217f0871..6ac5d1589fe 100644 --- a/compiler/il/symbol/MethodSymbol.hpp +++ b/compiler/il/symbol/MethodSymbol.hpp @@ -37,7 +37,7 @@ class OMR_EXTENSIBLE MethodSymbol : public OMR::MethodSymbolConnector protected: - MethodSymbol(TR_LinkageConventions lc = TR_Private, TR_Method* m = NULL) : + MethodSymbol(TR_LinkageConventions lc = TR_Private, TR::Method *m = NULL) : OMR::MethodSymbolConnector(lc, m) { } private: diff --git a/compiler/il/symbol/OMRMethodSymbol.cpp b/compiler/il/symbol/OMRMethodSymbol.cpp index f4413b6f71d..4a1cf3886b6 100644 --- a/compiler/il/symbol/OMRMethodSymbol.cpp +++ b/compiler/il/symbol/OMRMethodSymbol.cpp @@ -26,7 +26,7 @@ #include "il/symbol/MethodSymbol.hpp" #include "infra/Flags.hpp" -OMR::MethodSymbol::MethodSymbol(TR_LinkageConventions lc, TR_Method * m) : +OMR::MethodSymbol::MethodSymbol(TR_LinkageConventions lc, TR::Method *m) : TR::Symbol(), _methodAddress(NULL), _method(m), @@ -61,12 +61,12 @@ OMR::MethodSymbol::isComputed() * Method Symbol Factory. */ template -TR::MethodSymbol * OMR::MethodSymbol::create(AllocatorType t, TR_LinkageConventions lc, TR_Method * m) +TR::MethodSymbol * OMR::MethodSymbol::create(AllocatorType t, TR_LinkageConventions lc, TR::Method *m) { return new (t) TR::MethodSymbol(lc, m); } //Explicit instantiations -template TR::MethodSymbol * OMR::MethodSymbol::create(TR_HeapMemory t, TR_LinkageConventions lc, TR_Method * m); -template TR::MethodSymbol * OMR::MethodSymbol::create(TR_StackMemory t, TR_LinkageConventions lc, TR_Method * m); -template TR::MethodSymbol * OMR::MethodSymbol::create(PERSISTENT_NEW_DECLARE t, TR_LinkageConventions lc, TR_Method * m); +template TR::MethodSymbol * OMR::MethodSymbol::create(TR_HeapMemory t, TR_LinkageConventions lc, TR::Method *m); +template TR::MethodSymbol * OMR::MethodSymbol::create(TR_StackMemory t, TR_LinkageConventions lc, TR::Method *m); +template TR::MethodSymbol * OMR::MethodSymbol::create(PERSISTENT_NEW_DECLARE t, TR_LinkageConventions lc, TR::Method *m); diff --git a/compiler/il/symbol/OMRMethodSymbol.hpp b/compiler/il/symbol/OMRMethodSymbol.hpp index b38e37bf1ea..7e56dcea0d9 100644 --- a/compiler/il/symbol/OMRMethodSymbol.hpp +++ b/compiler/il/symbol/OMRMethodSymbol.hpp @@ -53,12 +53,12 @@ class OMR_EXTENSIBLE MethodSymbol : public TR::Symbol protected: - MethodSymbol(TR_LinkageConventions lc = TR_Private, TR_Method * m = 0); + MethodSymbol(TR_LinkageConventions lc = TR_Private, TR::Method *m = 0); public: template - static TR::MethodSymbol * create(AllocatorType t, TR_LinkageConventions lc = TR_Private, TR_Method * m = 0); + static TR::MethodSymbol * create(AllocatorType t, TR_LinkageConventions lc = TR_Private, TR::Method *m = 0); TR::MethodSymbol *self(); @@ -73,8 +73,8 @@ class OMR_EXTENSIBLE MethodSymbol : public TR::Symbol TR_LinkageConventions getLinkageConvention() { return _linkageConvention; } void setLinkage(TR_LinkageConventions lc) { _linkageConvention = lc; } - TR_Method * getMethod() { return _method; } - void setMethod(TR_Method * m) { _method = m; } + TR::Method *getMethod() { return _method; } + void setMethod(TR::Method *m) { _method = m; } enum Kinds { @@ -200,7 +200,7 @@ class OMR_EXTENSIBLE MethodSymbol : public TR::Symbol void * _methodAddress; - TR_Method * _method; + TR::Method * _method; flags32_t _methodFlags; diff --git a/compiler/optimizer/CallInfo.hpp b/compiler/optimizer/CallInfo.hpp index 6ee28553195..0f9210b9c66 100644 --- a/compiler/optimizer/CallInfo.hpp +++ b/compiler/optimizer/CallInfo.hpp @@ -213,7 +213,7 @@ struct TR_CallTarget : public TR_Link TR::TreeTop *callNodeTreeTop, \ TR::Node *parent, \ TR::Node *callNode, \ - TR_Method * interfaceMethod, \ + TR::Method * interfaceMethod, \ TR_OpaqueClassBlock *receiverClass, \ int32_t vftSlot, \ int32_t cpIndex, \ @@ -251,7 +251,7 @@ struct TR_CallSite : public TR_Link TR::TreeTop *callNodeTreeTop, TR::Node *parent, TR::Node *callNode, - TR_Method * interfaceMethod, + TR::Method * interfaceMethod, TR_OpaqueClassBlock *receiverClass, int32_t vftSlot, int32_t cpIndex, @@ -356,7 +356,7 @@ struct TR_CallSite : public TR_Link TR::Node * _callNode; // Initial Information We Need to Calculate a CallTarget - TR_Method * _interfaceMethod; // If we have an interface, we'll only have a TR_Method until we determine others + TR::Method * _interfaceMethod; // If we have an interface, we'll only have a TR::Method until we determine others TR_OpaqueClassBlock * _receiverClass; // for interface calls, we might know this? int32_t _vftSlot; // int32_t _cpIndex; // diff --git a/compiler/optimizer/DebuggingCounters.hpp b/compiler/optimizer/DebuggingCounters.hpp index 8ad222af75f..e9cecd97078 100644 --- a/compiler/optimizer/DebuggingCounters.hpp +++ b/compiler/optimizer/DebuggingCounters.hpp @@ -24,6 +24,7 @@ #include #include +#include "compile/Method.hpp" #include "env/TRMemory.hpp" #include "env/jittypes.h" @@ -47,7 +48,7 @@ struct CountedCallSite int32_t frequency; int32_t numLocals; TR_OpaqueMethodBlock *opaque_method; - TR_Method *method; + TR::Method *method; TR_ByteCodeInfo bcInfo; CountedCallSite * _next; }; diff --git a/compiler/optimizer/Inliner.cpp b/compiler/optimizer/Inliner.cpp index 2544124f889..7d1c2961e71 100644 --- a/compiler/optimizer/Inliner.cpp +++ b/compiler/optimizer/Inliner.cpp @@ -5619,7 +5619,7 @@ TR_CallSite::TR_CallSite(TR_ResolvedMethod *callerResolvedMethod, TR::TreeTop *callNodeTreeTop, TR::Node *parent, TR::Node *callNode, - TR_Method * interfaceMethod, + TR::Method *interfaceMethod, TR_OpaqueClassBlock *receiverClass, int32_t vftSlot, int32_t cpIndex, diff --git a/compiler/optimizer/OMROptimizer.cpp b/compiler/optimizer/OMROptimizer.cpp index e735b4f99b4..45b2af2a687 100644 --- a/compiler/optimizer/OMROptimizer.cpp +++ b/compiler/optimizer/OMROptimizer.cpp @@ -544,7 +544,7 @@ static const OptimizationStrategy ilgenStrategyOpts[] = { unsafeFastPath }, { recognizedCallTransformer }, { coldBlockMarker }, - { CFGSimplification }, + { CFGSimplification }, { allocationSinking, IfNews }, { invariantArgumentPreexistence, IfNotClassLoadPhaseAndNotProfiling }, // Should not run if a recompilation is possible #endif @@ -1172,7 +1172,7 @@ void OMR::Optimizer::dumpPostOptTrees() // do nothing for IlGen optimizer if (isIlGenOpt()) return; - TR_Method *method = comp()->getMethodSymbol()->getMethod(); + TR::Method *method = comp()->getMethodSymbol()->getMethod(); if ((debug("dumpPostLocalOptTrees") || comp()->getOption(TR_TraceTrees))) comp()->dumpMethodTrees("Post Optimization Trees"); } diff --git a/compiler/optimizer/UseDefInfo.cpp b/compiler/optimizer/UseDefInfo.cpp index 07318a3e478..556810976fe 100644 --- a/compiler/optimizer/UseDefInfo.cpp +++ b/compiler/optimizer/UseDefInfo.cpp @@ -1693,7 +1693,7 @@ void TR_UseDefInfo::insertData(TR::Block *block, TR::Node *node,TR::Node *parent } TR::GlobalSparseBitVector *mustKill = NULL; TR::Symbol *callSym = NULL; - TR_Method *callMethod = NULL; + TR::Method *callMethod = NULL; TR::SparseBitVector::Cursor aliasesCursor(aliases); for (aliasesCursor.SetToFirstOne(); aliasesCursor.Valid(); aliasesCursor.SetToNextOne()) @@ -1825,7 +1825,7 @@ void TR_UseDefInfo::processReachingDefinition(void* vblockInfo, AuxiliaryData &a void TR_UseDefInfo::buildUseDefs(void *vblockInfo, AuxiliaryData &aux) { - TR_Method *method = comp()->getMethodSymbol()->getMethod(); + TR::Method *method = comp()->getMethodSymbol()->getMethod(); TR::Block *block; TR::TreeTop *treeTop; TR_ReachingDefinitions::ContainerType *analysisInfo = NULL; @@ -1876,7 +1876,7 @@ void TR_UseDefInfo::buildUseDefs(void *vblockInfo, AuxiliaryData &aux) } int32_t i, ii; - TR_Method *method = comp()->getMethodSymbol()->getMethod(); + TR::Method *method = comp()->getMethodSymbol()->getMethod(); TR_BitVectorIterator bvi(*analysisInfo); while (bvi.hasMoreElements()) { @@ -2272,7 +2272,7 @@ void TR_UseDefInfo::buildUseDefs(TR::Node *node, void *vanalysisInfo, TR_BitVect buildUseDefs(node->getChild(i), analysisInfo, nodesToBeDereferenced, node, aux); } - TR_Method *method = comp()->getMethodSymbol()->getMethod(); + TR::Method *method = comp()->getMethodSymbol()->getMethod(); uint32_t nodeIndex = node->getUseDefIndex(); if (node->getOpCode().hasSymbolReference() && isTrivialUseDefNode(node, aux) ) @@ -2432,7 +2432,7 @@ void TR_UseDefInfo::buildUseDefs(TR::Node *node, void *vanalysisInfo, TR_BitVect } #endif - TR_Method *method = comp()->getMethodSymbol()->getMethod(); + TR::Method *method = comp()->getMethodSymbol()->getMethod(); TR_BitVectorIterator cursor(*defs); while (cursor.hasMoreElements()) diff --git a/compiler/optimizer/VPHandlers.cpp b/compiler/optimizer/VPHandlers.cpp index 50a863a86bc..61d3976e81b 100644 --- a/compiler/optimizer/VPHandlers.cpp +++ b/compiler/optimizer/VPHandlers.cpp @@ -5086,7 +5086,7 @@ static void devirtualizeCall(OMR::ValuePropagation *vp, TR::Node *node) int32_t cpIndex = symRef->getCPIndex(); - TR_Method * originalMethod = methodSymbol->getMethod(); + TR::Method * originalMethod = methodSymbol->getMethod(); len = originalMethod->classNameLength(); s = classNameToSignature(originalMethod->classNameChars(), len, vp->comp()); originalMethodClass = vp->fe()->getClassFromSignature(s, len, owningMethod); @@ -5361,7 +5361,7 @@ TR::Node *constrainCall(OMR::ValuePropagation *vp, TR::Node *node) // some value in parsing the return type of the method // being invoked to obtain better info about byte/bool/char/short // - TR_Method *method = node->getSymbol()->castToMethodSymbol()->getMethod(); + TR::Method *method = node->getSymbol()->castToMethodSymbol()->getMethod(); if (method) { TR::DataType dataType = method->returnType(); @@ -5583,7 +5583,7 @@ TR::Node *constrainCall(OMR::ValuePropagation *vp, TR::Node *node) { //FIXME: add me to the list of calls to be inlined // - TR_Method *method = getHelpersSymRef->getSymbol()->castToMethodSymbol()->getMethod(); + TR::Method *method = getHelpersSymRef->getSymbol()->castToMethodSymbol()->getMethod(); TR::Node *helpersCallNode = TR::Node::createWithSymRef( node, method->directCallOpCode(), 0, getHelpersSymRef); TR::TreeTop *helpersCallTT = TR::TreeTop::create(vp->comp(), TR::Node::create(TR::treetop, 1, helpersCallNode)); vp->_curTree->insertBefore(helpersCallTT); @@ -9788,7 +9788,7 @@ static TR::Node *constrainIfcmpeqne(OMR::ValuePropagation *vp, TR::Node *node, b //The object's class can sometimes be less specific than the class of the call //if we ask for a rammethod in such a class we would trigger an assert ("no ram method in the vft slot") //to avoid this we would to insert another isInstanceOf (objectClass, callClass) - TR_Method* interfaceMethod = interfaceMethodSymbol->getMethod(); + TR::Method *interfaceMethod = interfaceMethodSymbol->getMethod(); //re-using len and sig for getting a class of a call len = interfaceMethod->classNameLength(); sig = classNameToSignature(interfaceMethod->classNameChars(), len, vp->comp()); diff --git a/compiler/ras/Debug.cpp b/compiler/ras/Debug.cpp index 211f8383369..2a5433cf33c 100644 --- a/compiler/ras/Debug.cpp +++ b/compiler/ras/Debug.cpp @@ -960,7 +960,7 @@ TR_Debug::signature(TR::ResolvedMethodSymbol *s) TR_OpaqueClassBlock * TR_Debug::containingClass(TR::SymbolReference *symRef) { - TR_Method *method = symRef->getSymbol()->castToMethodSymbol()->getMethod(); + TR::Method *method = symRef->getSymbol()->castToMethodSymbol()->getMethod(); if (method) { @@ -1856,7 +1856,7 @@ TR_Debug::getParmName(TR::SymbolReference * symRef) const char * TR_Debug::getMethodName(TR::SymbolReference * symRef) { - TR_Method * method = symRef->getSymbol()->castToMethodSymbol()->getMethod(); + TR::Method *method = symRef->getSymbol()->castToMethodSymbol()->getMethod(); if (method==NULL) { diff --git a/compiler/ras/Debug.hpp b/compiler/ras/Debug.hpp index 7b4aa4b8357..00ad76b8a61 100644 --- a/compiler/ras/Debug.hpp +++ b/compiler/ras/Debug.hpp @@ -416,11 +416,11 @@ class TR_Debug virtual int32_t * loadCustomStrategy(char *optFileName); virtual bool methodCanBeCompiled(TR_Memory *mem, TR_ResolvedMethod *, TR_FilterBST * &); virtual bool methodCanBeRelocated(TR_Memory *mem, TR_ResolvedMethod *, TR_FilterBST * &); - virtual bool methodSigCanBeCompiled(const char *, TR_FilterBST * & , TR_Method::Type methodType); + virtual bool methodSigCanBeCompiled(const char *, TR_FilterBST * & , TR::Method::Type methodType); virtual bool methodSigCanBeRelocated(const char *, TR_FilterBST * & ); - virtual bool methodSigCanBeCompiledOrRelocated(const char *, TR_FilterBST * &, bool isRelocation, TR_Method::Type methodType); + virtual bool methodSigCanBeCompiledOrRelocated(const char *, TR_FilterBST * &, bool isRelocation, TR::Method::Type methodType); virtual bool methodCanBeFound(TR_Memory *, TR_ResolvedMethod *, TR::CompilationFilters *, TR_FilterBST * &); - virtual bool methodSigCanBeFound(const char *, TR::CompilationFilters *, TR_FilterBST * &, TR_Method::Type methodType); + virtual bool methodSigCanBeFound(const char *, TR::CompilationFilters *, TR_FilterBST * &, TR::Method::Type methodType); virtual TR::CompilationFilters * getCompilationFilters() { return _compilationFilters; } virtual TR::CompilationFilters * getRelocationFilters() { return _relocationFilters; } virtual void clearFilters(TR::CompilationFilters *); diff --git a/compiler/ras/LimitFile.cpp b/compiler/ras/LimitFile.cpp index 8cea73ae5ee..1e4865712c1 100644 --- a/compiler/ras/LimitFile.cpp +++ b/compiler/ras/LimitFile.cpp @@ -1168,7 +1168,7 @@ TR_Debug::scanFilterName(char *string, TR_FilterBST *filter) bool -TR_Debug::methodSigCanBeCompiled(const char *methodSig, TR_FilterBST * & filter, TR_Method::Type methodType) +TR_Debug::methodSigCanBeCompiled(const char *methodSig, TR_FilterBST * & filter, TR::Method::Type methodType) { return methodSigCanBeCompiledOrRelocated(methodSig, filter, false, methodType); } @@ -1176,17 +1176,17 @@ TR_Debug::methodSigCanBeCompiled(const char *methodSig, TR_FilterBST * & filter, bool TR_Debug::methodSigCanBeRelocated(const char *methodSig, TR_FilterBST * & filter) { - return methodSigCanBeCompiledOrRelocated(methodSig, filter, true, TR_Method::J9); + return methodSigCanBeCompiledOrRelocated(methodSig, filter, true, TR::Method::J9); } bool -TR_Debug::methodSigCanBeFound(const char *methodSig, TR::CompilationFilters * filters, TR_FilterBST * & filter, TR_Method::Type methodType) +TR_Debug::methodSigCanBeFound(const char *methodSig, TR::CompilationFilters * filters, TR_FilterBST * & filter, TR::Method::Type methodType) { const char *methodClass, *methodName, *methodSignature; uint32_t methodClassLen, methodNameLen, methodSignatureLen; methodClass = methodSig; - if (methodType != TR_Method::J9) + if (methodType != TR::Method::J9) { if (methodSig[0] == '/' || methodSig[0] == '.') // omr method pattern { @@ -1302,7 +1302,7 @@ TR_Debug::methodCanBeFound(TR_Memory *trMemory, TR_ResolvedMethod *method, TR::C } bool -TR_Debug::methodSigCanBeCompiledOrRelocated(const char *methodSig, TR_FilterBST * & filter, bool loadLimit, TR_Method::Type methodType) +TR_Debug::methodSigCanBeCompiledOrRelocated(const char *methodSig, TR_FilterBST * & filter, bool loadLimit, TR::Method::Type methodType) { TR::CompilationFilters *compOrReloFilter = NULL; diff --git a/fvtest/compilertest/compile/Method.hpp b/fvtest/compilertest/compile/Method.hpp index 0bf58a2ab5c..cd0dc6b8979 100644 --- a/fvtest/compilertest/compile/Method.hpp +++ b/fvtest/compilertest/compile/Method.hpp @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2016 IBM Corp. and others + * Copyright (c) 2000, 2019 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this @@ -46,12 +46,12 @@ namespace TR { class FrontEnd; } namespace TestCompiler { -class Method : public TR_Method +class Method : public TR::Method { public: TR_ALLOC(TR_Memory::Method); - Method() : TR_Method(TR_Method::Test) {} + Method() : TR::Method(TR::Method::Test) {} // FIXME: need to provide real code for this group virtual uint16_t classNameLength() { return strlen(classNameChars()); } @@ -127,7 +127,7 @@ class ResolvedMethod : public ResolvedMethodBase, public Method computeSignatureChars(); } - virtual TR_Method * convertToMethod() { return this; } + virtual TR::Method * convertToMethod() { return this; } virtual const char * signature(TR_Memory *, TR_AllocationKind); char * localName (uint32_t slot, uint32_t bcIndex, int32_t &nameLength, TR_Memory *trMemory); diff --git a/jitbuilder/compile/Method.hpp b/jitbuilder/compile/Method.hpp index f559bdd22bd..69270ce53be 100644 --- a/jitbuilder/compile/Method.hpp +++ b/jitbuilder/compile/Method.hpp @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2014, 2016 IBM Corp. and others + * Copyright (c) 2014, 2019 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this @@ -47,12 +47,12 @@ namespace TR { class FrontEnd; } namespace JitBuilder { -class Method : public TR_Method +class Method : public TR::Method { public: TR_ALLOC(TR_Memory::Method); - Method() : TR_Method(TR_Method::JitBuilder) {} + Method() : TR::Method(TR::Method::JitBuilder) {} // FIXME: need to provide real code for this group virtual uint16_t classNameLength() { return strlen(classNameChars()); } @@ -129,7 +129,7 @@ class ResolvedMethod : public ResolvedMethodBase, public Method computeSignatureChars(); } - virtual TR_Method * convertToMethod() { return this; } + virtual TR::Method * convertToMethod() { return this; } virtual const char * signature(TR_Memory *, TR_AllocationKind); virtual const char * externalName(TR_Memory *, TR_AllocationKind);