IP Library › Granted Patent US 12,417,133
Granted Patent B2
US 12,417,133 · App. 17/571,340 · Granted Sep 16, 2025

Determining a resolution state of an anchor constant associated with an application programming interface (API) point

Inventors: John Robert Rose (San Jose, CA); Brian Goetz (Williston, VT)
Assignee: Oracle International Corporation
G06F9/547G06F8/41G06F8/437G06F9/30076G06F9/44521G06F9/44536G06F9/4488G06F9/4494G06F9/4498G06F9/451G06F9/45516G06F9/541G06F9/542G06F9/548G06F12/023G06F16/2272G06F16/2291G06F16/289
View Patent ↗
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 12,417,133
App. No.
17/571,340
Filed
Jan 7, 2022
Granted
Sep 16, 2025
Kind
B2
Art Unit
2194
USPC
719/328
Abstract

A parametric constant resolves to different values in different contexts, but a single value within a particular context. An anchor constant is a parametric constant that allows for a degree of parametricity for an API point. The context for the anchor constant is provided by a caller to the API point. The anchor constant resolves to an anchor value that records specialization decisions for the API point within the provided context. Specialization decisions may include type restrictions, memory layout, and/or memory size. The anchor value together with an unspecialized type of the API point result in a specialized type of the API point. A class object representing the specialized type is created. The class object may be accessible to the caller, but the full value of the anchor value is not accessible to the caller. The API point is executed based on the specialization decisions embodied in the anchor value.

Claims (82)

1. One or more non-transitory computer readable media storing instructions which, when executed by one or more hardware processors, cause:

identifying a first call to a first application programming interface (API) point;

determining that the first call to the first API point is made in association with a first selector value;

determining that the first API point depends on a parametric constant; and

executing a bootstrap method corresponding to the parametric constant, wherein executing the bootstrap method comprises:

determining whether the first selector value is valid with respect to the parametric constant;

responsive to determining that the first selector value is valid with respect to the parametric constant;

returning a first anchor value based on the first selector value; and

storing the first anchor value as a first resolved value for a first resolution state of the parametric constant.

2. The media of claim 1 , further storing instructions which cause:

determining whether the first selector value matches any resolved value for any resolution state of the parametric constant; and

wherein executing the bootstrap method is responsive to determining that the first selector value does not match any resolved value for any resolution state of the parametric constant.

3. The media of claim 1 , further storing instructions which cause:

determining that an operand associated with the first call to the first API point comprises a particular constant, wherein the first call is made from a caller type; and

storing, as a second resolved value for a second resolution state of the particular constant, (a) information indicating the first API point and (b) information indicating the first anchor value.

4. The media of claim 1 , wherein:

the first API point is a type;

the first anchor value indicates one or more of:

a first memory layout associated with a specialized type that is the type specialized based on the first anchor value;

a first memory size associated with the specialized type; and

an object that represents the specialized type.

5. The media of claim 1 , wherein:

the first API point is a field;

one or more of a type and a supertype of the type defines the field; one or more of the type and the supertype of the type specifies that an unspecialized type is associated with the field; and

the field is of a specialized type that is the unspecialized type specialized based on the first anchor value.

6. The media of claim 5 , wherein:

the first anchor value indicates a type restriction on the field; and

the type restriction prohibits a value, which is valid for the unspecialized type, for the field.

7. The media of claim 1 , wherein:

the first API point is a method;

one or more of a type and a supertype of the type defines the method;

one or more of the type and the supertype of the type specifies that an unspecialized type is associated with one or more of a method parameter and a method return value of the method; and

one or more of the method parameter and the method return value is of a specialized type that is the unspecialized type specialized based on the first anchor value.

8. The media of claim 7 , wherein:

the first anchor value indicates a type restriction on one or more of the method parameter and the method return value; and

the type restriction prohibits a value, which is valid for the unspecialized type, for one or more of the method parameter and the method return value.

9. The media of claim 1 , wherein the first anchor value indicates the first selector value.

10. The media of claim 1 , wherein:

the first anchor value indicates a default anchor value for the parametric constant;

the default anchor value is determined during preparation of a type defining the parametric constant; and

the first anchor value is determined (a) subsequent to the preparation of the type defining the parametric constant and (b) responsive to the first call to the first API point.

11. The media of claim 1 , further storing instructions which cause:

executing the first API point, responsive to the first call to the first API point, based on the first anchor value.

12. The media of claim 1 , wherein determining that the first API point depends on the parametric constant comprises:

determining that the first API point is associated with a parametric attribute comprising a parametric constant reference; and

determining that the parametric constant reference indicates the parametric constant.

13. The media of claim 1 , wherein:

the first call to the first API point comprises an instruction and an operand;

the operand is a linkage constant that is in an unresolved state; and

