Intermediate representation for multiple exception handling models
First Claim
1. A method implemented at least in part by a computing device of processing a source language independent intermediate representation of software comprising exception handling constructs, the method comprising:
- reading the source language independent intermediate representation of software comprising exception handling constructs;
wherein the source language independent intermediate representation explicitly expresses exception handling control flow of the software, wherein the source language independent intermediate representation comprises a single set of instructions for representing a plurality of exception handling models of a plurality of source languages, and wherein the exception handling control flow is determined using the single set of instructions by using an offset containment relationship to map offsets of protected code blocks to labels of their destination and handler blocks; and
generating, in a computer-readable media having a tangible component, a computer-readable version of the software implementing the exception handling control flow based on the source language independent intermediate representation.
1 Assignment
0 Petitions
Accused Products
Abstract
As described herein, an intermediate representation of a source code file may be used to explicitly express exception handling control flow prior to generating object code for the source code. As further described herein, a single uniform set of instructions of the intermediate representation may be used for expressing multiple different exception handling mechanisms related to multiple different programming languages. The intermediate form of the exception handling instructions may be generated by translating an intermediate language representation of the source code file. Representations of the source code in multiple different intermediate languages may be translated to a single uniform set of instructions of the intermediate representation. The intermediate form of the exception handling instructions may then be used by software development tools for such tasks as code generation, code optimization, code analysis etc. Thus, the same methods for code optimizations, analysis and generation may be used for intermediate representations of multiple different languages.
88 Citations
20 Claims
-
1. A method implemented at least in part by a computing device of processing a source language independent intermediate representation of software comprising exception handling constructs, the method comprising:
-
reading the source language independent intermediate representation of software comprising exception handling constructs;
wherein the source language independent intermediate representation explicitly expresses exception handling control flow of the software, wherein the source language independent intermediate representation comprises a single set of instructions for representing a plurality of exception handling models of a plurality of source languages, and wherein the exception handling control flow is determined using the single set of instructions by using an offset containment relationship to map offsets of protected code blocks to labels of their destination and handler blocks; andgenerating, in a computer-readable media having a tangible component, a computer-readable version of the software implementing the exception handling control flow based on the source language independent intermediate representation. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A system for implementing source language independent exception handling intermediate representations for multiple source code languages, the system comprising:
-
a general purpose or specialized computer apparatus implementing an intermediate language reader, for obtaining an intermediate language representation of a source code file and generating a source language independent intermediate representation of exception handling constructs of the source code based on the intermediate language representation; wherein the source language independent intermediate representation explicitly expresses exception handling control flow of the source code, wherein the source language independent intermediate representation comprises a single set of instructions for representing a plurality of exception handling models of the multiple source code languages, and wherein the exception handling control flow is determined using the single set of instructions by using an offset containment relationship to map offsets of protected code blocks to labels of their destination and handler blocks. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16)
-
-
17. A computer readable storage medium having a tangible component and having stored thereon a source language independent intermediate representation of exception handling constructs of source code, the source language independent intermediate representation of exception handling constructs comprising:
-
a single set of instructions for representing a plurality of exception handling models of a plurality of source languages; a first instruction, of the single set of instructions, for catching an exception and returning an exception object related to the exception; and a second instruction, of the single set of instructions, for specifying a handler for the exception based on a type value of the exception object; wherein the source language independent intermediate representation explicitly expresses exception handling control flow of the source code, and wherein the exception handling control flow is determined using the single set of instructions by using an offset containment relationship to map offsets of protected code blocks to labels of their destination and handler blocks. - View Dependent Claims (18, 19, 20)
-
Specification