Supporting dynamic behavior in statically compiled programs

US9836290B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-9836290-B2
Application numberUS-201615010936-A
CountryUS
Kind codeB2
Filing dateJan 29, 2016
Priority dateMar 27, 2014
Publication dateDec 5, 2017
Grant dateDec 5, 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.

Support for dynamic behavior is provided during static compilation while reducing reliance on JIT compilation and large runtimes. A mapping is created between metadata and native code runtime artifacts, such as between type definition metadata and a runtime type description, or between method definition metadata, a runtime type description, and a native code method location, or field definition metadata, a runtime type description, and a field location. A mapping between runtime artifacts may also be created. Some compilation results include trampoline code to support a reflection invocation of an artifact in the reduced runtime support environment, for virtual method calls, call-time bounds checking, calling convention conversion, or compiler-intrinsic methods. Some results support runtime diagnostics by including certain metadata even when full dynamic behavior is not supported.

First claim

Opening claim text (preview).

What is claimed is: 1. A computer system comprising: a logical processor; a memory in operable communication with the logical processor; a reduced size runtime which resides in the memory and is executable with the logical processor, the reduced size runtime functioning as a replacement for a larger runtime R, the reduced size runtime occupying less nonvolatile storage space than the larger runtime R as a result of containing less metadata than the larger runtime R, wherein metadata includes one or more of the following: a type name, a type member name, a type layout for garbage collection purposes, or a type member layout for garbage collection purposes; and at least one of the following dynamic support structures in the memory and outside of the reduced size runtime: a mapping between metadata and at least one native code runtime artifact; a mapping between runtime type descriptions, each runtime type description including at least one of the following: a list of implemented interfaces for a type which is in an execution scope of a compiled computer program, or a garbage collection layout for a type which is in an execution scope of the compiled computer program; or at least one piece of code which upon execution supports a reflection invocation of an artifact of the compiled computer program. 2. The system of claim 1 , further comprising a compiled application program residing in the memory, wherein full execution of the compiled application program with the reduced size runtime does not require any use of just-in-time compilation. 3. The system of claim 1 , further comprising a compiled application program residing in the memory, wherein the reduced size runtime is a minimal runtime for the compiled application program in that error-free execution of the compiled application program with the reduced size runtime does not require any metadata from outside an execution scope of the compiled application program. 4. The system of claim 1 , wherein the system comprises a smartphone. 5. The system of claim 1 , wherein the system comprises at least one of the following: a tablet, a laptop having a removable tablet. 6. The system of claim 1 , wherein the system comprises at least two of the dynamic support structures in the memory and outside of the reduced size runtime. 7. The system of claim 1 , further comprising at least one of the following items built with metadata in the system which resides outside the reduced size runtime: a garbage collection descriptor for a type; or a garbage collection code for reclaiming memory used by a type. 8. The system of claim 1 , wherein: the reduced size runtime includes metadata which supports execution of the reduced size runtime itself; the reduced size runtime exports a functionality set which is supported by metadata within the reduced size runtime that implements one or more of the following functionalities: type identity, vtable, interface mapping table, and type attributes including whether a type is an array; and the reduced size runtime is free of other metadata. 9. A software execution process supporting dynamic behavior of a statically compiled computer program in a reduced runtime support environment, the process comprising the steps of: running at least a portion of the computer program in the reduced runtime support environment, the reduced size runtime functioning as a replacement for a larger runtime R, the reduced size runtime occupying less nonvolatile storage space than the larger runtime R as a result of containing less metadata than the larger runtime R, wherein metadata includes one or more of the following: a type name, a type member name, a type layout for garbage collection purposes, or a type member layout for garbage collection purposes; and utilizing at least one of the following dynamic support structures: a mapping between metadata and at least one native code runtime artifact; a mapping between runtime type descriptions, each runtime type description including at least one of the following: a list of implemented interfaces for a type which is in an execution scope of the compiled computer program, or a garbage collection layout for a type which is in an execution scope of the compiled computer program; or at least one piece of code which upon execution supports a reflection invocation of an artifact of the compiled computer program. 10. The process of claim 9 , further comprising using a mechanism of the reduced size runtime to look up a metadata blob by ID, the metadata blob containing at least some contents which are not processed by the reduced size runtime. 11. The process of claim 9 , wherein utilizing a mapping between metadata and at least one native code runtime artifact comprises utilizing at least one of the following: a mapping between type definition metadata and a runtime type description; a mapping between method definition metadata, a runtime type description, and a location of native code for a method in the statically compiled computer program; or a mapping between field definition metadata, a runtime type description, and a location of a field in the statically compiled computer program. 12. The process of claim 9 , wherein utilizing a mapping between runtime type descriptions comprises utilizing at least one of the following: a mapping between a generic type instance, a runtime type definition description, and a runtime type argument description; a mapping between a runtime array description, and a runtime array element description; or a mapping between a location of native code for a static type initialization in the statically compiled computer program, and a runtime type description. 13. The process of claim 9 , wherein utilizing at least one piece of code which upon execution supports a reflection invocation comprises utilizing at least one of the following: a piece of code which performs a dynamically dispatched method call; a piece of code which performs a call-time bounds check; a piece of code which performs a calling convention conversion; or a piece of code which represents a compiler-intrinsic method that is inlined during compilation. 14. The process of claim 9 , comprising completing an execution of the computer program in the reduced runtime support environment without any use of just-in-time compilation. 15. The process of claim 9 , comprising supporting a runtime diagnostic using a method name which is included within metadata of the statically compiled computer program when the statically compiled computer program metadata excludes any native code for the method. 16. The process of claim 9 , comprising supporting a runtime diagnostic using a type name which is included within metadata of the statically compiled computer program when the statically compiled computer program metadata excludes any native reflection code for the type. 17. A computer-readable storage medium configured with data and with instructions that when executed by at least one processor performs a technical process for supporting dynamic behavior of a statically compiled computer program in a reduced runtime support environment, the process comprising the steps of: running at least a portion of the computer program in the reduced runtime support environment, the reduced size runtime functioning as a replacement for a larger runtime R, the reduced size runtime occupying less nonvolatile storage space than the larger runtime R as a result of containing less metadata than the larger runtime R, wherein metadata includes one or more of the following: a type name, a type member nam

Assignees

Inventors

Classifications

  • Reducing the execution time required by the program code · CPC title

  • G06F8/49Primary

    Partial evaluation · CPC title

  • G06F8/4434Primary

    Reducing the memory space required by the program code · CPC title

  • Synchronisation, e.g. post-wait, barriers, locks (synchronisation among tasks G06F9/52) · 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 US9836290B2 cover?
Support for dynamic behavior is provided during static compilation while reducing reliance on JIT compilation and large runtimes. A mapping is created between metadata and native code runtime artifacts, such as between type definition metadata and a runtime type description, or between method definition metadata, a runtime type description, and a native code method location, or field definition…
Who is the assignee on this patent?
Microsoft Technology Licensing Llc, Microsoft Technology Licensing Llc
What technology area does this patent fall under?
Primary CPC classification G06F8/49. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Dec 05 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 2 related publications on this page (citations in our corpus or others sharing the same primary CPC).