@@ -999,8 +999,10 @@ void IsolationHistory::pushRemoveLastElementFromRegion(Element element) {
999999
10001000void IsolationHistory::pushRemoveElementFromRegion (
10011001 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});
10041006}
10051007
10061008void IsolationHistory::pushMergeElementRegions (Element elementToMergeInto,
@@ -1027,8 +1029,9 @@ void IsolationHistory::pushCFGHistoryJoin(Node *otherNode) {
10271029
10281030 // Otherwise, create a node that joins our true head and other node as a side
10291031 // 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));
10321035}
10331036
10341037IsolationHistory::Node *IsolationHistory::pop () {
0 commit comments