an information structure for the linkage constant indicates the first API point and the first selector value.

14. The media of claim 13 , further storing instructions comprising:

resolving a symbolic reference to the first API point prior to resolving the linkage constant.

15. The media of claim 13 , further storing instructions which cause:

storing a second resolved value for a second resolution state of the linkage constant that indicates the first anchor value.

16. The media of claim 1 , further storing instructions which cause:

identifying a second call to the first API point, wherein the second call to the first API point is made in association with a second selector value different than the first selector value; and

executing the bootstrap method associated with the parametric constant, wherein executing the bootstrap method comprises:

determining whether the second selector value is valid with respect to the parametric constant;

responsive to determining that the second selector value is valid with respect to the parametric constant;

returning a second anchor value based on the second selector value; storing the second anchor value as a second resolved value for a second resolution state of the parametric constant;

wherein the first selector value and the second selector value are different; and

wherein the first anchor value and the second anchor value are different.

17. The media of claim 1 , further storing instructions which cause:

identifying a second call to the first API point, wherein the second call to the first API point is made in association with a second selector value different than the first selector value;

determining that the first resolution state of the parametric constant, of a plurality of resolution states of the parametric constant, is further associated with the second selector value; and

executing the first API point, responsive to the second call to the first API point, based on the first anchor value that is the first resolved value for the first resolution state of the parametric constant.

18. The media of claim 1 , further storing instructions which cause:

identifying a second call to a second API point, wherein the second call to the second API point is made in association with the first selector value;

determining that the second API point depends on the parametric constant; determining that the first resolution state of the parametric constant is associated with the first selector value; and

executing the second API point, responsive to the second call to the second API point, based on the first anchor value that is the first resolved value for the first resolution state of the parametric constant.

19. The media of claim 1 , wherein the first anchor value is not accessible by a callee type making the first call to the first API point.

20. The media of claim 1 , wherein: the first API point is a class;

the first anchor value indicates an object representing a specialized class that is the class specialized based on the first anchor value; and

the object is accessible by a callee type making the first call to the first API point.

21. The media of claim 1 , wherein:

the first call to the first API point is associated with an operand; and

the operand is a linkage constant; no loadable value is associated with the linkage constant.

22. The media of claim 1 , wherein:

the first API point is a class;

the first call to the first API point is associated with an operand;

the operand is a linkage constant; a loadable value for the linkage constant indicates an object representing a specialized class that is the class specialized based on the first anchor value; and

