US 12,321,269 B2
Techniques for runtime protocol conformance cache for third party
Mohamadou A. Abdoulaye, San Francisco, CA (US); Peter Cooper, San Jose, CA (US); Michael J. Ash, McLean, VA (US); Davide Italiano, San Francisco, CA (US); and Nick Kledzik, Cupertino, CA (US)
Assigned to Apple Inc., Cupertino, CA (US)
Filed by APPLE INC., Cupertino, CA (US)
Filed on Dec. 20, 2022, as Appl. No. 18/085,475.
Claims priority of provisional application 63/365,872, filed on Jun. 5, 2022.
Prior Publication US 2023/0393980 A1, Dec. 7, 2023
Int. Cl. G06F 12/0802 (2016.01); G06F 16/22 (2019.01)
CPC G06F 12/0802 (2013.01) [G06F 16/2272 (2019.01); G06F 2212/603 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A method performed by an electronic device, the method comprising:
receiving, for an application or run-time, a first request for a conformance check for a conformance pair, the conformance pair include a variable type and a particular protocol of a programming language of the application or run-time, the first request identifying a first pointer;
determining, using the variable type and the particular protocol as a cache key, that a conformance check result is not cached for the conformance pair using the first pointer;
in response to determining that the conformance check result is not cached for a variable, performing the conformance check for the conformance pair and storing a result of the conformance check in an index table in persistent cache in association with a predetermined number of low bits in the first pointer;
receiving a second request for the conformance check for the conformance pair, the second request including a second pointer;
determining, using the cache key, that the conformance check result is cached in the persistent cache for the conformance pair;
in response to determining that the conformance check result is cached for the conformance pair, retrieving the conformance check result from the index table in the persistent cache, wherein retrieving the conformance check result uses the predetermined number of low bits in the second pointer; and
launching the application or run-time subject to the conformance check result.