Teach hhbbc to optimize away LockObj.
commitf1e648d3182f51ff7753300330dee49af98d3af7
authorAlexey Toptygin <alexeyt@fb.com>
Fri, 28 Jun 2019 03:24:26 +0000 (27 20:24 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Fri, 28 Jun 2019 03:30:18 +0000 (27 20:30 -0700)
tree0fb34279d0bab64b2794f9dbcc00be13b360d407
parent3bbe8acfdec9367fd187549047d14cd4f5b92804
Teach hhbbc to optimize away LockObj.

Summary: Have hhbbc track whether classes or their subclasses may have const props, and use that information to remove LockObj bytecodes when they're definitely not needed.

Reviewed By: markw65

Differential Revision: D15939211

fbshipit-source-id: a58bf303c1b4acfda1c70d0d408cdcf43ca3185c
23 files changed:
hphp/hhbbc/index.cpp
hphp/hhbbc/index.h
hphp/hhbbc/interp.cpp
hphp/test/slow/object/const/copied-from-non-flattened-trait.1.inc [new file with mode: 0644]
hphp/test/slow/object/const/copied-from-non-flattened-trait.2.inc [new file with mode: 0644]
hphp/test/slow/object/const/copied-from-non-flattened-trait.php [new file with mode: 0644]
hphp/test/slow/object/const/copied-from-non-flattened-trait.php.expect [new file with mode: 0644]
hphp/test/slow/object/const/copied-from-trait.php [new file with mode: 0644]
hphp/test/slow/object/const/copied-from-trait.php.expect [new file with mode: 0644]
hphp/test/slow/object/const/dynamic-construct.php [new file with mode: 0644]
hphp/test/slow/object/const/dynamic-construct.php.expect [new file with mode: 0644]
hphp/test/slow/object/const/inherit-from-grandparent.php [new file with mode: 0644]
hphp/test/slow/object/const/inherit-from-grandparent.php.expect [new file with mode: 0644]
hphp/test/slow/object/const/inherit-from-individual-prop.php [new file with mode: 0644]
hphp/test/slow/object/const/inherit-from-individual-prop.php.expect [new file with mode: 0644]
hphp/test/slow/object/const/inherit-from-whole-class.php [new file with mode: 0644]
hphp/test/slow/object/const/inherit-from-whole-class.php.expect [new file with mode: 0644]
hphp/test/slow/object/const/inherit-individual-prop.php [new file with mode: 0644]
hphp/test/slow/object/const/inherit-individual-prop.php.expect [new file with mode: 0644]
hphp/test/slow/object/const/inherit-whole-class.php [new file with mode: 0644]
hphp/test/slow/object/const/inherit-whole-class.php.expect [new file with mode: 0644]
hphp/test/slow/object/const/new-static.php [new file with mode: 0644]
hphp/test/slow/object/const/new-static.php.expect [new file with mode: 0644]