11. A system implemented in an optimizing compiler, the system comprising: a compiler component, implemented at least in part on at least one processing unit, that generates a typed medium-level intermediate representation from a source code representation of a computer program, in which the source code representation comprises definitions of one or more classes; and wherein at least some of the classes correspond to objects of the typed medium-level intermediate representation that are translated by the compiler component for: a) virtual method invocation using an exact class name to represent objects of that class but not those of subclasses and a combined class type as an encoding of an existential type to represent objects of the class and the subclass of the class, wherein the combined class type is a combination of a name-based class name and corresponding structure-based record type; b) interface method invocation of an interface method on an object by opening the object to obtain a method table for the interface, calling the interface method on the object when open, and testing whether an object can be cast to a class, to an interface, to a class vector; c) object type casting, including testing whether an object can be cast to a class, whether an object can be cast to an interface, or whether an object can be cast to a class vector, or any combination thereof; and d) vector store check, including fetching a tag of an element type of an object and testing whether the element type of the object is a subclass of the element type of the vector type.
11. A system implemented in an optimizing compiler, the system comprising: a compiler component, implemented at least in part on at least one processing unit, that generates a typed medium-level intermediate representation from a source code representation of a computer program, in which the source code representation comprises definitions of one or more classes; and wherein at least some of the classes correspond to objects of the typed medium-level intermediate representation that are translated by the compiler component for: a) virtual method invocation using an exact class name to represent objects of that class but not those of subclasses and a combined class type as an encoding of an existential type to represent objects of the class and the subclass of the class, wherein the combined class type is a combination of a name-based class name and corresponding structure-based record type; b) interface method invocation of an interface method on an object by opening the object to obtain a method table for the interface, calling the interface method on the object when open, and testing whether an object can be cast to a class, to an interface, to a class vector; c) object type casting, including testing whether an object can be cast to a class, whether an object can be cast to an interface, or whether an object can be cast to a class vector, or any combination thereof; and d) vector store check, including fetching a tag of an element type of an object and testing whether the element type of the object is a subclass of the element type of the vector type. 12. The system of claim 11 , wherein the compiler component further translates the typed medium-level intermediate representation into a low-level intermediate representation, including by choosing a data representation for types in the typed medium-level intermediate representation.