Linking of virtual methods
First Claim
Patent Images
1. A method f or linking a virtual method, the method comprising:
- receiving a program comprising a plurality of program units;
enumerating classes of said program;
determining whether a virtual method of said program has been overridden at least once;
creating a virtual method jump table, indexed by a type indicator, for said virtual method said virtual method has been overridden, wherein when said virtual method has been overridden, said table comprising at least one entry comprising an address of a virtual method instance of said virtual method in a class and another entry comprising an another address for another instance of said virtual method in a subclass of said class and further wherein said virtual method instance of said virtual method has been overwritten by said another instance of said virtual method; and
rewriting a first at least one call instruction that calls said virtual method to include the type indicator of a called object wherein said called object comprises said another instance of said virtual method and so obviates a need to perform an exhaustive search for the another instance of said virtual method.
2 Assignments
0 Petitions
Accused Products
Abstract
Linking a virtual method comprises receiving a program comprising multiple program units, enumerating classes of the program, determining whether a virtual method of the program has been overridden at least once, creating a virtual method jump table indexed by a type indicator if the virtual method has been overridden and rewriting at least one call instruction that calls the virtual method. The at least one call instruction is rewritten to include the type indicator of a called object. The table comprises at least one entry including an address of a virtual method.
-
Citations
27 Claims
-
1. A method f or linking a virtual method, the method comprising:
-
receiving a program comprising a plurality of program units; enumerating classes of said program; determining whether a virtual method of said program has been overridden at least once; creating a virtual method jump table, indexed by a type indicator, for said virtual method said virtual method has been overridden, wherein when said virtual method has been overridden, said table comprising at least one entry comprising an address of a virtual method instance of said virtual method in a class and another entry comprising an another address for another instance of said virtual method in a subclass of said class and further wherein said virtual method instance of said virtual method has been overwritten by said another instance of said virtual method; and rewriting a first at least one call instruction that calls said virtual method to include the type indicator of a called object wherein said called object comprises said another instance of said virtual method and so obviates a need to perform an exhaustive search for the another instance of said virtual method. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A method for linking a virtual method, the method comprising:
-
receiving a program comprising a plurality of program units; step for enumerating classes of said program; step for determining whether a virtual method of said program has been overridden at least once; step for creating a virtual method jump table, indexed by a type indicator, for said virtual method when said virtual method has been overridden, wherein when said virtual method has been overridden, said table comprising at least one entry comprising an address of a virtual method instance of said virtual method in a class and another entry comprising an another address for another instance of said virtual method in a subclass of said class and further wherein said virtual method instance of said virtual method has been overwritten by said another instance of said virtual method; and step for rewriting a first at least one call instruction that calls said virtual method to include the type indicator of a called object wherein said called object comprises said another instance of said virtual method and so obviates a need to perform an exhaustive search for the another instance of said virtual method. - View Dependent Claims (7, 8, 9, 10)
-
-
11. A program storage device readable by a machine, embodying a program of instructions executable by the machine to perform a method for linking a virtual method, the method comprising:
-
receiving a program comprising a plurality of program units; enumerating classes of said program; determining whether a virtual method of said program has been overridden at least once; creating a virtual method jump table, indexed by a type indicator, for said virtual method when said virtual method has been overridden, wherein when said virtual method has been overridden, said table comprising at least one entry comprising an address of a virtual method instance of said virtual method in a class and another entry comprising an another address for another instance of said virtual method in a subclass of said class and further wherein said virtual method instance of said virtual method has been overwritten by said another instance of said virtual method; and rewriting a first at least one call instruction that calls said virtual method to include the type indicator of a called object wherein said called object comprises said another instance of said virtual method and so obviates a need to perform an exhaustive search for the another instance of said virtual method. - View Dependent Claims (12, 13, 14, 15)
-
-
16. An apparatus for linking a virtual method, the apparatus comprising:
-
means for receiving a program comprising a plurality of program units; means for enumerating classes of said program; means for determining whether a virtual method of said program has been overridden at least once; means for creating a virtual method jump table, indexed by a type indicator, for said virtual method when said virtual method has been overridden, wherein when said virtual method has been overridden, said table comprising at least one entry comprising an address of a virtual method instance of said virtual method in a class and another entry comprising an another address for another instance of said virtual method in a subclass of said class and further wherein said virtual method instance of said virtual method has been overwritten by said another instance of said virtual method; and means for rewriting a first at least one call instruction that calls said virtual method to include the type indicator of a called object wherein said called object comprises said another instance of said virtual method and so obviates a need to perform an exhaustive search for the another instance of said virtual method. - View Dependent Claims (17, 18, 19, 20)
-
-
21. An apparatus for linking a virtual method, the apparatus comprising:
-
a memory for storing a program comprising a plurality of program units; and a pre-processor configured to; enumerate classes of said program; determine whether a virtual method of said program has been overridden at least once; create a virtual method jump table, indexed by a type indicator, for said virtual method when said virtual method has been overridden, wherein when said virtual method has been overridden, said table comprising at least one entry comprising an address of a virtual method instance of said virtual method in a class and another entry comprising an another address for another instance of said virtual method in a subclass of said class and further wherein said virtual method instance of said virtual method has been overwritten by said another instance of said virtual method; and rewrite a first at least one call instruction that calls said virtual method to include the type indicator of a called object wherein said called object comprises said another instance of said virtual method and so obviates a need to perform an exhaustive search for the another instance of said virtual method. - View Dependent Claims (22, 23, 24, 25)
-
-
26. A memory for storing data for access by an application program being executed on a data processing system, comprising:
a data structure stored in said memory, said data structure including information used by said program to resolve references between executable code segments, said data structure comprising a plurality of executable code segments, at least one of said executable code segments including a reference to a virtual method, said reference including a type indicator, said type indicator for use determining which instance of a virtual method to call, from a plurality of instances of said virtual method, upon execution of said at least one executable code segment, wherein at least one instance in said plurality of instances is in a class and another instance in said plurality of instances is in a subclass of said class and further wherein said at least one instance has been overwritten by said another instance.
-
27. A memory for storing data for access by an application program being executed on a data processing system, comprising:
a data structure stored in said memory, said data structure including information used by said program to resolve references between executable code segments, said data structure comprising a plurality of virtual method addresses, said data structure for use in determining which instance of a virtual method from a plurality of instances of said virtual method is called upon execution of said at least one executable code segment including a reference to a virtual method, said reference including a type indicator, said type indicator used as an index into said data structure wherein at least one address in said plurality of virtual method addresses is for an instance of said virtual method in a class and another address in said plurality of virtual method addresses is for another instance of said virtual method in a subclass of said class and further wherein said instance of said virtual method has been overwritten by said another instance of said virtual method.
Specification