16. A computer implemented method implemented at least in part on at least one processing unit, comprising: modifying compiler code to generate a typed medium-level intermediate representation that includes type checking at the typed medium-level intermediate representation, including by providing a class type that represents an object's name-based class name and corresponding structure-based record type, translating virtual method invocation on at least some objects by using an exact class name to represent object 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 subclasses of the class, translating interface method invocation of an object by calling the method on the object when open, testing whether an object can be cast to a class, to an interface, to a class vector, or any combination thereof, and performing a vector store check that determines whether an element type of the object is a subclass of the element type of a vector type.
20. The method of claim 16 wherein the compiler code is further modified to generate a low-level intermediate representation from the typed medium-level intermediate representation, including by choosing data representations for medium level types, and converting operators in the typed medium-level intermediate representation into instructions in the low-level intermediate representation.