@@ -999,8 +999,10 @@ void IsolationHistory::pushRemoveLastElementFromRegion(Element element) {
999
999
1000
1000
void IsolationHistory::pushRemoveElementFromRegion (
1001
1001
Element otherElementInOldRegion, Element element) {
1002
- head = new (factory->allocator ) Node (Node::RemoveElementFromRegion, head,
1003
- element, {otherElementInOldRegion});
1002
+ unsigned size = Node::totalSizeToAlloc<Element>(1 );
1003
+ void *mem = factory->allocator .Allocate (size, alignof (Node));
1004
+ head = new (mem) Node (Node::RemoveElementFromRegion, head, element,
1005
+ {otherElementInOldRegion});
1004
1006
}
1005
1007
1006
1008
void IsolationHistory::pushMergeElementRegions (Element elementToMergeInto,
@@ -1027,8 +1029,9 @@ void IsolationHistory::pushCFGHistoryJoin(Node *otherNode) {
1027
1029
1028
1030
// Otherwise, create a node that joins our true head and other node as a side
1029
1031
// path we can follow.
1030
- head = new (factory->allocator )
1031
- Node (Node (Node::CFGHistoryJoin, head, otherNode));
1032
+ unsigned size = Node::totalSizeToAlloc<Element>(0 );
1033
+ void *mem = factory->allocator .Allocate (size, alignof (Node));
1034
+ head = new (mem) Node (Node (Node::CFGHistoryJoin, head, otherNode));
1032
1035
}
1033
1036
1034
1037
IsolationHistory::Node *IsolationHistory::pop () {
0 commit comments