Variable handles

US9690709B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-9690709-B2
Application numberUS-201514681017-A
CountryUS
Kind codeB2
Filing dateApr 7, 2015
Priority dateJul 14, 2014
Publication dateJun 27, 2017
Grant dateJun 27, 2017

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.

According to one technique, a virtual machine identifies a first instruction to create a variable handle instance, the first instruction including declaration information that identifies a type of receiver and a variable held by the receiver to which the variable handle instance is configured to provide access. If access to the variable is permissible, the virtual machine creates the variable handle instance comprising constrained functions configured to execute constrained operations on a memory location of the variable. The virtual machine identifies a second instruction that specifies a call to a particular constrained, wherein the second instruction specifies the receiver or is implicitly bound to the receiver. The virtual machine identifies a particular memory location where the instance of the variable is stored and performs the particular constrained function with respect to the particular memory location.

First claim

Opening claim text (preview).

What is claimed is: 1. A method comprising: identifying a first instruction to create a variable handle instance, the first instruction including declaration information that identifies a type of a receiver and a variable held by the receiver to which the variable handle instance is configured to provide access, wherein the first instruction is received from an acting class; responsive to the first instruction, and based on the declaration information, performing one or more checks to determine whether access to the variable by the acting class is permissible; in response to a determination that access to the variable is permissible, creating the variable handle instance, the variable handle instance comprising one or more constrained functions configured to execute one or more constrained operations on a memory location of the variable, wherein the one or more constrained operations include one or more of: atomic operations or memory fenced operations; identifying a second instruction that specifies a call to a particular constrained function of the one or more constrained functions of the variable handle instance, wherein the second instruction indicates the receiver; and identifying a particular memory location where the variable is stored and causing performance of the particular constrained function with respect to the particular memory location. 2. The method of claim 1 , wherein the receiver is a class and the variable is a static field held by the class, the receiver is a class instance and the variable is a field held by the class instance, the receiver is an array and the variable is an element of the array, or the receiver is a reference to an off-heap or direct memory location representing the variable. 3. The method of claim 1 , wherein the first instruction calls a lookup function that causes the variable handle instance to store an offset of the variable within the receiver and binds the one or more constrained functions of the variable handle instance to one or more descriptors that identify a type of the receiver and a type of the variable. 4. The method of claim 1 , wherein the method is performed by a virtual machine managing a first memory area and the variable is stored in a second memory area that is external to the first memory area managed by the virtual machine. 5. The method of claim 1 , further comprising: identifying a third instruction that specifies a second call to a second particular constrained function of the one or more constrained functions of the variable handle instance, the third instruction specifying a second receiver that shares the type of the receiver; and identifying a second particular memory location where the variable is held by the second receiver and causing performance of the second particular constrained function with respect to the second particular memory location. 6. The method of claim 1 , wherein the method is performed by a virtual machine and the virtual machine performs the one or more constrained operations by generating machine code instructions supported by hardware upon which the virtual machine is executing. 7. The method of claim 6 , wherein the one or more constrained operations include at least one constrained operation that is not natively supported by the hardware and further comprising synthesizing the constrained operation using a collection of machine code instructions supported by the hardware. 8. The method of claim 1 , wherein the one or more constrained operations perform one or more of: relaxed operations, volatile operations, lazy operations, compare-and-set operations, or get-and-set operations. 9. The method of claim 1 , wherein the second instruction comprises one or more parameters for the particular constrained function and the one or more parameters include one or more of: an array index into the the receiver at which the variable is located or a value to store to the particular memory location of the variable. 10. The method of claim 1 , further comprising: performing a check to ensure that the the receiver specified by the second instruction matches the type of the receiver identified by the declaration information. 11. The method of claim 1 , wherein causing performance of the particular constrained function with respect to the particular memory location comprises calling a function that interacts with arbitrary memory locations via one or more hardware instructions. 12. The method of claim 11 , wherein the function that interacts with arbitrary memory locations does not perform type checking. 13. The method of claim 1 , wherein the one or more constrained functions of the variable handle instance include functions corresponding to one or more atomic arithmetic operations. 14. The method of claim 1 , wherein the variable handle instance is derived from a variable handle sub-class that extends an abstract variable handle class, the abstract variable handle class providing one or more interfaces for the one or more constrained functions and the variable handle sub-class implementing the one or more constrained functions with respect to a particular access type. 15. The method of claim 14 , further comprising: in response to a determination that the particular constrained function called by the second instruction is signature polymorphic, automatically invoking a predefined function based on a descriptor of a reference representing the call to the particular constrained function, wherein the predefined function performs a type check and invokes the particular constrained function of the variable handle instance. 16. A non-transitory computer-readable medium storing one or more instructions which, when executed by one or more processors, cause the one or more processors to perform steps comprising: identifying a first instruction to create a variable handle instance, the first instruction including declaration information that identifies a type of a receiver and a variable held by the receiver to which the variable handle instance is configured to provide access, wherein the first instruction is received from an acting class; responsive to the first instruction, and based on the declaration information, performing one or more checks to determine whether access to the variable by the acting class is permissible; in response to a determination that access to the variable is permissible, creating the variable handle instance, the variable handle instance comprising one or more constrained functions configured to execute one or more constrained operations on a memory location of the variable, wherein the one or more constrained operations include one or more of: atomic operations or memory fenced operations; identifying a second instruction that specifies a call to a particular constrained function of the one or more constrained functions of the variable handle instance, wherein the second instruction indicates the receiver; and identifying a particular memory location where the variable is stored and causing performance of the particular constrained function with respect to the particular memory location. 17. The non-transitory computer-readable medium of claim 16 , wherein the receiver is a class and the variable is a static field held by the class, the receiver is a class instance and the variable is a field held by the class instance, the receiver is an array and the variable is an element of the array, or the receiver is a reference to an off-heap or direct memory location representing the variable. 18. The non-transitory computer-readable medium of claim 16 , wherein the fir

Assignees

Inventors

Classifications

  • Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators · CPC title

  • Instruction analysis, e.g. decoding, instruction word fields · CPC title

  • Command handling arrangements, e.g. command buffers, queues, command scheduling · CPC title

  • Instruction code · CPC title

  • by checking the subject access rights · 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 US9690709B2 cover?
According to one technique, a virtual machine identifies a first instruction to create a variable handle instance, the first instruction including declaration information that identifies a type of receiver and a variable held by the receiver to which the variable handle instance is configured to provide access. If access to the variable is permissible, the virtual machine creates the variable h…
Who is the assignee on this patent?
Oracle Int Corp
What technology area does this patent fall under?
Primary CPC classification G06F9/45504. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Jun 27 2017 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 1 related publication on this page (citations in our corpus or others sharing the same primary CPC).