Remove bogus assert in bytecode emitter

I hit an array on the debug build when I tried to run the following
program:

  <?php
  function f() {
    for (;;) {}
  }
  f();

This diff removes the offending assert since it is technically possible to
have m_maxStackDepth be equal to 0.
Esse commit está contido em:
Drew Paroski
2013-06-26 00:56:36 -07:00
commit de Sara Golemon
commit 28968640bd
3 arquivos alterados com 6 adições e 1 exclusões
-1
Ver Arquivo
@@ -964,7 +964,6 @@ Func* FuncEmitter::create(Unit& unit, PreClass* preClass /* = NULL */) const {
f->shared()->m_numLocals = m_numLocals;
f->shared()->m_numIterators = m_numIterators;
f->m_maxStackCells = m_maxStackCells;
assert(m_maxStackCells > 0 && "You probably didn't set m_maxStackCells");
f->shared()->m_staticVars = m_staticVars;
f->shared()->m_ehtab = m_ehtab;
f->shared()->m_fpitab = m_fpitab;
+5
Ver Arquivo
@@ -0,0 +1,5 @@
<?php
function f() {
for (;;) {}
}
echo "Done\n";
@@ -0,0 +1 @@
Done