Make req-containers more type-scanner friendly
commit65af4d999bf3dc570446c44b966bdc0e7f3138dc
authorRick Lavoie <rlavoie@fb.com>
Wed, 2 Mar 2016 16:08:27 +0000 (2 08:08 -0800)
committerHhvm Bot <hhvm-bot-bot@fb.com>
Wed, 2 Mar 2016 16:30:44 +0000 (2 08:30 -0800)
tree8c1b250e3a343ae7775de8c29c58be0f0c38fb80
parent668231ec072ce386847776b02c10f73c25f9a568
Make req-containers more type-scanner friendly

Summary:Currently (almost) all the containers inside req-containers are just simple
template typedefs on the standard containers. This causes a problem for the
type-scanner because such typedefs aren't generally present in the debug
information, thus it only sees the standard types. This makes it difficult for
the type-scanner to treat the req-containers differently, and it is not possible
to add custom annotations (which must be part of the definition).

So, instead of using template typedefs, derive from the standard
containers. This is generally considered undesirable, but it is safe here as we
don't add any new fields nor change any functionality in terms of the
interface. One issue with this approach is that an instance of a req-container
will still implicitly convert to its equivalent standard container, but the
current approach shares that problem.

Also add req equivalents for TinyVector and FixedVector, as well as
std::forward_list. Use the new req equivalents where appropriate.

Reviewed By: markw65, swtaarrs

Differential Revision: D2994493

fb-gh-sync-id: 8f33d6ddf7d452233b8bc946b54727467536934e
shipit-source-id: 8f33d6ddf7d452233b8bc946b54727467536934e
hphp/runtime/base/execution-context.h
hphp/runtime/base/mixed-array.cpp
hphp/runtime/base/req-containers.h
hphp/runtime/base/zend-pack.cpp
hphp/runtime/ext/sqlite3/ext_sqlite3.h