EP1636701B1

An intermediate representation for multiple exception handling models

Abstract

This record has no abstract on file.

EP1636701B1, drawing sheet 1
Sheet 1 of 37

Term

Term ended

Expired 21 May 2024, 2.3 years ago.

  1. Priority
  2. Filed
  3. Granted
  4. Expired
  5. Today

48 claims: 3 independent, 45 dependent

  1. 1
    A method implemented at least in part by a computing device of processing a source language independent intermediate representation (230; 450) of software comprising exception handling constructs, the method comprising:reading (360) the source language independent intermediate representation of software comprising exception handling constructs;wherein the source language independent intermediate representation explicitly expresses (710;915;1110;1112;1310;1315;1325;1330;1510;1515;1521;1525;1531;1705;1706;1726;1720;2410;2420;2435;2430;2445;2440;2710;2721;2731;2960;2930;2920;2940;3210;3410;3420;3440) exception handling control flow of the software by associating exception causing instructions with labels representing their related handlers (1220;1420;1430;1520;1530);and generating (370), 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 wherein the source language independent intermediate representation comprises: a first instruction (3410) for indicating entry into a try-except region;and a second instruction (3440) for selecting one of a plurality of control flow paths for exception handling based on a type value related to an exception, wherein the plurality of control flow paths available for selection includes a path related to resumption of execution of an instruction causing the exception;wherein the second instruction for selecting one of the plurality of control flow for exception handling comprises: an operand indicative of the type value of the exception;a label operand indicative of a handler code block;a label operand indicative of a continuation code block;and a label operand indicative of the exception causing instruction;wherein the intermediate representation of the exception handling constructs is such that it allows for representing the exception handling constructs within a main control flow;and before the intermediate representation (230) is generated, an intermediate language representation (210-213) is generated for each of the multiple source code representations (205-208), which are then read by an intermediate language reader (220);and the intermediate language representations (210-213) are translated, by the intermediate language reader (220) into the intermediate representation (230), wherein the language of the intermediate language representations (210-13) are higher-level than ten language of the intermediate representation (230);and a source code group (205-203) is translated into CIL (210-213) which is read and translated into the intermediate representation (230) by a intermediate reader (220)
  2. 14
    A system for implementing source language independent exception handling intermediate representations for multiple source code languages, the system comprising:an intermediate language reader, implemented at least in part by a computing device of the system, 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 (710;915;1110;1112;1310;1315;1325;1330;1510;1515;1521;1525;1531;1705;1706;1726;1720;2410;2410;2435;2430;2445;2440;2710;2721;2731;2960;2930;2920;2940;3210;3410;3420;3440) exception handling control flow of the source code by associating exception causing instructions with labels representing their related handlers (1220;1420;1430;1520;1530), wherein the source language independent intermediate representation of the exception handling constructs comprises a first instruction (3410) for indicating entry into a try-except region;and a second instruction (3440) for selecting one of a plurality of control flow paths for exception handling based on a type value related to an exception, wherein the plurality of control flow paths available for selection includes a path related to resumption of execution of an instruction causing the exception, wherein the second instruction for selecting the control flow path for exception handling comprises: an operand indicative of the type value of the exception;a label operand indicative of a handler code block;a label operand indicative of a continuation code block;and a label operand indicative of the exception causing instruction wherein the intermediate representation of the exception handling constructs is such that it allows for representing the exception handling constructs within a main control flow;and before the intermediate representation (230) is generated, an intermediate language representation (210-213) is generated for each of the multiple source code representations (205-208), which are then read by an intermediate language reader (220);and the intermediate language representations (210-213) are translated, by the intermediate language reader (220) into the intermediate representation (230), wherein the language of the intermediate language representations (210-13) are higher-level than the language of the intermediate representation (230);and representation (230);and a intermediate language reader (220), that reads and translates, into the intermediate representation (220), a source code group (430) that is translated into CIL.
  3. 29
    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, wherein the source language independent intermediate representation explicitly expresses (710; 915; 1110; 1112; 1310; 1315; 1325; 1330; 1510; 1515; 1521; 1525; 1531; 1705; 1706; 1726; 1720; 2410; 2420; 2435; 2430; 2445; 2440; 2710; 2721; 2731; 2960; 2930; 2920; 2940; 3210; 3410; 3420; 3440) exception handling control flow of the source code by associating exception causing instructions with labels representing their related handlers (1220; 1420; 1430; 1520; 1530) the source language independent intermediate representation of exception handling constructs comprising:a first instruction (3410) for indicating entry into a try-except region;and a second instruction (3440) for selecting one of a plurality of control flow paths for exception handling based on a type value related to an exception, wherein the plurality of control flow paths available for selection includes a path related to resumption of execution of an instruction causing the exception, wherein the second instruction for selecting the control flow path for exception handling comprises: an operand indicative of the type value of the exception;a label operand indicative of a handler code block;a label operand indicative of a continuation code block;and a label operand indicative of the exception causing instruction wherein the intermediate representation of the exception handling constructs is such that it allows for representing the exception handling constructs within a main control flow;and before the intermediate representation (230) is generated, an intermediate language representation (210-213) is generated for each of the multiple source code representations (205-208), which are then read by an intermediate language reader (220);and the intermediate language representations (210-213) are translated, by the intermediate language reader (220) into the intermediate representation (230), wherein the language of the intermediate language representations (210-13) are higher-level than the language of the intermediate representation (230);and a source code group (205-208) is translated into CIL (210-213) which is read and translated into the intermediate representation (230) by a intermediate reader (220)