Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Processing and optimizing method and device for dynamic language, equipment and storage medium

A dynamic language and optimization method technology, applied in the field of programming, can solve problems such as slow running performance and reduced user experience, so as to improve the running speed and avoid overhead

Active Publication Date: 2019-09-24
BANMA ZHIXING NETWORK HONGKONG CO LTD
View PDF4 Cites 12 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] For dynamic languages, a series of operations such as type judgment and object memory allocation are generally performed during runtime, which makes the running performance based on dynamic languages ​​slower and reduces user experience

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Processing and optimizing method and device for dynamic language, equipment and storage medium
  • Processing and optimizing method and device for dynamic language, equipment and storage medium
  • Processing and optimizing method and device for dynamic language, equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0042] Preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although preferred embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0043] 【Term Analysis】

[0044] First, a brief description of the terms involved in the present disclosure is given.

[0045] JavaScript, a dynamic language for web programming.

[0046] JS, short for JavaScript language.

[0047] JS virtual machine, JavaScript language execution engine, used to compile and run JavaScript source code.

[0048] TypeScript, a compatible programming language developed by Microsoft.

[0049] Int, integer ty...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a processing and optimizing method and device for a dynamic language, equipment and a storage medium. The processing and optimizing method includes the steps: based on program codes in an intermediate file, obtaining an abstract syntax tree through analysis, obtaining type description information of the corresponding program codes through analysis based on the annotation information in the intermediate file, and adding the type description information to corresponding nodes on the abstract syntax tree; and traversing the abstract syntax tree so as to obtain attribute and type information owned by the object with the class structure based on the association relationship between the nodes and the type description information of the nodes, generating a hidden class, and attaching the hidden class to the class definition node corresponding to the object so as to generate an optimization code based on the abstract syntax tree with the hidden class. Therefore, by pre-generating the hidden class during compiling, the object layout information can be known in advance, so that the source file can be optimized based on the pre-generated hidden class to avoid the overhead of adding attributes to create the hidden class and expanding the object layout during running, and the running rate is increased.

Description

technical field [0001] The present disclosure relates to the field of programming, in particular to a processing and optimization method, device, equipment and storage medium for dynamic languages. Background technique [0002] A static language (that is, a statically typed language) is a language in which the data type of a variable can be determined at compile time. Most statically typed languages ​​require that the data type must be declared before using the variable. For example, C++, Java, Delphi, C#, etc. are all static languages. [0003] Unlike static languages, dynamic languages ​​(that is, dynamically typed languages) are languages ​​that determine data types at runtime. Variables do not require type declarations before they are used. Usually, the type of the variable is the type of the value being assigned. For example, PHP, ASP, Ruby, Python, Perl, ABAP, SQL, JavaScript, Unix Shell, etc. are all dynamic languages. [0004] For dynamic languages, a series of ope...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/41
CPCG06F8/4441
Inventor 苏振宇吴哲锋孙哲徐伟刚金一华
Owner BANMA ZHIXING NETWORK HONGKONG CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products