Resize the stack if necessary when pushing.

This fixes a bunch of valgrind warnings and crashes.
This commit is contained in:
Darryl Pogue
2011-09-18 21:02:10 -07:00
parent b0769cf432
commit ed1fefc205

View File

@@ -27,6 +27,9 @@ public:
}
void push(PycRef<ASTNode> node) {
if (m_size == m_ptr + 1) {
grow(1);
}
m_stack[++m_ptr] = node;
}