This change effectively just moves the frame structure from the stack to the heap, while not really changing how the buffer within the frame is handled so I think it's safe. However the semantics seem rather complicated...