Unlock instant, AI-driven research and patent intelligence for your innovation.

A method of inlining Java program methods based on bytecode

A technology of bytecode and program, which is applied in the inline field of JAVA program method based on bytecode, and can solve problems such as dex file construction failure

Active Publication Date: 2018-12-18
ALIBABA GRP HLDG LTD
View PDF12 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The embodiment of the present application provides a bytecode-based JAVA program method inlining method to solve the problem that the number of methods in a single dex mode exceeds the limit and the dex file construction fails

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
  • A method of inlining Java program methods based on bytecode
  • A method of inlining Java program methods based on bytecode
  • A method of inlining Java program methods based on bytecode

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0085] In the following description, many specific details are explained in order to fully understand this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar promotion without violating the connotation of this application. Therefore, this application is not limited by the specific implementation disclosed below.

[0086] Please refer to figure 1 , Which is a flowchart of an embodiment of a method of inlining a bytecode-based JAVA program method in this application.

[0087] S101: Parse the class file into class nodes, and generate property nodes and method nodes for the properties and methods of the class respectively, and then add them to the predefined node warehouse.

[0088] This step provides preparatory work for subsequent operations, parsing class files into node files and adding them to the predefined node warehouse. The class files include JAVA class files. The JA...

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 discloses a method of inlining a JAVA program method based on bytecode. The method comprises the following steps: parsing a class file into a class node, sequentially generating attribute nodes and method nodes of the class respectively, and then adding the attribute nodes to a pre-defined node repository; reading the method node of the node warehouse, and judging the feasibility ofinlining according to the read method node; if so, proceeding to the next step; performs method inline operations on methods that are judged to be inline executable. The application parses the class file to a class node through an ASM framework, and then generates a method node and an attribute node of the class respectively; by traversing the method nodes in the node repository, inline operationsare performed on methods that can perform inline operations, thereby realizing method merging. The present application can reduce the number of methods without reducing application functions, significantly reducing the workload of developers, improving work efficiency, and reducing development costs.

Description

Technical field [0001] This application relates to the field of computer development, and in particular to a method of inlining a JAVA program method based on bytecode. This application also provides a bytecode-based JAVA program method inline device and an electronic device. Background technique [0002] The dex file is an executable file of the Android system, which contains all the operating instructions and resource files of the application. There is a limitation in the Android application construction process, that is, a dex file can have up to 65536 methods. When the number of methods exceeds 65536, the dex file generation will fail. [0003] As the current business development is getting faster and faster, the client's volume is getting bigger and bigger, 65536 methods under the single dex mode can no longer meet the needs of business volume. This greatly limits the development of Android development and becomes a major obstacle for Android applications to meet user needs....

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
IPC IPC(8): G06F8/30
CPCG06F8/73
Inventor 肖浩龙
Owner ALIBABA GRP HLDG LTD