Method and device for pre-generating machine code instruction in JavaScript scripting language
A scripting language and machine code technology, applied in the field of pre-generated machine code instructions, can solve problems such as low efficiency, high time consumption, repeated generation, etc., to achieve the effect of improving the generation speed and avoiding repeated generation of actions
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0041] Embodiments of the present invention provide a method for pre-generating machine code instructions in the JavaScript scripting language, such as figure 1 As shown, the method includes:
[0042] 101. Obtain the intermediate code in the JavaScript script.
[0043] In the actual application scenario, when the web browser operates the JS engine, it will download the JavaScript script from the Internet, then parse it according to the source program in the script to generate a syntax tree, and then generate the intermediate code or bytecode according to the syntax tree.
[0044] 102. Query the total instruction length of the machine code instruction corresponding to the intermediate code from the machine code template, and apply for an instruction storage space capable of accommodating the machine code instruction.
[0045] The instruction storage space is used to store machine code instructions corresponding to the intermediate code. The machine code template is a file tha...
Embodiment 2
[0067] Embodiments of the present invention provide a method for pre-generating machine code instructions in the JavaScript scripting language, such as figure 2 As shown, the method includes:
[0068] 201. Obtain the intermediate code in the JavaScript script.
[0069] In the actual application scenario, when the web browser operates the JS engine, it will download the JavaScript script from the Internet, then parse it according to the source program in the script to generate a syntax tree, and then generate the intermediate code or bytecode according to the syntax tree.
[0070] 202. Apply for an instruction storage space capable of accommodating the total length of the instruction by querying the total instruction length of the machine code instruction corresponding to the intermediate code.
[0071] The instruction storage space is used to store machine code instructions corresponding to the intermediate code. The machine code template is a file that is preconfigured and...
Embodiment 3
[0110] Based on the above method embodiment, the embodiment of the present invention also provides a device for pre-generating machine code instructions in the JavaScript scripting language, such as image 3 shown, including:
[0111] The obtaining module 31 is used to obtain the intermediate code in the JavaScript script.
[0112] In the actual application scenario, when the web browser operates the JS engine, it will download the JavaScript script from the Internet, then parse the source program in the script to generate a syntax tree, and then generate the intermediate code or bytecode according to the syntax tree, and obtain Intermediate code in JavaScript scripts.
[0113] The application module 32 is used to query the total instruction length of the machine code instruction corresponding to the intermediate code from the machine code template, and apply for an instruction storage space capable of accommodating the machine code instruction; the instruction storage space ...
PUM

Abstract
Description
Claims
Application Information

- Generate Ideas
- Intellectual Property
- Life Sciences
- Materials
- Tech Scout
- Unparalleled Data Quality
- Higher Quality Content
- 60% Fewer Hallucinations
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2025 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com