Allow systemlib to use FThrowOnRefMismatch calling convention.
commitea9ad1da4dc1cb157299137f9b8fcefcd8467965
authorAlexey Toptygin <alexeyt@fb.com>
Mon, 24 Sep 2018 18:22:58 +0000 (24 11:22 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Mon, 24 Sep 2018 18:33:51 +0000 (24 11:33 -0700)
treea0cdd2306fe15b4f74c361142c79327dea0e0446
parent16d4a79b0518d1fd0885d869ea8f604b4e9e6f4c
Allow systemlib to use FThrowOnRefMismatch calling convention.

Summary:
The FIsParamByRef calling convention always results in bytecodes producing refs in one branch. We are trying to forbid bytecodes producing refs in the bodies of __Rx functions, so __Rx functions must use the FThrowOnRefMismatch calling convention. Systemlib was wholesale opted out of the FThrowOnRefMismatch calling convention.
Add call-site ref annotations where they are missing in systemlib, stop opting systemlib out of the FThrowOnRefMismatch calling convention, and convert systemlib files where we declared any functions __Rx from <?php to <?hh if needed.

Reviewed By: markw65

Differential Revision: D10001081

fbshipit-source-id: 62255c0f8449882e3de5090033dc46be6e337711
39 files changed:
hphp/hack/src/hhbc/emit_expression.ml
hphp/runtime/ext/curl/ext_curl.php
hphp/runtime/ext/hh_client/ext_hh_client.php
hphp/runtime/ext/icu/ext_icu_collator.php
hphp/runtime/ext/icu/ext_icu_date_fmt.php
hphp/runtime/ext/icu/ext_icu_misc.php
hphp/runtime/ext/icu/ext_icu_num_fmt.php
hphp/runtime/ext/icu/ext_icu_timezone.php
hphp/runtime/ext/memcache/ext_memcache.php
hphp/runtime/ext/memcached/ext_memcached.php
hphp/runtime/ext/mysql/ext_mysqli.php
hphp/runtime/ext/reflection/ext_reflection-classes.php
hphp/runtime/ext/reflection/ext_reflection_hni.php
hphp/runtime/ext/std/ext_std_classobj.php
hphp/runtime/ext/std/ext_std_network.php
hphp/runtime/ext/std/ext_std_options.php
hphp/runtime/ext/wddx/ext_wddx.php
hphp/system/php/apc/APCIterator.php
hphp/system/php/archive_handler/PharArchiveHandler.ns.php
hphp/system/php/collections/collections.ns.php
hphp/system/php/lang/Error.php
hphp/system/php/lang/ErrorException.php
hphp/system/php/lang/Exception.php
hphp/system/php/lang/rx/AsyncIterator.ns.php
hphp/system/php/lang/rx/Exception.php
hphp/system/php/lang/rx/Iterator.ns.php
hphp/system/php/lang/rx/IteratorAggregate.ns.php
hphp/system/php/lang/rx/KeyedIterable.ns.php
hphp/system/php/phar/Phar.php
hphp/system/php/redis/Redis.php
hphp/system/php/redis/RedisSessionModule.php
hphp/system/php/spl/datastructures/SplFixedArray.php
hphp/system/php/spl/datastructures/SplObjectStorage.php
hphp/system/php/spl/file_handling/SplFileObject.php
hphp/system/php/spl/interfaces/Countable.php
hphp/system/php/spl/iterators/ArrayIterator.php
hphp/system/php/spl/iterators/RecursiveIteratorIterator.php
hphp/system/php/spl/iterators/RegexIterator.php
hphp/system/php/spl/miscellaneous/ArrayObject.php