Executing a parametric method within a specialized context

US11726849B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-11726849-B2
Application numberUS-202217571343-A
CountryUS
Kind codeB2
Filing dateJan 7, 2022
Priority dateMar 19, 2021
Publication dateAug 15, 2023
Grant dateAug 15, 2023

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

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.

First claim

Opening claim text (preview).

What is claimed is: 1. One or more non-transitory computer readable media storing instructions which, when executed by one or more hardware processors, cause: while within a first stack frame, on a call stack, corresponding to a first execution of a first caller method: identifying a first invocation instruction to invoke a callee method within a first context; wherein a first type restriction is applied on one or more of a method parameter and a method return value of the callee method within the first context, and the first type restriction prohibits a first value for one or more of the method parameter and the method return value; responsive to identifying the first invocation instruction: pushing a second stack frame, onto the call stack, corresponding to a second execution of the callee method responsive to the first invocation instruction; passing information representing the first context from the first stack frame to the second stack frame; while within the second stack frame, on the call stack, corresponding to the second execution of the callee method: processing one or more of the method parameter and the method return value based on the first type restriction that is applied within the first context; while within a third stack frame, on the call stack, corresponding to a third execution of a second caller method: identifying a second invocation instruction to invoke the callee method within a second context; wherein a second type restriction is applied on one or more of the method parameter and the method return value within the second context, the second type restriction prohibits a second value for one or more of the method parameter and the method return value, and the first type restriction and the second type restriction are different; responsive to identifying the second invocation instruction: pushing a fourth stack frame, onto the call stack, corresponding to a fourth execution of the callee method responsive to the second invocation instruction; passing information representing the second context from the third stack frame to the fourth stack frame; while within the fourth stack frame, on the call stack, corresponding to the fourth execution of the callee method: processing one or more of the method parameter and the method return value based on the second type restriction that is applied within the second context. 2. The media of claim 1 , further storing instructions which cause: determining that the callee method depends on a parametric constant; wherein a first anchor value resolved for the parametric constant within the first context indicates the first type restriction; wherein a second anchor value resolved for the parametric constant within the second context indicates the second type restriction. 3. The media of claim 1 , wherein processing one or more of the method parameter and the method return value based on the first type restriction that is applied within the first context comprises: identifying a first argument to the callee method to be executed responsive to the first invocation instruction; casting the first argument to conform to the first type restriction on the method parameter; inputting the casted first argument to the callee method. 4. The media of claim 3 , wherein processing one or more of the method parameter and the method return value based on the second type restriction that is applied within the second context comprises: identifying a second argument to the callee method to be executed responsive to the second invocation instruction; casting the second argument to conform to the second type restriction on the method parameter; inputting the casted second argument to the callee method. 5. The media of claim 1 , wherein processing one or more of the method parameter and the method return value based on the first type restriction that is applied within the first context comprises: identifying a first argument to the callee method to be executed responsive to the first invocation instruction; performing type checking to verify whether the first argument conforms to the first type restriction on the method parameter; responsive to determining that the first argument does not conform to the first type restriction: generating a first error. 6. The media of claim 1 , wherein: processing one or more of the method parameter and the method return value based on the first type restriction that is applied within the first context comprises: identifying a first argument to the callee method to be executed responsive to the first invocation instruction; inlining the first argument onto a first operand stack associated with the second stack frame; processing one or more of the method parameter and the method return value based on the second type restriction that is applied within the second context comprises: identifying a second argument to the callee method to be executed responsive to the second invocation instruction; pushing a reference to the second argument onto a second operand stack associated with the fourth stack frame. 7. The media of claim 1 , wherein: processing one or more of the method parameter and the method return value based on the first type restriction that is applied within the first context comprises: identifying a first argument to the callee method to be executed responsive to the first invocation instruction; determining a first memory size for the first argument; allocating the first memory size for first argument in one or more of (a) a first set of one or more local variables associated with the second stack frame and (b) a first operand stack associated with the second stack frame; processing one or more of the method parameter and the method return value based on the second type restriction that is applied within the second context comprises: identifying a second argument to the callee method to be executed responsive to the second invocation instruction; determining a second memory size for the second argument, wherein the first memory size and the second memory size are different; allocating the second memory size for second argument in one or more of (a) a second set of one or more local variables associated with the fourth stack frame and (b) a second operand stack associated with the fourth stack frame. 8. The media of claim 1 , wherein processing one or more of the method parameter and the method return value based on the first type restriction that is applied within the first context comprises: identifying a first return value returned from the callee method executed responsive to the first invocation instruction; casting the first return value to conform to the first type restriction on the method return value; returning the casted first return value to the first caller method. 9. The media of claim 8 , wherein processing one or more of the method parameter and the method return value based on the second type restriction that is applied within the second context comprises: identifying a second return value returned from the callee method executed responsive to the second invocation instruction; casting the second return value to conform to the second type restriction on the method return value; returning the casted second return value to the second caller method. 10. The media of claim 1 , wherein processing one or more of the method parameter and the method return value based on the first type restriction that is applied within the first context comprises: identifying a first return value returned from the callee method executed responsive to the first invocation instruction; performing type checking to verify whether the first return value conforms to the first typ

Assignees

Inventors

Classifications

  • G06F9/547Primary

    Remote procedure calls [RPC]; Web services · CPC title

  • Compilation · CPC title

  • G06F8/437Primary

    Type checking · CPC title

  • to perform miscellaneous control operations, e.g. NOP · CPC title

  • Object-oriented · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US11726849B2 cover?
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…
Who is the assignee on this patent?
Oracle Int Corp
What technology area does this patent fall under?
Primary CPC classification G06F9/547. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Aug 15 2023 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 12 related publications on this page (citations in our corpus or others sharing the same primary CPC).