Handle bespokes in Map constructor
Summary:
This constructor sensibly tries to take ownership of any dicts passed to it.
Now, it needs two rounds of escalation: first from an arbitrary array layout to a vanilla array, and second from an arbitrary array type to a dict. These paths are actually orthogonal; I chose to do vanilla first because the vanilla array-to-dict functions are decently-well optimized.
Since we can now create an intermediate array, we have multiple lifetimes to manager here. I used an Array object as a smart pointer for that.
Reviewed By: ricklavoie
Differential Revision:
D21875755
fbshipit-source-id:
15d089cbbbbf484f41d9e8c9a34cb145a0418a80