Unified data type system and method
1 Assignment
0 Petitions
Accused Products
Abstract
A type system includes a dual representation for basic data types. One representation is the basic data type representation common to such basic built-in data types, known as an unboxed value type or simply as a value type. Each of the basic data types also has a boxed representation that can be stored in the object hierarchy of the type system. This dual representation can also be extended to user-defined types, so that user-defined types may exist both as an unboxed value type and as an object within the object hierarchy of the type system. This dual representation allows the compiler and/or runtime environment to select the most effective and efficient representation for the data type depending on the particular need at the moment.
47 Citations
20 Claims
-
1-5. -5 (canceled)
-
6. A unified type system for use with a computer source language and associated components which translate source files written in the computer source language into executable form and execute the translated source files, wherein at least one source file declares a variable using an unboxed value type yet passes the variable to a method expecting a boxed value type representation, the unified type system comprising:
-
a first value type representation relating to the unboxed value type representation of the variable; and
a class object hierarchy comprising a plurality of object classes, wherein at least one of the object classes is a second value type representation relating to the boxed representation of the variable, wherein the second value type is automatically passed to the method expecting the boxed value type, wherein the first value type representation includes metadata identifying the second value type representation. - View Dependent Claims (7, 8, 9)
-
-
10. A generated common output file produced by a front end compiler system, wherein the front end compiler system is adapted to compile other common language files, the generated common output file comprising:
-
a declaration of an unboxed value type representation of a variable, the declaration associating the unboxed value type representation with a pre-defined value type; and
output code generated from the front end compiler system that, when executed, creates a boxed value type representation of the variable corresponding to the pre-defined value type, and automatically passes the boxed value type representation to methods expecting boxed value type representations of the variable and automatically passes the unboxed value type representation to methods expecting the unboxed value type representation of the variable. - View Dependent Claims (11, 12, 13)
-
-
14. A method for use by a compiler for compiling source code into executable intermediate language code comprising:
upon detection of a source code instruction to pass an unboxed value type representation of a variable of a first value type to a method expecting a boxed value type representation, inserting, in the intermediate language code, a boxing instruction, wherein the boxing instruction when executed creates a boxed value type representation of the variable based on the first value type and wherein the boxing instruction does not correspond to an explicit instruction in the source code for creating a boxed value type representation of the variable. - View Dependent Claims (15, 16, 17)
- 18. A compiler for translating files written in at least one computer source language into computer executable files, wherein the compiler translating a computer source language file containing the computer source language instructions to assign an unboxed value type representation of a variable and to pass the unboxed value type representation to a method expecting a boxed value type representation into an executable file containing instructions that create an unboxed value type representation of the variable and a boxed value type representation of the variable.
Specification