Implement computeSupertypeLookupTable.

This method will be useful for AST visitors that need to decide as fast as possible what visitor method to call based on the type of a node.