StaticAllocationFailureNodes are not stored in the pool

This commit is contained in:
Léa Saviot
2018-06-29 15:30:40 +02:00
parent 8117e73561
commit a4471e1570
13 changed files with 68 additions and 32 deletions

View File

@@ -5,9 +5,13 @@
#include "char_layout_node.h"
template<>
TreeNode * LayoutRef::staticFailedAllocationStaticNode() {
static AllocationFailedLayoutRef FailureRef;
return FailureRef.node();
TreeNode * LayoutRef::FailedAllocationStaticNode() {
static AllocationFailedLayoutNode FailureNode;
if (FailureNode.identifier() >= -1) {
int newIdentifier = TreePool::sharedPool()->registerStaticNode(&FailureNode);
FailureNode.rename(newIdentifier);
}
return &FailureNode;
}
template <typename T>