Eureka AIR delivers breakthrough ideas for toughest innovation challenges, trusted by R&D personnel around the world.

Source code object compiling method and device and computer

A source code, object technology, applied in the computer field, can solve problems such as low compilation efficiency

Inactive Publication Date: 2018-08-07
HUAWEI TECH CO LTD
View PDF2 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Since there are tens of thousands of objects defined in the source code in practical applications, using the above compilation method will make the compilation of objects in the source code inefficient

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
  • Source code object compiling method and device and computer
  • Source code object compiling method and device and computer
  • Source code object compiling method and device and computer

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0043] Based on the above application scenarios, the present invention provides a method for compiling source code objects, in which the type of each object is set in advance according to the operation code of each object in the source code, for example, it can be used as the operation code associated with an object in the source code When it is a serial code, set the object type of the object to be operated by only one thread at a time; when the operation code associated with an object is a parallel code, set the object type of the object to be operated by multiple threads at a time The type of simultaneous operation; based on the above-mentioned type division of objects in the source code, for an object to be compiled in the source code, such as figure 2 As shown, the following methods can be used to compile the object:

[0044] Step S21: the compiler allocates a counter for the object to be compiled;

[0045] The running terminal of the compiler and the above-mentioned co...

Embodiment 2

[0052] In the embodiment of the present invention, the objects in the source code written by programmers can have a parent-child relationship, and the child objects can inherit the characteristics of the parent object, so the programmer can only define the object type of the parent object when writing the source code, and the Child objects can inherit the object type of the corresponding parent object, for example, when programmers write source code, such as image 3 As shown, three objects are set, namely object A, object B and object C, and object A is the parent object, object B and object C are the child objects of object A, then object B and object C and object A The types are consistent, that is, when the object type of object A is the type operated by only one thread at a time, the object types of object B and object C are also the type operated by only one thread at a time; while in object A When the object type is the type that is operated by multiple threads at the s...

Embodiment 3

[0062] In the embodiment of the present invention, when programming the source code, the programmer can specifically set the object identifier for each object in the source code. For example, when the operation code associated with an object in the source code is a parallel code, the specific The object identifier of the object is set as the first identifier, the first identifier can indicate that the object type of the current object is a type operated by multiple threads at the same time, and the first identifier can be specifically the @safe character, etc. identification; and when the operation code associated with an object in the source code is a serial code, the object identification of the object can be specifically set as a second identification, and the second identification can indicate that the object type of the current object is in a The type that is only operated by one thread at a time, the second flag can be specifically set by programmers.

[0063] Certainly,...

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 source code object compiling method and device and a computer. The method comprises the steps that the object type of a to-be-compiled object in source codes is determined bya compiler, wherein the to-be-compiled object is provided with a counter; counter counting rules are set for the counter of the to-be-complied object when the object type of the compiler in the to-be-complied object is the type which can only be operated by a thread at a moment. By means of the method, the device and the computer, the compiling efficiency of the object in the source codes can beimproved.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a method, device and computer for compiling source code objects. Background technique [0002] At present, the working process of programming software for developers is mainly as follows: first, the source code input by the developer is received, and then the source code is compiled. The compilation process is specifically to convert the source code into a machine-recognizable object code, Finally, the target code is executed to realize the corresponding function. [0003] In practical applications, multiple objects will be defined in the source code input by developers, and the objects refer to entities encapsulated by data and related operations; in order to facilitate memory management, the compiler that executes the compilation operation, Generally adopt the following method to compile each object in the source code: first assign a counter to each object; then, set the cou...

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/41G06F9/52G06F8/4434
Inventor 布莱斯古德王海川崔世强齐勃
Owner HUAWEI TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Eureka Blog
Learn More
PatSnap group products