A bit of JIT type system code motionnightly-2020.02.06
commit051d9a43d05722f77e2cee19e35c1cc05055a706
authorShaunak Kishore <[email protected]>
Wed, 5 Feb 2020 23:45:59 +0000 (5 15:45 -0800)
committerFacebook Github Bot <[email protected]>
Wed, 5 Feb 2020 23:51:20 +0000 (5 15:51 -0800)
tree16db420f5d5f0ac8744090e4038881b4b94ac487
parent1996f9c70b3cec57a26b12e370506b170bef6e50
A bit of JIT type system code motion

Summary:
This diff cleans up a few things in jit::ArraySpec and jit::Type:
- For constant dicts, we were constructing ArraySpec(DictKind), which is not useful. Added logic in Type::arrSpec to avoid it, and a checkInvariants method to ensure that we don't do it accidentally. checkInvariants() obviates other checks on the ArrayKind constructor.
- I got bitten by static initialization order issues with ArraySpec::Top and ArraySpec::Bottom. Changed these to be constexpr methods.
- jit/type.cpp was redefining types instead of using the TypeNames namespace we created for this purpose.

Reviewed By: jjgriego

Differential Revision: D19745267

fbshipit-source-id: d649eb86e98277c80dc5dc18e2258dbb59b9fa7c
hphp/runtime/test/type.cpp
hphp/runtime/vm/jit/check.cpp
hphp/runtime/vm/jit/type-inl.h
hphp/runtime/vm/jit/type-specialization-inl.h
hphp/runtime/vm/jit/type-specialization.cpp
hphp/runtime/vm/jit/type-specialization.h
hphp/runtime/vm/jit/type.cpp
hphp/runtime/vm/jit/type.h