mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-24 16:20:49 +01:00
StaticAllocationFailureNodes are not stored in the pool
This commit is contained in:
@@ -2,12 +2,11 @@
|
||||
#include "allocation_failed_expression_node.h"
|
||||
|
||||
template<>
|
||||
TreeNode * ExpressionRef::staticFailedAllocationStaticNode() {
|
||||
static AllocationFailedExpressionRef FailureRef;
|
||||
return FailureRef.node();
|
||||
}
|
||||
|
||||
template<>
|
||||
ExpressionReference<ExpressionNode> ExpressionRef::staticFailedAllocationStaticRef() {
|
||||
return ExpressionReference<ExpressionNode>(staticFailedAllocationStaticNode());
|
||||
TreeNode * ExpressionRef::FailedAllocationStaticNode() {
|
||||
static AllocationFailedExpressionNode FailureNode;
|
||||
if (FailureNode.identifier() >= -1) {
|
||||
int newIdentifier = TreePool::sharedPool()->registerStaticNode(&FailureNode);
|
||||
FailureNode.rename(newIdentifier);
|
||||
}
|
||||
return &FailureNode;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user