IP Library Patent Application 11495293
Patent Application
App. No. 11/495,293

Process and apparatus for sharing inline caches

Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US None
App. No.
11/495,293
Abstract

A technique for dynamic dispatch involves adapting a method at a dispatch point to reference a state cache. State of the state cache may be associated with an object type and a method signature. When a method is adapted at the dispatch point to reference a state cache, the reference is to a state cache associated with a state that matches the method signature and the object type of the object dispatched upon. The state cache may be shared among multiple methods with similar associated states to reduce memory requirements.

Claims (41)

1 . A system, comprising:

an object, including a first method with an inline reference;

a state cache configured to invoke a second method, wherein when the first method is invoked the inline reference references the state cache, which invokes the second method.

2 . The system of claim 1 , said object further comprising an inline cache, wherein the inline cache includes the inline reference.

3 . The system of claim 1 , said state cache further comprising an inline cache having computer code associated with the second method.

4 . The system of claim 1 , further comprising a hash table of existing cache states.

5 . The system of claim 4 , wherein the hash table has a hash function of a class type and a signature of a method.

6 . The system of claim 4 , wherein the object is a first object, further comprising a second object without an inline reference, wherein the hash table is used to speed up dynamic dispatches for the second object.

7 . The system of claim 1 , wherein the object is a first object, further comprising a second object without an inline reference, wherein the second object invokes methods on objects of variable types.

8 . The system of claim 1 , further comprising a plurality of state caches, including the state cache, and a plurality of objects, including the object, wherein the number of cache states is less than the number of inline references.

9 . A system comprising:

a state cache, associated with an object type;

a plurality of methods with respective inline references to the state cache, wherein when a calling method of the plurality of methods is invoked, the calling method uses the inline reference to reference the state cache, which invokes a called method associated with the object type.

10 . A process, comprising:

instantiating an object, wherein the instance of the object includes a first method having a dispatch point to a second method;

invoking the first method;

calling the second method at the dispatch point;

intercepting the method call to the second method;

determining state;

adapting the first method to include at the dispatch point an inline reference to a state cache associated with said state.

11 . The process of claim 10 , wherein said state is associated with an object type and a method signature, and wherein said object has the object type and the first method has the method signature.

12 . The process of claim 10 , further comprising:

creating the state cache; and

associating the state cache with the second method.

13 . The process of claim 10 , further comprising:

searching existing state caches for the state cache, wherein each of the existing state caches is associated with a different state.

14 . A process, comprising:

invoking a first method that includes an inline cache pointing toward a cache state;

following the inline cache to the cache state;

invoking a second method from the cache state.

15 . The process of claim 14 , wherein the inline cache includes only a reference to the cache state.

16 . The process of claim 14 , further comprising performing method validation to ensure that state associated with the cache state is valid.

17 . The process of claim 14 , wherein the inline cache is a first inline cache, further comprising:

invoking a third method that includes a second inline cache pointing toward said cache state;

following the second inline cache to the cache state;

calling the second method from the cache state.

18 . The process of claim 14 , further comprising initializing the first method by including the inline cache.

19 . The process of claim 14 , wherein the inline cache is at a dispatch point, further comprising returning to the first method after the dispatch point.

20 . The process of claim 14 , wherein the cache state is a first cache state, further comprising:

determining state; and

updating the inline cache to point toward a second cache state according to the determined state.

Assignments (2)
CHANGE OF NAME Recorded Jul 7, 2009
From: ESMERTEC AG
To: MYRIAD GROUP AG
Reel/Frame 022917/0525 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 11, 2006
From: HEEB, BEAT
To: ESMERTEC AG
Reel/Frame 018376/0004 →