Encapsulate return types of NvGet*() and GetValueRef()
Summary:
This divorces the array vtable API from the actual data layout used
by the various array implementations. In particular, it no longer
requires them to lay out TypedValues in memory (or rather... we're
pushing that dependency further out, with plans to eliminate it
completely).
We define a member_rval type analogous to the member_lval type used by
the LvalAt*() functions, which has const/read-only semantics.
member_rval::ptr_u replaces the return types for the array vtable
NvGet*() and GetValueRef() functions, while ArrayData wraps it trivially
as a member_rval. We also add Rval*() functions to mirror the Lval*()
functions on each array type, and we rename ArrayData::nvGet() and
ArrayData::getValueRef() to ArrayData::rval*() (with ArrayData::at() as
a helper for getting a TypedValue by value).
Reviewed By: jano
Differential Revision:
D4890419
fbshipit-source-id:
57c0fda93ea28eac6e02cadbb178f83fa33bd4b2