An initial implementation of linearization
Summary:
This diff introduces a new field "dc_linearization" to the decl_defs. We won't start storing this in the decl_heap in prod until we use it for a purpose, but the first step is creating an implementation of linearization that I can test.
For each class, we store a list of strings representing the classes by method resolution order. For now this list only contains direct extends ancestors, but the next diffs add more and more to linearization until it's full featured.
We calculate the linearization of a class from the linearization of its parent classes, (and later, traits, require extends, and anything else that a class can inherit from).
After implementing an initial version of this, my goal will be to use it to reimplement decl_inherit.ml, as well as introduce new checks in a step called linearization analysis.
Reviewed By: kmeht
Differential Revision:
D9691089
fbshipit-source-id:
75b02ece31e46212445472598619c468373e21a3