Claims
- 1-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.
- 7. A unified type system as defined in claim 6 wherein the metadata is defined by the user.
- 8. A unified type system as defined in claim 6 wherein the second value type representation inherits one or more interfaces from a parent object class in the class object hierarchy.
- 9. A unified type system as defined in claim 6 wherein the second value type is automatically passed to the method expecting the boxed value type at runtime.
- 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.
- 11. A generated common output file as defined in claim 10 wherein the unboxed value type representation includes metadata defined by the user that identifies one of a plurality of pre-defined value-types.
- 12. A generated common output file as defined in claim 10 wherein the boxed value type representation is an object having that includes the variable and metadata defined by an object class associated with the pre-defined value type.
- 13. A generated common output file as defined in claim 10 wherein the pre-defined value type representation is an integer representation having a specified number of bits.
- 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.
- 15. A method as defined in claim 14 wherein the boxing instruction when executed instantiates an object of a class of objects associated with the first value type, passes the unboxed value type representation of the variable to a first method of the object, and returns a reference to the object.
- 16. A method as defined in claim 14 further comprising:
inserting in the intermediate language code at least one instruction that passes the reference to a second method expecting the boxed value type representation in place of an instruction in the source code that passes the unboxed value type representation to the second method.
- 17. A method as defined in claim 14 further comprising
inserting in the intermediate language code instructions to initialize an unboxed value type representation of the variable.
- 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.
- 19. A compiler as defined in claim 18 wherein the compiler further translating the computer language source file into instructions that pass the boxed value type representation to the method expecting the boxed value type representation.
- 20. The compiler as defined in claim 18 wherein the boxed value type representation is an object of a first boxed object class in a class object hierarchy, wherein the first boxed object class is selected from a plurality of boxed object classes based on the instructions to assign the unboxed value type representation.
CROSS REFERENCE TO RELATED APPLICATIONS
[0001] The present application is a continuation-in-part of U.S. patent application Ser. No. _ _ _ _ _ _, entitled UNIFIED DATA TYPE SYSTEM AND METHOD (Attorney Docket No. MS#124946.1/40062.84US01), filed on Jul. 10, 2000.
Continuations (1)
|
Number |
Date |
Country |
Parent |
09614158 |
Jul 2000 |
US |
Child |
10848402 |
May 2004 |
US |
Continuation in Parts (1)
|
Number |
Date |
Country |
Parent |
09613289 |
Jul 2000 |
US |
Child |
09614158 |
Jul 2000 |
US |