Add SetWithRef{Int,Str} to array vtable
commit9c4f53f27efe44e11d7c60927de5ffb60d053a61
authorMax Wang <mwang@fb.com>
Wed, 16 Aug 2017 21:14:44 +0000 (16 14:14 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Wed, 16 Aug 2017 21:17:26 +0000 (16 14:17 -0700)
treeb90e80bc2bfc8730a0ae50520774473303d2ed13
parent20bdad3d87517bc7c1fb10bceb1e10e03924dab2
Add SetWithRef{Int,Str} to array vtable

Summary:
Implement them directly instead of via Lval{Int,Str}.  This allows us to
add missing index warnings to Lval*() while avoiding spew from a valid
use case.

We were also using Lval*() unconditionally when sometimes we were
supposed to be using Lval*Ref().  Based on a quick audit of the
callsites, this doesn't appear to have caused us to miss any Hack
array compat notices, or Hack array exceptions, in practice.

Reviewed By: alexeyt

Differential Revision: D5587259

fbshipit-source-id: 8365c76c8663ef183a7852cb4389791a792f0f31
25 files changed:
hphp/runtime/base/apc-local-array.cpp
hphp/runtime/base/apc-local-array.h
hphp/runtime/base/array-common.h
hphp/runtime/base/array-data-defs.h
hphp/runtime/base/array-data.cpp
hphp/runtime/base/array-data.h
hphp/runtime/base/array-helpers.h
hphp/runtime/base/array-init.h
hphp/runtime/base/empty-array.cpp
hphp/runtime/base/empty-array.h
hphp/runtime/base/mixed-array-defs.h
hphp/runtime/base/mixed-array.cpp
hphp/runtime/base/mixed-array.h
hphp/runtime/base/object-data.h
hphp/runtime/base/packed-array.cpp
hphp/runtime/base/packed-array.h
hphp/runtime/base/proxy-array.cpp
hphp/runtime/base/proxy-array.h
hphp/runtime/base/set-array.cpp
hphp/runtime/base/set-array.h
hphp/runtime/base/tv-mutate.h
hphp/runtime/base/type-array.cpp
hphp/runtime/base/type-array.h
hphp/runtime/vm/globals-array.cpp
hphp/runtime/vm/globals-array.h