lowptr optimization for ClsMethData
commitfe84f950c137ed23de0b7242d5859505dd260f69
authorYu-Jung Lo <ylo@fb.com>
Mon, 6 May 2019 06:08:51 +0000 (5 23:08 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Mon, 6 May 2019 06:12:09 +0000 (5 23:12 -0700)
treea39b728a89f2103ce04ef40d59f05af63bd16a33
parent169203a6a2b5445654e32bc3a73c8634692174e2
lowptr optimization for ClsMethData

Summary:
ClsMethData only holds 2 pointers. At lowptr mode, the size of ClsMethData is 8 byte which can fit to Value union.
Hence, at lowptr mode, ClsMethData can be uncounted.

* We also need to specialize `LowPtrImpl<T, S>` for `RawStorage<low_storage_t>` type to make sure this class is trivially copyable. (This is used by LowPtr<Class> m_cls and LowPtr<Func> m_func fields in ClsMethData)

Reviewed By: markw65

Differential Revision: D14176650

fbshipit-source-id: 4fbe82f543536d8254dc425b139b7a52d1a0b136
19 files changed:
hphp/hhbbc/type-system.h
hphp/runtime/base/datatype.h
hphp/runtime/base/tv-conversions-inl.h
hphp/runtime/base/tv-conversions.cpp
hphp/runtime/base/type-variant.cpp
hphp/runtime/base/type-variant.h
hphp/runtime/ext/objprof/ext_objprof.cpp
hphp/runtime/vm/class-meth-data-ref.cpp
hphp/runtime/vm/class-meth-data-ref.h
hphp/runtime/vm/class-meth-data.cpp
hphp/runtime/vm/class-meth-data.h
hphp/runtime/vm/jit/irlower-class-func.cpp
hphp/runtime/vm/jit/irlower-refcount.cpp
hphp/runtime/vm/jit/prof-data-serialize.cpp
hphp/runtime/vm/jit/ssa-tmp.cpp
hphp/runtime/vm/jit/type.cpp
hphp/runtime/vm/jit/type.h
hphp/test/slow/global_func/class_meth/dv_arr/mutate.php.expectf
hphp/test/slow/global_func/class_meth/dv_arr_hack_arr/mutate.php.expectf