Program interpreter
AssigneeThe MathWorks, Inc.
InventorsCharles G. Nylander, William M. McKeeman, Brett Baker, William Nell
Life of this patent
Estimating the term…
Abstract
A method and system is provided that allows a well-behaved program to execute more quickly than dynamically typed programming languages did in the past, thereby allowing a the dynamically typed language to be competitive with static declarative programming languages. A method includes converting lines of source code representing functions to byte-codes representing functions, selecting a subsequence of the byte-codes based on the byte-codes and the dynamic run-time properties of program variables, generating processor instructions in a compiler for the subsequence, and interpreting the byte-codes not contained in the subsequence.
Claims23
A method comprising:
- converting lines of source code representing functions to byte-codes representing functions;
- selecting a subsequence of the byte-codes based on the byte-codes and the dynamic run-time properties of program variables;
- generating processor instructions in a compiler for the subsequence;
- and
- interpreting the byte-codes not contained in the subsequence.
A method comprising:
- converting lines of source code representing functions to byte-codes representing functions;
- selecting a subsequence of the byte-codes based on the byte-codes and the dynamic run-time properties of program variables;
- generating alternate byte-codes in an accelerated interpreter for the subsequence;
- and
- interpreting the byte-codes not contained in the subsequence.
A method comprising:
- converting source code representing functions to byte-codes representing functions;
- selecting a first subsequence of the byte-codes based on the byte-codes and the dynamic run-time state of program variables;
- selecting a second subsequence of the byte-codes based on the byte-codes and the dynamic run-time state of program variables;
- generating processor instructions in a compiler for the first subsequence;
- generating alternate byte-codes in an accelerated interpreter for the second subsequence;
- and
- interpreting the byte-codes not contained in the first subsequence and the second subsequence.
A system comprising:
- a first interpreter in a memory for converting source code into bytes-codes representing functions;
- an analysis unit in the memory for analyzing whether the byte-codes can be stored in a subsequence of byte-codes;
- a compiler for compiling byte-codes in the subsequence to processor instructions;
- and
- a second compiler for converting byte-codes not resident in the subsequence to alternate byte-codes.
An article comprising:
- a storage medium having stored thereon instructions that when executed by a machine results in the following:
- converting lines of source code representing functions to byte-codes representing functions;
- selecting a subsequence of the byte-codes based on the byte-codes and the dynamic run-time properties of program variables;
- generating processor instructions in a compiler for the subsequence;
- and
- interpreting the byte-codes not contained in the subsequence.
Dependencies are inferred from the claim text.