Prevent more optimizations in repo mode

"$unused_local = UndefinedConstant;" was being optimized away, so
we didnt get a warning for the constant. return it instead.

  $unused_local = new Object;
  return;

became

  new Object;
  return;

This affected the (unspecified) order of destruction of $this
vs $unused_local. Since we're specifically trying to test that
we dont crash when a local generates a backtrace after $this
has been destroyed, force the variable to be used.
Esse commit está contido em:
mwilliams
2013-04-18 17:27:21 -07:00
commit de Sara Golemon
commit 6f223125a5
3 arquivos alterados com 4 adições e 3 exclusões
+1 -1
Ver Arquivo
@@ -29,6 +29,6 @@ function main() {
foo();
set_error_handler('error_handler');
$x = FakeConstant;
return FakeConstant;
}
main();
+1
Ver Arquivo
@@ -5,6 +5,7 @@ function id($x) { return $x; }
class Foo {
public function hi() {
$bad = new Tracer();
return $bad !== null;
}
}
+2 -2
Ver Arquivo
@@ -23,7 +23,7 @@ array(3) {
["file"]=>
string(%d) "%s"
["line"]=>
int(18)
int(19)
["function"]=>
string(2) "hi"
["class"]=>
@@ -39,7 +39,7 @@ array(3) {
["file"]=>
string(%d) "%s"
["line"]=>
int(20)
int(21)
["function"]=>
string(4) "main"
["args"]=>