Dynamic code generation and memory management for component object model data constructs

US9342274B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-9342274-B2
Application numberUS-201113111927-A
CountryUS
Kind codeB2
Filing dateMay 19, 2011
Priority dateMay 19, 2011
Publication dateMay 17, 2016
Grant dateMay 17, 2016

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.

Dynamic code generation and memory management techniques are provided for component object model (COM) objects with corresponding representations in script code and native code. A browser component can receive script code including the code representing the COM object and a marshaling component is provided that marshals, based on a request for native code representing the COM object, the code representing the COM object to the native code based on a pre-constructed intermediate data structure. The pre-constructed intermediate data structure, such as a virtual table, is pre-constructed based on a dynamic type representation associated with a prototype of the COM object and cached for re-use by the marshaling component. Other embodiments provide finalizer support for memory management of COM objects having script and native world representations including an implementation of a two-phase commit protocol that enables efficient and conservative recycling of objects and associated memory.

First claim

Opening claim text (preview).

What is claimed is: 1. A method, comprising: receiving, by a browser application of a computing device, script code including receiving code representing a component object model (COM) object; generating a prototype of the COM object including generating a type representation including at least one dynamic type associated with the COM object; by a marshaling component of the computing device, prior to a request for native code representing the COM object, in response to identifying a request for at least one intermediate data structure, dynamically generate the at least one intermediate data structure tailored for dynamic COM object translation between the script code and the native code, the at least one intermediate data structure generated based on the at least one dynamic type associated with the prototype of the COM object; and in response to the request for native code representing the COM object, marshaling, by the marshaling component of the computing device, the code representing the COM object to the native code based on the at least one intermediate data construct. 2. The method of claim 1 , further comprising: by the marshaling component of the computing device, retrieving the at least one intermediate data structure from a cache memory in response to identifying the request for the at least one intermediate data structure. 3. The method of claim 1 , further comprising: by the marshaling component of the computing device, accessing the at least one intermediate data structure from a pre-stored set of intermediate data structures previously generated based on the script code. 4. The method of claim 1 , further comprising: generating a virtual table based on a type of the at least one dynamic type; and caching the virtual table generated for the type for re-use. 5. The method of claim 1 , further comprising: determining that a virtual table for a given type of the at least one dynamic type is not pre-stored; and dynamically generating the virtual table for handling the marshaling in response to the determining that the virtual table is not pre-stored. 6. The method of claim 1 , further comprising: determining that a virtual table for a given type of the at least one dynamic type is pre-stored; and accessing the virtual table for handling the marshaling in response to the determining that the virtual table is pre-stored. 7. A computing device, comprising: a memory having computer executable components stored thereon; and a processor communicatively coupled to the memory, the processor configured to facilitate execution of the computer executable components, the computer executable components comprising: a browser component configured to receive script code including code representing a component object model (COM) object; and a marshaling component configured to, prior to a request for native code representing the COM object, in response to identifying a request for a pre-constructed intermediate data structure, dynamically generate the pre-constructed intermediate data structure tailored for dynamic COM object translation between the script code and the native code, the pre-constructed intermediate data structure generated based on a dynamic type associated with a prototype of the COM object, the marshaling component further configured to marshal, based on the request for native code representing the COM object, the code representing the COM object to the native code based on the pre-constructed intermediate data structure of a set intermediate data structures, the pre-constructed intermediate data structure cached for re-use by the marshaling component. 8. The computing device of claim 7 , wherein the marshaling component is further configured to dynamically generate at least one other intermediate data structure of the set of intermediate data structures based on a request for the at least one other intermediate data structure in response to the at least one other intermediate data structure not being cached for re-use. 9. The computing device of claim 8 , wherein the marshaling component is further configured to cache the at least one other intermediate data structure for further re-use. 10. The computing device of claim 8 , wherein the marshaling component is further configured to generate a virtual table based on a type of the at least one dynamic type and cache the virtual table for re-use. 11. The computing device of claim 8 wherein the marshaling component is further configured to determine that a virtual table for a given type of the at least one dynamic type is not pre-stored and dynamically generate the virtual table in response to a determination that the virtual table is not pre-stored. 12. The computing device of claim 8 , wherein the marshaling component is further configured to determine that a virtual table for a given type of the at least one dynamic type is pre-stored and access the virtual table in response to a determination that the virtual table is pre-stored. 13. A computer-readable storage memory comprising computer-readable instructions that, in response to execution by a computing system, cause the computing device including at least one processor to perform operations, comprising: receive, by a browser application of a computing device, script code including receiving code representing a component object model (COM) object; generate a prototype of the COM object including generating a type representation including at least one dynamic type associated with the COM object; by a marshaling component of the computing device, prior to a request for native code representing the COM object, in response to identifying a request for at least one intermediate data structure, dynamically generate the at least one intermediate data structure tailored for dynamic COM object translation between the script code and the native code, the at least one intermediate data structure generated based on the at least one dynamic type associated with the prototype of the COM object; and in response to a request for native code representing the COM object, marshal, by the marshaling component of the computing device, the code representing the COM object to the native code based on the at least one intermediate data construct. 14. The computer-readable storage memory of claim 13 , further comprising: by the marshaling component of the computing device, access the at least one intermediate data structure from a pre-stored set of intermediate data structures previously generated based on the script code. 15. The computer-readable storage memory of claim 13 , further comprising: generate a virtual table based on a type of the at least one dynamic type; and cache the virtual table generated for the type for re-use. 16. The computer-readable storage memory of claim 13 , further comprising: determine that a virtual table for a given type of the at least one dynamic type is not pre-stored; and dynamically generate the virtual table for handling the marshaling in response to the determining that the virtual table is not pre-stored. 17. The computer-readable storage memory of claim 13 , further comprising: determine that a virtual table for a given type of the at least one dynamic type is pre-stored; and access the virtual table for handling the marshaling in response to the determining that the virtual table is pre-stored.

Assignees

Inventors

Classifications

  • Object-oriented method invocation or resolution · CPC title

  • G06F9/5022Primary

    Mechanisms to release resources · CPC title

  • G06F8/30Primary

    Creation or generation of source code · CPC title

  • G06F8/75Primary

    Structural analysis for program understanding · CPC title

  • Physics · mapped topic

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 US9342274B2 cover?
Dynamic code generation and memory management techniques are provided for component object model (COM) objects with corresponding representations in script code and native code. A browser component can receive script code including the code representing the COM object and a marshaling component is provided that marshals, based on a request for native code representing the COM object, the code r…
Who is the assignee on this patent?
Lucco Steven, Lafreniere Louis, Qu Yong, and 1 more
What technology area does this patent fall under?
Primary CPC classification G06F9/5022. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue May 17 2016 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).