Make HHBBC validate that all symbols are unique
commit4f76c3b51c619286485b307fdd98cbaa3364c0ba
authorEmil Hesslow <emil@fb.com>
Thu, 11 Jun 2020 16:34:35 +0000 (11 09:34 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 11 Jun 2020 16:38:03 +0000 (11 09:38 -0700)
tree16db2bbf22e978ce3327a2824bc5808cd028f3b0
parentcd091883d92f5018ca2c1a4161ccde484e90f1e5
Make HHBBC validate that all symbols are unique

Summary:
- This makes HHBBC throw an exception if a symbol is defined more than once
- For now I changed a bunch of things from ISStringToMany to ISStringToOneT but nothing that actually calls them takes advantage of it. They still get "all" which now will be one and loops over them.
  - Will cleanup that in future diffs
- A bunch of test had to be updated to have a hhbbc_assert file to make sure we get an error when running hhbbc

Reviewed By: jano

Differential Revision: D21954998

fbshipit-source-id: a8efba86014908e9381fb284bd67f4727a56c5b0
113 files changed:
hphp/compiler/analysis/emitter.cpp
hphp/compiler/compiler.cpp
hphp/hhbbc/index.cpp
hphp/hhbbc/index.h
hphp/hhbbc/main.cpp
hphp/hhbbc/test/type-system.cpp
hphp/test/quick/multidef-rec.php.hhbbc_assert [new file with mode: 0644]
hphp/test/quick/record_decl_error.php.hhbbc_assert [new file with mode: 0644]
hphp/test/quick/redeclared_class_a.php.hhbbc_assert [new file with mode: 0644]
hphp/test/quick/redeclared_class_b.php.hhbbc_assert [new file with mode: 0644]
hphp/test/run.php
hphp/test/server/fastcgi/tests/authDigestTest.php
hphp/test/server/fastcgi/tests/global_variables_server.php
hphp/test/server/fastcgi/tests/headerTest.php
hphp/test/server/fastcgi/tests/test_base.inc
hphp/test/server/http/server_root/global_document_should_not_be_hit.php
hphp/test/server/http/server_root/test_code_coverage.php
hphp/test/server/http/server_root/test_curl_multi_except.php
hphp/test/server/util/server_tests.inc
hphp/test/server/util/server_tests1.inc [deleted file]
hphp/test/slow/apc-locking.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/apc-locking.php.hphp_opts
hphp/test/slow/apc/apc-object.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/autoload/systemlib-duplicate-autoload.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/autoload/systemlib-duplicate-autoload.php.hphp_opts
hphp/test/slow/class_constant/1618.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/class_constant/refcount.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/class_method/740.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/compilation/1239.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/compilation/1240.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/compilation/1311.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/compilation/1318.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/compilation/hack-array-fpass.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/compilation/pseudo-cycles.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/compilation/unknown-reffiness-array-param.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/constructor/1722.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/exceptions/60.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/ext_enum/enum-cache.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/global_func/meth_caller/meth_caller_multiple.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/hhbbc/func_family_009.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/hhbbc/maybe-mixed-tc.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/hhbbc/parent_by_name_non_unique_child.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/hhbbc/parent_by_name_unique_child.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/hhbbc/private_props_006.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/hint/2192.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/inlining/1836.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/inlining/1836.php.hphp_opts
hphp/test/slow/late_static_binding/1880.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/namespace/2227.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/object_magic_method/763.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/object_property/684.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/object_property/685.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/object_property/686.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/prop-type-hints/apc.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/prop-type-hints/default-value-repo.php
hphp/test/slow/prop-type-hints/default-value-repo.php.expect
hphp/test/slow/prop-type-hints/initial-value-bad-dvarray.php
hphp/test/slow/prop-type-hints/initial-value-bad-dvarray.php.expectf
hphp/test/slow/prop-type-hints/initial-value-bad-dvarray.php.expectf-repo [new file with mode: 0644]
hphp/test/slow/prop-type-hints/initial-value-bad-repo.php
hphp/test/slow/prop-type-hints/initial-value-bad-repo.php.expectf
hphp/test/slow/prop-type-hints/initial-value-good.php
hphp/test/slow/prop-type-hints/redefine-bad.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/prop-type-hints/redefine-good.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/record-parent-missing.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/record-parent-redefine.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/record-type-hints/apc.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redeclared_classes/1461.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redeclared_classes/1462.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redeclared_classes/1463.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redeclared_classes/1464.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redeclared_classes/1465.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redeclared_classes/1466.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redeclared_classes/1467.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redeclared_classes/1468.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redeclared_classes/1469.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redeclared_classes/1470.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redeclared_classes/1471.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redeclared_classes/1473.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redeclared_classes/1474.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redeclared_classes/1475.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redeclared_classes/1476.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redeclared_classes/1477.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redeclared_classes/1478.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redeclared_classes/1479.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redeclared_classes/1480.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redeclared_classes/1481.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redeclared_classes/1482.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redeclared_classes/1483.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redeclared_classes/1484.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redeclared_classes/1485.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redeclared_classes/1486.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redeclared_classes/1487.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redeclared_classes/1488.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redeclared_classes/1489.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redefine-builtin-hhas.hhas.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/redefine-builtin.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/reflection/ReflectionTypeAlias11.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/reflection/ReflectionTypeAlias12.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/reflection_classes/1356.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/reflection_classes/1360.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/traits/abstract-final-override.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/traits/duplicate_require2.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/traits/non-unique-base.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/type_assertions/1860.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/type_assertions/1862.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/type_assertions/enum-param-2.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/typedef/typedef_duplicate.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/typedef/typedef_duplicate2.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/typedef/typedef_duplicate_ok.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/volatile/1223.php.hhbbc_assert [new file with mode: 0644]
hphp/test/slow/yield/2182.php.hhbbc_assert [new file with mode: 0644]
hphp/test/zend/good/Zend/tests/constants_004.php.hhbbc_assert [new file with mode: 0644]