Parameter marshaling techniques for dynamic object-oriented programming languages
First Claim
1. In a computer which executes a program written in a first, object-oriented program language, a system for marshaling object parameters for executing a method in an other program written in a second program language, comprising:
- means for calling a method in said other program and passing a parameter to said method;
means for determining if said parameter is a reference to a first type of object comprising a reference to a class definition and one or more instance variables;
means responsive to a determination that said parameter is a reference to said first type of object, for adjusting said reference to point to said instance variables and for passing the adjusted reference to said method as the parameter;
means for determining if said parameter is a reference to a second type of object comprising a reference to a class definition and an array of elements; and
means responsive to a determination that said parameter is a reference to said second type of object, for adjusting said reference to point to said elements in said array and for passing the adjusted reference to said method as the parameter.
2 Assignments
0 Petitions
Accused Products
Abstract
When a method implemented in native compiled code is called from a object-oriented program, the parameters associated with that method are marshaled to convert them from the format of the object-oriented code into one which is appropriate for the compiled code. The marshaling of parameters is carried out in dependence upon the particular type of object with which the parameters are associated. When an aggregate object is marshaled, a pointer to the object is adjusted to point directly to variables for an instance of that object. When an array is marshaled, the pointer is adjusted to point to its individual elements.
-
Citations
16 Claims
-
1. In a computer which executes a program written in a first, object-oriented program language, a system for marshaling object parameters for executing a method in an other program written in a second program language, comprising:
-
means for calling a method in said other program and passing a parameter to said method; means for determining if said parameter is a reference to a first type of object comprising a reference to a class definition and one or more instance variables; means responsive to a determination that said parameter is a reference to said first type of object, for adjusting said reference to point to said instance variables and for passing the adjusted reference to said method as the parameter; means for determining if said parameter is a reference to a second type of object comprising a reference to a class definition and an array of elements; and means responsive to a determination that said parameter is a reference to said second type of object, for adjusting said reference to point to said elements in said array and for passing the adjusted reference to said method as the parameter.
-
-
2. In a computer which executes a program written in a first, object-oriented program language, a system for marshaling object parameters for executing a method in an other program written in a second program language, comprising:
-
means for calling a method in said other program and passing a parameter to said method; means for determining if said parameter is a reference to a predetermined type of object comprising a reference to a class definition and one or more instance variables; and means responsive to a determination that said parameter is a reference to said predetermined type of object, for adjusting said reference to point to said instance variables and for passing the adjusted reference to said method as the parameter.
-
-
3. In a computer which executes a program written in a first, object-oriented program language, a system for marshaling object parameters for executing a method in an other program written in a second program language, comprising:
-
means for calling a method in said other program and passing a parameter to said method; means for determining if said parameter is a reference to a predetermined type of object comprising a reference to a class definition and an array of elements; and means responsive to a determination that said parameter is a reference to said predetermined type of object, for adjusting said reference to point to said elements in said array and for passing the adjusted reference to said method as the parameter.
-
-
4. A computer-executed method for marshaling parameters prior to the execution of a native method in a computer, comprising the steps of:
-
determining whether a parameter is an object; if the parameter is an object, detecting whether the object is of a first type or a second type, in which the second type of object includes an array of elements; adjusting a reference to the object to refer directly to instance variables of the object when the object is detected to be of the first type; adjusting the reference to refer to the elements of the array for the object when the object is detected to be of the second type; and passing the adjusted reference to the native method.
-
-
5. A computer-executed method for marshaling parameters prior to the execution of a native method in a computer, comprising the steps of:
-
calling a native method and obtaining a parameter to be passed to the native method; determining whether the parameter is a value or a reference to an object which contains data in addition to values; if the parameter is determined to be a reference to an object, adjusting said reference to refer directly to values of the object; and passing the adjusted reference to the native method as the parameter. - View Dependent Claims (6)
-
-
7. In a computer, a system for marshaling parameters for executing a method, comprising:
-
means for calling a method and passing a parameter to said method; means for determining if said parameter is a reference to a first type of object comprising an identification and one or more data items; means responsive to a determination that said parameter is a reference to said first type of object, for adjusting said reference to point to said data items and for passing the adjusted reference to said method as the parameter; means for determining if said parameter is a reference to a second type of object comprising an identification and an array of elements; and means responsive to a determination that said parameter is a reference to said second type of object, for adjusting said reference to point to said elements in said array and for passing the adjusted reference to said method as the parameter. - View Dependent Claims (8, 9)
-
-
10. In a computer, a system for marshaling object parameters for executing a method, comprising:
-
means for calling a method and passing a parameter to said method; means for determining if said parameter is a reference to a predetermined type of object comprising an identification and one or more data items; and means responsive to a determination that said parameter is a reference to said predetermined type of object, for adjusting said reference to point to said data items and for passing the adjusted reference to said method as the parameter. - View Dependent Claims (11, 12)
-
-
13. In a computer, a system for marshaling object parameters for executing a method, comprising:
-
means for calling a method and passing a parameter to said method; means for determining if said parameter is a reference to a predetermined type of object comprising an identification and an array of elements; and means responsive to a determination that said parameter is a reference to said predetermined type of object, for adjusting said reference to point to said elements in said array and for passing the adjusted reference to said method as the parameter. - View Dependent Claims (14)
-
-
15. A computer-readable medium containing a computer program which executes the following steps:
-
determining whether a parameter to be passed to a computer-implemented method is an object; if the parameter is an object, detecting whether the object is of a first type or a second type, in which the second type of object includes an array of elements; adjusting a reference to the object to refer directly to instance variables of the object when the object is detected to be of the first type; adjusting the reference to refer to the elements of the array for the object when the object is detected to be of the second type; and passing the adjusted reference to the method.
-
-
16. A computer-readable medium containing a computer program which executes the following steps:
-
calling a computer-implemented method and obtaining a parameter to be passed to the method; determining whether the parameter is a value or a reference to an object which contains data in addition to values; if the parameter is determined to be a reference to an object, adjusting said reference to refer directly to values of the object; and passing the adjusted reference to the method as the parameter.
-
Specification