Skip to content

Commit

Permalink
DNodeGenerator
Browse files Browse the repository at this point in the history
- Calling `poolClassStatic(Clazz clazz)` now calls `IPoolManager`'s `poolClassStatic(Clazz)`
  • Loading branch information
deavmi committed Dec 8, 2023
1 parent 0b273ca commit 8d94e5e
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions source/tlang/compiler/typecheck/dependency/core.d
Original file line number Diff line number Diff line change
Expand Up @@ -1596,25 +1596,7 @@ public class DNodeGenerator
// assert(clazz.getModifierType() == InitScope.STATIC);
}


foreach(DNode dnode; nodePool)
{
Statement entity = dnode.getEntity();
if(entity == clazz && cast(ClassStaticNode)dnode)
{
return cast(ClassStaticNode)dnode;
}
}

/**
* If no DNode is found that is associated with
* the provided Entity then create a new one and
* pool it
*/
ClassStaticNode newDNode = new ClassStaticNode(clazz);
nodePool ~= newDNode;

return newDNode;
return this.poolManager.poolClassStatic(clazz);
}

/**
Expand Down

0 comments on commit 8d94e5e

Please sign in to comment.