Add sub-controls for Hack array compat runtime checks
commite49129e2887dba6d2874b3f91b10e2b299d51c26
authorMax Wang <mwang@fb.com>
Mon, 26 Feb 2018 07:52:38 +0000 (25 23:52 -0800)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Mon, 26 Feb 2018 08:02:33 +0000 (26 00:02 -0800)
treeea4ccc330e077dfe3ba0abcad928673f016baa9a
parentc687c3f92924862719b2941c40a8ebdb39d6aa95
Add sub-controls for Hack array compat runtime checks

Summary:
Split the runtime checks controlled by HackArrCompatNotices five ways:
- intish string casts
- refs in arrays
- falsey promotion
- comparisons
- everything else

These Check* options still require HackArrCompatNotices to be on, since
optimizations which hide notices are still controlled by the toplevel
HackArrCompatNotices option.

In hphpc and hhbbc, we turn on all the runtime check options if
HackArrCompatNotices is on, in order to avoid constant-folding any
functions where we might want to make runtime checks.

Reviewed By: ricklavoie

Differential Revision: D6902410

fbshipit-source-id: 62e08beb100967251163474a071960f2e01ad921
43 files changed:
hphp/compiler/option.cpp
hphp/hhbbc/main.cpp
hphp/runtime/base/array-data-inl.h
hphp/runtime/base/array-data.cpp
hphp/runtime/base/array-data.h
hphp/runtime/base/array-iterator.cpp
hphp/runtime/base/comparisons.h
hphp/runtime/base/empty-array.cpp
hphp/runtime/base/mixed-array-defs.h
hphp/runtime/base/mixed-array.cpp
hphp/runtime/base/packed-array.cpp
hphp/runtime/base/runtime-error.h
hphp/runtime/base/runtime-option.h
hphp/runtime/base/tv-arith.cpp
hphp/runtime/base/tv-comparisons.cpp
hphp/runtime/base/tv-conversions-inl.h
hphp/runtime/base/type-array.cpp
hphp/runtime/base/type-variant.h
hphp/runtime/base/variable-unserializer.cpp
hphp/runtime/ext/array/ext_array.cpp
hphp/runtime/vm/bytecode.cpp
hphp/runtime/vm/jit/array-offset-profile.cpp
hphp/runtime/vm/jit/code-gen-internal.cpp
hphp/runtime/vm/jit/irgen-arith.cpp
hphp/runtime/vm/jit/irgen-builtin.cpp
hphp/runtime/vm/jit/irlower-array.cpp
hphp/runtime/vm/jit/irlower-minstr.cpp
hphp/runtime/vm/jit/simplify.cpp
hphp/runtime/vm/jit/translator-runtime.cpp
hphp/runtime/vm/member-operations.h
hphp/test/slow/hack_arr_compat/add.php.opts
hphp/test/slow/hack_arr_compat/compare.php.opts
hphp/test/slow/hack_arr_compat/cuf-safe-array.php.opts
hphp/test/slow/hack_arr_compat/dyn-props.php.opts
hphp/test/slow/hack_arr_compat/implicit-key.php.expectf
hphp/test/slow/hack_arr_compat/implicit-key.php.opts
hphp/test/slow/hack_arr_compat/intlike.php.opts
hphp/test/slow/hack_arr_compat/null_index.php.opts
hphp/test/slow/hack_arr_compat/promotion.php.opts
hphp/test/slow/hack_arr_compat/refs.php.opts
hphp/test/slow/hack_arr_compat/scalars.php.opts
hphp/test/slow/hack_arr_compat/setop.php.opts
hphp/test/slow/hack_arr_compat/variadic-by-ref.php.opts