Method for an interpreter to control a native function call based on a signature of the native function
First Claim
Patent Images
1. A method of implementing an interpreter, the method comprising:
- determining, during runtime of an interpreted application, whether a signature of a native function declared in the interpreted application matches a signature of the native function stored in a linking mechanism which links a function call to the native function in the interpreted application to native code implementing the native function; and
invoking the native code in response to the function call in the interpreted application if the signatures match.
1 Assignment
0 Petitions
Accused Products
Abstract
A method for implementing an interpreter comprises determining if a signature of a native function declared in code for an interpreted application matches a signature of the native function stored in a linking mechanism to link a function call to the native function in the interpreted application to native code implementing the native function; and invoking the native code only if the signatures match.
-
Citations
29 Claims
-
1. A method of implementing an interpreter, the method comprising:
-
determining, during runtime of an interpreted application, whether a signature of a native function declared in the interpreted application matches a signature of the native function stored in a linking mechanism which links a function call to the native function in the interpreted application to native code implementing the native function; and invoking the native code in response to the function call in the interpreted application if the signatures match. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A method of implementing an interpreter, the method comprising:
-
building a table of native functions, each implemented in a native language, wherein the table includes a mapping of a name for a native function, to a signature for the native function, and to a pointer to native code implementing the native function; and defining a control mechanism to control, during runtime of an interpreted application, calls to the native function by the interpreted application, based on the table. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19)
-
-
20. An interpreter, comprising:
-
a mechanism to determine, during runtime of an interpreted application, if a signature of a native function declared in the interpreted application matches a signature of the native function stored in a linking mechanism which links a function call to the native function in the interpreted application to the native code implementing the native function; a mechanism to invoke the native function in response to the function call in the interpreted application if the signatures match; and a mechanism to display a notification to a user if the declared signature does not match the implemented signature. - View Dependent Claims (21)
-
-
22. A machine-accessible medium, having stored thereon a sequence of instructions, which if executed by a processing system causes the processing system to perform a process comprising:
-
determining, during runtime of an interpreted application, if a signature of a native function declared in the interpreted application matches the signature of the native function stored in a linking mechanism which links a function call to the native function in the interpreted application to native code implementing the native function; and invoking the native code in response to the function call in the interpreted application if the signatures match. - View Dependent Claims (23)
-
-
24. A computer system, comprising:
-
a processor; and a memory coupled to the processor, the memory storing instructions which when executed by the processor cause the processor to perform a method comprising determining, during runtime of an interpreted application, if a signature of the native function declared in the interpreted application matches a signature of the native function stored in a linking mechanism which links a function call to the native function in the interpreted application to native code implementing the native function; and invoking the native code in response to the function call in the interpreted application if the signatures match. - View Dependent Claims (25)
-
-
26. A method for implementing an interpreter, comprising:
-
encountering, during runtime of an interpreted application, a native function call instruction in the interpreted program; copying parameters for the native function to a machine stack; performing a look-up of a signature of the native function in a class file containing a declaration of the native function; comparing the looked-up native function signature with a signature of the native function in a table of native functions which was built when the interpreter was compiled; executing native code comprising the native function if the signatures match; and executing an error routine if the signatures do not match.
-
-
27. An interpreter, which upon encountering a native function call instruction in an interpreted program, during runtime of an interpreted application, performs a method comprising:
-
copying parameters for the native function to a machine stack; performing a look-up of a signature of the native function in a class file containing a declaration of the native function; comparing the looked-up native function signature with a signature of the native function in a table of native functions which was built when the interpreter was compiled; executing native code comprising the native function if the signatures match; and executing an error routine if the signatures do not match; and displaying a notification to a user if the declared signature does not match the implemented signature.
-
-
28. A machine-accessible medium, having stored thereon a sequence of instructions which if executed by a processing system, cause the processing system to perform a process comprising:
-
encountering, during runtime of an interpreted application, a native function call instruction in the interpreted program; copying parameters for the native function to a machine stack; performing a look-up of a signature of the native function in a class file containing a declaration of the native function; comparing the looked-up native function signature with a signature of the native function in a table of native functions which was built when the interpreter was compiled; executing native code comprising the native function if the signatures match; and executing an error routine if the signatures do not match.
-
-
29. A computer system, comprising:
-
a processor; a memory coupled to the processor, the memory storing instructions which when executed by the processor cause the processor to perform a method comprising encountering, during runtime of an interpreted application, a native function call instruction in the interpreted program; copying parameters for the native function to a machine stack; performing a look-up of a signature of the native function in a class file containing a declaration of the native function; comparing the looked-up native function signature with a signature of the native function in a table of native functions which was built when the interpreter was compiled; executing native code comprising the native function if the signatures match; and executing an error routine if the signatures do not match.
-
Specification