Dynamic code generation and memory management for component object model data constructs
First Claim
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 Assignments
0 Petitions
Accused Products
Abstract
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.
158 Citations
17 Claims
-
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. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
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. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
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. - View Dependent Claims (14, 15, 16, 17)
-
Specification