Log and account for ctor ops
Summary:
For a non-static array, a constructor op is logically a sequence of sets or appends. We log these individual operations at the point we create a LoggingArray, using a new pair of ConstructStr / ConstructInt "pseudo-ops" to be distinct from SetInt / SetStr / Append ops that happen post-construction.
The new logging handles constructors in most cases naturally. For struct-like arrays, we'll include the static string keys in the ConstructStr ops. For sufficiently-small tuple-like vecs, the ConstructInt will include some information about the int key plus the value type at that index. For larger, non-tuple vecs, ConstructInt will drop the constant int and only log the value type.
We also pull the arrayOpIsRead helper into the ARRAY_OPS macro. A few ops, like release and ToVArray, change from writes to reads; we're using "write" as a short-hand for "operation that may cause a layout change", and these ops don't do that.
Differential Revision:
D23406011
fbshipit-source-id:
195082f685ba287b6897e0dd0efa452e539eb70f