Program code conversion
AssigneeTransitive Limited
InventorsJason Souloglou, Alasdair Rawsthorne
Life of this patent
Estimating the term…
Abstract
A method for generating an intermediate representation of computer program code written for running on a programmable machine comprises: (i) generating a plurality of register objects for holding variable values to be generated by the program code; and (ii) generating a plurality of expression objects representing fixed values and/or relationships between said fixed values and said variable values according to said program code; said objects being organized into a branched tree-like network having all register objects at the lowest basic root or tree-trunk level of the network with no register object feeding into any other register object.
Claims16
A method of generating an intermediate representation of program code, the method comprising the computer implemented steps of:
- on an initial translation of a given portion of program code, generating and storing only intermediate representation which is required to execute that portion of program code with a prevailing set of conditions;
- and
- whenever subsequently the same portion of program code is entered, determining whether intermediate representation has previously been generated and stored for that portion of program code for the subsequent conditions, and if no such intermediate representation has previously been generated, generating additional intermediate representation required to execute said portion of program code with said subsequent conditions.
A method for generating an intermediate representation of program code written for running on a programmable machine, said method comprising:
- (i) generating a plurality of register objects for holding variable values to be generated by the program code;
- and
- (ii) generating a plurality of expression objects representing fixed values and/or relationships between said fixed values and said variable values according to said program code;
- said intermediate representation being generated and stored for a block of program code and subsequently re-used if the same block of program code is later re-entered, and wherein at least one block of program code can have alternative un-used entry conditions or effects or functions and said intermediate representation is only initially generated and stored as required to execute that block of program code with a then prevailing set of conditions.
A method of generating target code representation of program code, the method comprising the computer implemented steps of:
- on an initial translation of a given portion of the program code, generating and storing only target code which is required to execute that portion of program code with a prevailing set of conditions;
- and
- whenever subsequently the same portion of program code is entered, determining whether target code has previously been generated and stored for that portion of program code for the subsequent conditions, and if no such target code has previously been generated, generating additional target code required to execute said portion of program code with said subsequent conditions.
A method of dynamically translating first computer program code written for compilation and/or translation and running on a first programmable machine into second computer program code for running on a different second programmable machine, said method comprising:
- (a) generating an intermediate representation of a block of said first computer program code;
- (b) generating a block of said second computer program code from said intermediate representation;
- (c) running said block of second computer program code on said second programmable machine;
- and
- (d) repeating steps a-c in real time for at least the blocks of first computer program code needed for a current emulated execution of the first computer program code on said second programmable machine.
A system for generating an intermediate representation of program code comprising:
- means for generating and storing, on an initial translation of a given portion of program code, only intermediate representation which is required to execute that portion of program code with a prevailing set of conditions;
- and
- means for determining, whenever subsequently the same portion of program code is entered, whether intermediate representation has previously been generated and stored for that portion of program code for the subsequent conditions, and if no such intermediate representation has previously been generated, generating additional intermediate representation required to execute said portion of program code with said subsequent conditions.
A system for generating an intermediate representation or program code written for running on a programmable machine, the system comprising:
- means for generating a plurality of register objects for holding variable values to be generated by the program code;
- and
- means for generating a plurality of expression objects representing fixed values and/or relationships between said fixed values and said variable values according to said program code;
- and
- means for generating and storing intermediate representation, said intermediate representation being generated and stored for a block of program code and subsequently re-used if the same block of program code is later re-entered, and wherein at least one block of program code can have alternative un-used entry conditions or effects or functions and said intermediate representation is only initially generated and stored as required to execute that block of program code with a then prevailing set of conditions.
Dependencies are inferred from the claim text.