Wrapping method, registration method, device, and rendering apparatus
Abstract
A wrapping method and device, a registration method and device, and a rendering apparatus are provided, which are related to a field of computer display technology. The specific implementation includes: receiving a creation instruction from a registry component, wherein the creation instruction includes an identification of a wrapper object to be registered, in a target code; and creating a corresponding wrapper object in the wrapper module, according to the identification of the wrapper object to be registered in the target code. In embodiments of the present application, a wrapper object may be quickly created in a wrapper module according to an identification of a wrapper object to be registered in a target code, which is beneficial to a reuse of a wrapper object, thereby improving code execution efficiency.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1. A rendering apparatus, comprising:
an execution engine, configured to send an initialization instruction for initializing a wrapper object to a virtual machine, wherein the initialization instruction is acquired by loading a target code through the execution engine, and to receive an execution code corresponding to the target code from the virtual machine;
the virtual machine, configured to receive the initialization instruction from the execution engine; to send a registration instruction through a registration interface for registering the wrapper object to a registry component according to the initialization instruction, wherein the registration instruction comprises an identification of the wrapper object to be registered, in the target code; to acquire the execution code corresponding to the target code by a compilation, according to a mapping relation between a wrapper object and a native code of an operating system; and to send the execution code to the execution engine for execution; and
the registry component, configured to receive the registration instruction from the virtual machine through the registration interface; and send a creation instruction to a wrapper module through a creation interface, to create a corresponding wrapper object in the wrapper module according to the identification of the wrapper object in the creation instruction.
2. The rendering apparatus according to claim 1 , wherein
the execution engine is further configured to send an execution instruction to the virtual machine, such that the virtual machine generates a call instruction according to the execution instruction, wherein the execution instruction is acquired by executing the execution code through the execution engine; and
the rendering apparatus further comprises:
an invoking component, configured to receive the call instruction from the virtual machine, to invoke a wrapper object in the wrapper module; and
the wrapper module, configured to, before receiving the call instruction from the virtual machine and before invoking the wrapper object in the wrapper module through an invocation interface, receive the creation instruction from the registry component through the creation interface, wherein the creation instruction comprises the identification of the wrapper object to be registered, in the target code; and create the corresponding wrapper object in the wrapper module, according to the identification of the wrapper object to be registered in the target code.
3. The rendering apparatus according to claim 1 , further comprising: a bridge, configured to send the initialization instruction from the execution engine to the virtual machine, and to send the execution code from the virtual machine to the execution engine.
4. The rendering apparatus according to claim 2 , further comprising: a bridge, configured to send the initialization instruction from the execution engine to the virtual machine, and to send the execution code from the virtual machine to the execution engine.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.