主权项 |
1. A method comprising:
providing an input computer program expressed in an input computer language, wherein:
the input computer language includes a first set of data types for elements or constructs to be evaluated at runtime, and a second set of data types for elements or constructs to be evaluated at translation time; andthe input computer program includes at least one element or construct having a type in the first set of data types and includes at least one element or construct having a type in the second set of data types, the second set of data types being designated as embedded interpreter types (EITs) using type tags or type indicators; and automatically translating the input computer program to a computer executable output representation, including:
determining, at translation-time, whether a data type of a specific element or construct in the input computer program is among the first set of data types or the second set of data types, the determining includes recognizing whether the specific element or construct includes an EIT;in the event that the data type of the specific element or construct does not include an EIT, and the data type of the specific element or construct is among the first set of data types, at translation-time, performing translation without evaluating the specific element or construct; andin the event that the data type of the specific element or construct includes an EIT and the specific element or construct is among the second set of data types, at translation-time, executing code pertaining to the specific element or construct to evaluate the specific element or construct and performing translation; and providing the computer executable output representation as an output. |