Skip to content

Commit

Permalink
Remove unused allocator parameter from NodePool constructor
Browse files Browse the repository at this point in the history
Signed-off-by: Daryl Maier <maier@ca.ibm.com>
  • Loading branch information
0xdaryl committed Mar 2, 2021
1 parent 65bff8f commit 396702a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion compiler/compile/OMRCompilation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ OMR::Compilation::Compilation(
_metadataAssumptionList = NULL;
#endif
_symRefTab = new (_trMemory->trHeapMemory()) TR::SymbolReferenceTable(_method->maxBytecodeIndex(), self());
_compilationNodes = new (_trMemory->trHeapMemory()) TR::NodePool(self(), self()->allocator());
_compilationNodes = new (_trMemory->trHeapMemory()) TR::NodePool(self());

#ifdef J9_PROJECT_SPECIFIC
// The following must stay before the first assumption gets created which could happen
Expand Down
6 changes: 3 additions & 3 deletions compiler/il/NodePool.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2019 IBM Corp. and others
* Copyright (c) 2000, 2021 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
Expand Down Expand Up @@ -30,7 +30,7 @@

#define OPT_DETAILS_NODEPOOL "O^O NODEPOOL :"

TR::NodePool::NodePool(TR::Compilation * comp, const TR::Allocator &allocator) :
TR::NodePool::NodePool(TR::Compilation * comp) :
_comp(comp),
_disableGC(true),
_globalIndex(0),
Expand All @@ -47,7 +47,7 @@ TR::NodePool::cleanUp()
TR::Node *
TR::NodePool::allocate()
{
TR::Node *newNode = static_cast<TR::Node*>(_nodeRegion.allocate(sizeof(TR::Node)));//_pool.ElementAt(poolIndex);
TR::Node *newNode = static_cast<TR::Node*>(_nodeRegion.allocate(sizeof(TR::Node)));
memset(newNode, 0, sizeof(TR::Node));
newNode->_globalIndex = ++_globalIndex;
TR_ASSERT(_globalIndex < MAX_NODE_COUNT, "Reached TR::Node allocation limit");
Expand Down
4 changes: 2 additions & 2 deletions compiler/il/NodePool.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2019 IBM Corp. and others
* Copyright (c) 2000, 2021 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
Expand Down Expand Up @@ -37,7 +37,7 @@ class NodePool
public:

TR_ALLOC(TR_Memory::Compilation)
NodePool(TR::Compilation * comp, const TR::Allocator &allocator);
NodePool(TR::Compilation * comp);

TR::Node * allocate();
bool deallocate(TR::Node * node);
Expand Down

0 comments on commit 396702a

Please sign in to comment.