the loadable value for the linkage constant is accessible by a callee type making the first call to the first API point.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 18, 2022
From: ROSE, JOHN ROBERT
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 058681/0682 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 10, 2022
From: GOETZ, BRIAN
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 058595/0363 →
Continuity (5)
Provisional Application 63163701 · Mar 19, 2021
Provisional Application 63163726 · Mar 19, 2021
Provisional Application 63163697 · Mar 19, 2021
Provisional Application 63163723 · Mar 19, 2021
Related Publication 20220300352A1 · Sep 22, 2022
References Cited (66)
US 8606806B2 · Baras et al. · 2013 [cited by applicant]
US 10929106B1 · Sridhar · 2021 [cited by applicant]
US 10983771B1 · Hegarty et al. · 2021 [cited by applicant]
US 11657432B2 · Bur et al. · 2023 [cited by applicant]
US 11972308B2 · Rose et al. · 2024 [cited by applicant]
US 20010013065A1 · Patki et al. · 2001 [cited by applicant]
US 20060080644A1 · Fuhrer et al. · 2006 [cited by applicant]
US 20060101032A1 · Sutter et al. · 2006 [cited by applicant]
US 20070006141A1 · Bracha et al. · 2007 [cited by applicant]
US 20070156845A1 · Devanneaux et al. · 2007 [cited by applicant]
US 20070245325A1 · Lapounov et al. · 2007 [cited by applicant]
US 20080157951A1 · Katrak et al. · 2008 [cited by applicant]
US 20090182760A1 · Box et al. · 2009 [cited by applicant]
US 20090251476A1 · Jiao et al. · 2009 [cited by applicant]
US 20100114843A1 · Farrar et al. · 2010 [cited by applicant]
US 20100146013A1 · Mather · 2010 [cited by applicant]
US 20100180269A1 · Stall et al. · 2010 [cited by applicant]
US 20110283263A1 · Gagliardi et al. · 2011 [cited by applicant]
US 20120166953A1 · Affronti et al. · 2012 [cited by applicant]
US 20120191690A1 · George · 2012 [cited by applicant]
US 20130042235A1 · Burka · 2013 [cited by examiner]
US 20130067155A1 · Bates et al. · 2013 [cited by applicant]
US 20130080736A1 · Meirowitz et al. · 2013 [cited by applicant]
US 20150277899A1 · Hamby et al. · 2015 [cited by applicant]
US 20150301809A1 · Goetz et al. · 2015 [cited by applicant]
US 20150301840A1 · Goetz et al. · 2015 [cited by applicant]
US 20160094625A1 · Sengodan et al. · 2016 [cited by applicant]
US 20160162924A1 · Rathod · 2016 [cited by applicant]
US 20160196114A1 · Ogata · 2016 [cited by examiner]
US 20160357586A1 · Rose · 2016 [cited by examiner]
US 20170039043A1 · Haupt et al. · 2017 [cited by applicant]
US 20170116007A1 · Cimadamore et al. · 2017 [cited by applicant]
US 20170123771A1 · Smith · 2017 [cited by applicant]
US 20180018151A1 · Goetz et al. · 2018 [cited by applicant]
US 20180150495A1 · Hoff et al. · 2018 [cited by applicant]
US 20180189086A1 · Queva et al. · 2018 [cited by applicant]
US 20180268158A1 · Bateman et al. · 2018 [cited by applicant]
US 20180285361A1 · Buckley · 2018 [cited by examiner]
US 20180293058A1 · Bierman et al. · 2018 [cited by applicant]
US 20180350180A1 · Onischuk · 2018 [cited by applicant]
US 20190034178A1 · Goetz · 2019 [cited by examiner]
US 20190073227A1 · Zhong · 2019 [cited by applicant]
US 20190146817A1 · Tirumala et al. · 2019 [cited by applicant]
US 20200019423A1 · Marks et al. · 2020 [cited by applicant]
US 20200026530A1 · Rose · 2020 [cited by examiner]
US 20200225933A1 · Singh · 2020 [cited by applicant]
US 20210240619A1 · Earnshaw · 2021 [cited by applicant]
US 20220067105A1 · Vodovotz et al. · 2022 [cited by applicant]
EP 1533696A2 · 2005 [cited by applicant]
EP 1588235A2 · 2005 [cited by applicant]
EP 1640859A2 · 2006 [cited by applicant]
WO 2004068292A2 · 2004 [cited by applicant]
WO 2015164438A1 · 2015 [cited by applicant]
“clojure.spec—Rationale and Overview,” Retrieved at https://clojure.org/about/spec, Retrieved on Jan. 17, 2022, pp. 1-15. [cited by applicant]
“Common Descriptor Concepts,” Retrieved at https://www.eclipse.org/eclipselink/documentation/2.6/concepts/descriptors001.htm, Retrieved on Oct. 31, 2017, pp. 1-6. [cited by applicant]
“JEP 218: Generics over Primitive Types” Retrieved at https://openjdk.java.net/jeps/218, Retrieved on 2022, pp. 1-4. [cited by applicant]
“Project Valhalla” Retrieved at https://openjdk.java.net/projects/valhalla/, Retrieved on Dec. 2021, pp. 1-3. [cited by applicant]
“Statically typed Javascript : Why and How,” Retrieved at https://developerhowto.com/2019/01/05/statically-typed-javascript-why-and-how/, Retrieved on Jan. 2019, pp. 1-6. [cited by applicant]
“Template Classes in the VM” Retrieved at http://cr.openjdk.java.net/˜jrose/values/template-classes.html, Retrieved on Nov. 2017, pp. 1-15. [cited by applicant]
Buckle N., “Restricted data types, specification and enforcement of invariant properties of variables,” ACM SIGPLAN Notices, vol. 12, Issue 3, Mar. 1977, pp. 68-76. [cited by applicant]
Cimadamore I, M., “Constructs and Applications of Generic Programming in Object-Oriented Languages,” University of Bologna, 2010, pp. 208. [cited by applicant]
Kennedy A., et al., “Design and Implementation of Generics for the .NET Common Language Runtime,” ACM SIGPLAN Notices, vol. 36, Issue 5, May 2001, pp. 1-12. [cited by applicant]
Malabarba S, et al., “Runtime Support for Type-Safe Dynamic Java Classes,” Lecture Notes in Computer Science, vol. 1850, 2000, pp. 337-361. [cited by applicant]
Rose J., “Template Class Challenges” Retrieved at http://cr.openjdk.java.net/˜jrose/values/Templates-2019-0325.pdf, Retrieved on Mar. 2019, pp. 1-16. [cited by applicant]
Rose J., “The Saga of the Parametric VM,” Retrieved at http://rosehome.org/work/pvm20211216/parametric-vm.pdf, Retrieved on Jan. 2021, pp. 1-33. [cited by applicant]
Wikipedia., “Entity-relationship model,” Retrieved at https://en.wikipedia.org/wiki/Entity%E2%80%93relationship_model, Retrieved on Dec. 2021, pp. 1-12. [cited by applicant]