Dependency-driven co-specialization of specialized classes
First Claim
1. A non-transitory, computer-readable storage medium storing program instructions that when executed on a computing device cause the computing device to perform:
- specializing, within a platform independent, object oriented runtime environment, a first generic class defined using an object oriented programming language, wherein the first generic class comprises one or more specializable type variables, wherein each of the specializable type variables is specializable over one or more type parameterizations, and wherein the first generic class is specialized for a particular one of the one or more type parameterizations, wherein after being specialized, instances of the one or more specializable type variables are replaced with instances of the particular type parameterization;
determining a dependency relationship between the first generic class and a second generic class; and
specializing, in response to said specializing the first generic class and said determining the dependency relationship, the second generic class for the particular one of the one or more type parameterizations based on the determined dependency relationship, wherein specializing the second generic class comprises specializing, based on the determined dependency relationship, one or more specializable type variables of the second generic class for the particular type parameterization for which the first generic class is specialized.
1 Assignment
0 Petitions
Accused Products
Abstract
The loading or operation of a specialized class may trigger the specialization of other classes. A compiler may be configured to recognize dependency relationships between generic classes and to describe the classes in terms of the type variables of the triggering types (e.g., the types and/or type parameterizations) that trigger the specialization of classes based on the specialization of a first class. A compiler may include information, such as structural references, indicating dependency relationships between classes when generating class files. Thus, the class file may include information indicating that a class extends a class resulting from applying a specialization code generator to an argument. Loading a first class may trigger the loading of a second class described by a structural description such that a specializer (and/or class loader) may apply the structural description to generate and load the second class for the particular parameterization.
40 Citations
20 Claims
-
1. A non-transitory, computer-readable storage medium storing program instructions that when executed on a computing device cause the computing device to perform:
-
specializing, within a platform independent, object oriented runtime environment, a first generic class defined using an object oriented programming language, wherein the first generic class comprises one or more specializable type variables, wherein each of the specializable type variables is specializable over one or more type parameterizations, and wherein the first generic class is specialized for a particular one of the one or more type parameterizations, wherein after being specialized, instances of the one or more specializable type variables are replaced with instances of the particular type parameterization; determining a dependency relationship between the first generic class and a second generic class; and specializing, in response to said specializing the first generic class and said determining the dependency relationship, the second generic class for the particular one of the one or more type parameterizations based on the determined dependency relationship, wherein specializing the second generic class comprises specializing, based on the determined dependency relationship, one or more specializable type variables of the second generic class for the particular type parameterization for which the first generic class is specialized. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A method, comprising:
-
specializing, by a platform independent, object oriented runtime environment implemented on one or more computing devices, a first generic class, wherein the first generic class is defined using an object oriented programming language, wherein the first generic class comprises one or more specializable type variables, wherein each of the specializable type variables is specializable over one or more type parameterizations, and wherein the first generic class is specialized for a particular one of the one or more type parameterizations, wherein after being specialized, instances of the one or more specializable type variables are replaced with instances of the particular type parameterization; determining, by the platform independent, object oriented runtime environment, a dependency relationship between the first generic class and a second generic class; and specializing, by the platform independent, object oriented runtime environment in response to said specializing the first generic class and said determining the dependency relationship, the second generic class for the particular one of the one or more type parameterizations based on the determined dependency relationship, wherein specializing the second generic class comprises specializing, based on the determined dependency relationship, one or more specializable type variables of the second generic class for the particular type parameterization for which the first generic class is specialized. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A computing device, comprising:
-
a processor; and a memory comprising program instructions, that when executed on the processor cause the processor to; specialize a first generic class within a platform independent, object oriented runtime environment, wherein the first generic class is defined using an object oriented programming language, wherein the first generic class comprises one or more specializable type variables, wherein each of the specializable type variables is specializable over one or more type parameterizations, and wherein the first generic class is specialized for a particular one of the one or more type parameterizations, wherein after being specialized, instances of the one or more specializable type variables are replaced with instances of the particular type parameterization; determine a dependency relationship between the first generic class and a second generic class; and specialize, in response to specializing the first generic class and determining the dependency relationship, the second generic class for the particular one of the one or more type parameterizations based on the determined dependency relationship, wherein specializing the second generic class comprises specializing, based on the determined dependency relationship, one or more specializable type variables of the second generic class for the particular type parameterization for which the first generic class is specialized. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification