Move all arrprov instrumentation into {Packed,Mixed}Array
commit033da09347c8c15a901edfaf5d8fa9e731b2585b
authorMax Wang <mwang@fb.com>
Fri, 30 Aug 2019 06:07:31 +0000 (29 23:07 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Fri, 30 Aug 2019 06:11:51 +0000 (29 23:11 -0700)
treeaaf889fc1d1da06d082afb156ae49a6f6dbdad9e
parentc125d069b355837cb13effe6dda2ecfdb7744c2a
Move all arrprov instrumentation into {Packed,Mixed}Array

Summary:
This reduces the surface area of instrumentation and gives us a lot more
coverage by default, especially if we enable VM reg sync for native
calls by default.  It replaces all the other runtime provenance tagging
callsites.

The only cost is that we incur some non-taken branches and code in paths
which before we could avoid by handling the checks in the JIT... but if
we want correctness by default for, e.g., all builtins, including those
which don't use the preferred array interfaces (e.g., ArrayInit), we
can't really avoid that anyway.

Reviewed By: jjgriego

Differential Revision: D17090670

fbshipit-source-id: eb5b521335e061bdf89ab5563501742d6dd2f33d
15 files changed:
hphp/runtime/base/array-common.cpp
hphp/runtime/base/array-data.cpp
hphp/runtime/base/array-data.h
hphp/runtime/base/array-init.h
hphp/runtime/base/array-provenance.h
hphp/runtime/base/mixed-array.cpp
hphp/runtime/base/packed-array.cpp
hphp/runtime/base/tv-conversions.cpp
hphp/runtime/vm/bytecode.cpp
hphp/runtime/vm/jit/irlower-array.cpp
hphp/runtime/vm/jit/minstr-helpers.h
hphp/runtime/vm/jit/translator-runtime.cpp
hphp/runtime/vm/member-operations.h
hphp/test/slow/array_provenance/array-provenance.php
hphp/test/slow/array_provenance/array-provenance.php.expectf