From 6c372db64cb6e7459a579f4e482747c1bbfdedaf Mon Sep 17 00:00:00 2001 From: Annabelle Huo Date: Wed, 25 May 2022 10:41:48 -0400 Subject: [PATCH] Add defaultValueSymbol for value type class This symbol is used to access the default instance associated with a class, if any exists. Signed-off-by: Annabelle Huo --- compiler/compile/OMRNonHelperSymbols.enum | 7 ++++++- compiler/compile/OMRSymbolReferenceTable.hpp | 7 ++++++- compiler/ras/Debug.cpp | 5 ++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/compiler/compile/OMRNonHelperSymbols.enum b/compiler/compile/OMRNonHelperSymbols.enum index 5d244e9cb81..0d7fea999bb 100644 --- a/compiler/compile/OMRNonHelperSymbols.enum +++ b/compiler/compile/OMRNonHelperSymbols.enum @@ -399,7 +399,12 @@ */ J9JNIMethodIDvTableIndexFieldSymbol, - OMRlastPrintableCommonNonhelperSymbol = J9JNIMethodIDvTableIndexFieldSymbol, + /** \brief + * This symbol is used to access the default instance associated with a class, if any exists + */ + defaultValueSymbol, + + OMRlastPrintableCommonNonhelperSymbol = defaultValueSymbol, firstPerCodeCacheHelperSymbol, lastPerCodeCacheHelperSymbol = firstPerCodeCacheHelperSymbol + TR_numCCPreLoadedCode - 1, diff --git a/compiler/compile/OMRSymbolReferenceTable.hpp b/compiler/compile/OMRSymbolReferenceTable.hpp index e492b99fad7..72d7a532b42 100644 --- a/compiler/compile/OMRSymbolReferenceTable.hpp +++ b/compiler/compile/OMRSymbolReferenceTable.hpp @@ -476,7 +476,12 @@ class SymbolReferenceTable */ J9JNIMethodIDvTableIndexFieldSymbol, - OMRlastPrintableCommonNonhelperSymbol = J9JNIMethodIDvTableIndexFieldSymbol, + /** \brief + * This symbol is used to access the default instance associated with a class, if any exists + */ + defaultValueSymbol, + + OMRlastPrintableCommonNonhelperSymbol = defaultValueSymbol, firstPerCodeCacheHelperSymbol, lastPerCodeCacheHelperSymbol = firstPerCodeCacheHelperSymbol + TR_numCCPreLoadedCode - 1, diff --git a/compiler/ras/Debug.cpp b/compiler/ras/Debug.cpp index 86149e6c1a4..b92c6ee1619 100644 --- a/compiler/ras/Debug.cpp +++ b/compiler/ras/Debug.cpp @@ -1626,6 +1626,8 @@ TR_Debug::getName(TR::SymbolReference * symRef) return ""; case TR::SymbolReferenceTable::J9JNIMethodIDvTableIndexFieldSymbol: return ""; + case TR::SymbolReferenceTable::defaultValueSymbol: + return ""; } } @@ -2090,7 +2092,8 @@ static const char *commonNonhelperSymbolNames[] = "", "", "", - "" + "", + "" }; const char *