From 3b459d720ce0eb232f8be03b236d90f75fc57213 Mon Sep 17 00:00:00 2001 From: Spencer Comin Date: Thu, 31 Oct 2024 11:09:07 -0400 Subject: [PATCH] Add unsafe symrefs arrays for all access modes This change adds arrays for opaque and acquire/release unsafe symrefs to the symbol reference table. Instead of having four separate fields, the fields are combined into an array that can be indexed by the OMR::Symbol::AccessMode enum. Signed-off-by: Spencer Comin --- compiler/compile/OMRSymbolReferenceTable.cpp | 2 -- compiler/compile/OMRSymbolReferenceTable.hpp | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/compiler/compile/OMRSymbolReferenceTable.cpp b/compiler/compile/OMRSymbolReferenceTable.cpp index 050aeefaf3e..95330fdac67 100644 --- a/compiler/compile/OMRSymbolReferenceTable.cpp +++ b/compiler/compile/OMRSymbolReferenceTable.cpp @@ -102,8 +102,6 @@ OMR::SymbolReferenceTable::SymbolReferenceTable(size_t sizeHint, TR::Compilation _numInternalPointers(0), _ObjectNewInstanceImplSymRef(0), _knownObjectSymrefsByObjectIndex(comp->trMemory()), - _unsafeSymRefs(0), - _unsafeVolatileSymRefs(0), _availableAutos(comp->trMemory()), _vtableEntrySymbolRefs(comp->trMemory()), _classLoaderSymbolRefs(comp->trMemory()), diff --git a/compiler/compile/OMRSymbolReferenceTable.hpp b/compiler/compile/OMRSymbolReferenceTable.hpp index 48f551a1ef7..707edca09c3 100644 --- a/compiler/compile/OMRSymbolReferenceTable.hpp +++ b/compiler/compile/OMRSymbolReferenceTable.hpp @@ -941,8 +941,7 @@ class SymbolReferenceTable TR_Array _knownObjectSymrefsByObjectIndex; - TR_Array * _unsafeSymRefs; - TR_Array * _unsafeVolatileSymRefs; + TR_Array * _unsafeSymRefs[TR::Symbol::LastMemoryOrdering+1] = {}; List _availableAutos; List _vtableEntrySymbolRefs;