发明名称 |
Per-selector dispatch |
摘要 |
Aspects of the subject technology relate to a computer-implemented process, including steps for compiling a first method call at a first call site in code of an object-oriented language, wherein the first call site is associated with a first selector, referencing a global cache comprising a plurality of per-selector caches, wherein each of the per-selector caches is indexed based on a corresponding selector identification and identifying a first per-selector cache, from among the plurality of per-selector caches, using the first selector. In certain aspects, the process can further include steps for invoking a method on a first object by performing a lookup in the first per-selector cache using a class associated with the first object to determine if a first target function exists in the first per-selector cache. Systems and computer readable media are also provided. |
申请公布号 |
US9201797(B1) |
申请公布日期 |
2015.12.01 |
申请号 |
US201313895267 |
申请日期 |
2013.05.15 |
申请人 |
Google Inc. |
发明人 |
Egorov Vyacheslav;Millikin Kevin Scott;Mitrovic Srdjan;Posva Ivan;Schneider Florian |
分类号 |
G06F12/08;G06F9/45 |
主分类号 |
G06F12/08 |
代理机构 |
McDermott Will & Emery LLP |
代理人 |
McDermott Will & Emery LLP |
主权项 |
1. A computer-implemented method, comprising:
compiling a first method call at a first call site in code of an object-oriented language, wherein the first call site is associated with a first method selector; referencing a plurality of per-selector caches, each per-selector cache being associated with a respective method selector and available to multiple call sites that use the respective method selector, wherein each per-selector cache is configured to be searched based on a corresponding class identification when called from a respective call site; identifying a first per-selector cache, from among the plurality of per-selector caches, using the first method selector; and invoking a method on a first object by performing a lookup in the first per-selector cache using a class associated with the first object to determine if a first target function exists in the first per-selector cache. |
地址 |
Mountain View CA US |