SYSTEM AND METHOD FOR COMPILING LAMBDA EXPRESSION IN A PROGRAMMING LANGUAGE ENVIRONMENT

Uloženo v:
Podrobná bibliografie
Název: SYSTEM AND METHOD FOR COMPILING LAMBDA EXPRESSION IN A PROGRAMMING LANGUAGE ENVIRONMENT
Document Number: 20140019948
Datum vydání: January 16, 2014
Appl. No: 13/779557
Application Filed: February 27, 2013
Abstrakt: A system and method can support context-dependent expression compilation in a programming language environment. A compiler in the programming language environment can provide one or more context objects that operate to compile various context-dependent expressions in different programming contexts. Then, the compiler can use a said context object to derive a target type associated with a context-dependent expression, and use the context object to perform compatibility check for the context-dependent expression in the programming language environment.
Assignees: ORACLE INTERNATIONAL CORPORATION (Redwood Shores, CA, US)
Claim: 1. A method for supporting context-dependent expression compilation in a programming language environment operating on one or more microprocessors, comprising: providing a context object that operates to compile an expression in a programming context; deriving, via the context object, a target type associated with the expression, wherein the target type associated with the expression is context-dependent; and performing, via the context object, compatibility check for the expression in the programming language environment.
Claim: 2. The method according to claim 1, further comprising: allowing the expression to be a lambda expression that provides a list of formal parameters and a body.
Claim: 3. The method according to claim 1, further comprising: providing, via the context object, one or more error messages for the expression in the programming language environment.
Claim: 4. The method according to claim 1, further comprising: allowing the context object to compile another expression in the programming language environment.
Claim: 5. The method according to claim 4, further comprising: deriving, via the context object, another target type associated with the expression; and performing, via the context object, compatibility check for the another expression in the programming language environment.
Claim: 6. The method according to claim 1, further comprising: providing another context object that operates to compile the expression in another programming context.
Claim: 7. The method according to claim 6, further comprising: deriving, via the another context object, another target type associated with the expression; and performing, via the another context object, compatibility check for the expression in the programming language environment.
Claim: 8. The method according to claim 1, further comprising: providing a type cache in the programming language environment, wherein the type cache maps each type in one or more types to a function descriptor.
Claim: 9. The method according to claim 8, further comprising: indicating that a said type is not functional and do not have a function descriptor.
Claim: 10. The method according to claim 9, further comprising: allowing the context object to share compatibility check logic with another context object.
Claim: 11. A system for supporting context-dependent expression compilation in a programming language environment, comprising: one or more microprocessors; a compiler, running on the one or more microprocessors, that operates to perform the steps comprising: providing a context object that operates to compile an expression in a programming context; using the context object to derive a target type associated with the expression, wherein the target type associated with the expression is context-dependent; and using the context object to perform compatibility check for the expression in the programming language environment.
Claim: 12. The system according to claim 11, wherein: the expression is a lambda expression that provides a list of formal parameters and a body.
Claim: 13. The system according to claim 11, wherein: the compiler operates to use the context object to provide one or more error messages for the expression in the programming language environment.
Claim: 14. The system according to claim 11, wherein: the compiler operates to use the context object to compile another expression in the programming language environment.
Claim: 15. The system according to claim 14, wherein: the compiler operates to use the context object to derive another target type associated with the another expression; and perform compatibility check for the another expression in the programming language environment.
Claim: 16. The system according to claim 11, wherein: the compiler operates to provide another context object that operates to compile the expression in another programming context.
Claim: 17. The system according to claim 16, wherein: the compiler operates to use the another context object to derive another target type associated with the expression; and perform compatibility check for the expression in the programming language environment.
Claim: 18. The system according to claim 11, wherein: the compiler operates to provide a type cache in the programming language environment, wherein the type cache maps each type in one or more types to a function descriptor.
Claim: 19. The system according to claim 18, wherein: the type cache operates to indicate that a said type is not functional and do not have a function descriptor.
Claim: 20. A non-transitory machine readable storage medium having instructions stored thereon that when executed cause a system to perform the steps comprising: providing a context object that operates to compile an expression in a programming context; using the context object to derive a target type associated with the expression, wherein the target type associated with the expression is context-dependent; and using the context object to perform compatibility check for the expression in the programming language environment.
Current U.S. Class: 717/143
Current International Class: 06
Přístupové číslo: edspap.20140019948
Databáze: USPTO Patent Applications
Popis
Abstrakt:A system and method can support context-dependent expression compilation in a programming language environment. A compiler in the programming language environment can provide one or more context objects that operate to compile various context-dependent expressions in different programming contexts. Then, the compiler can use a said context object to derive a target type associated with a context-dependent expression, and use the context object to perform compatibility check for the context-dependent expression in the programming language environment.