Template compilation method

A compiling method and template technology, which is applied in the field of template compiling, can solve problems such as heavy burden on programmers, and achieve the effect of good efficiency and less code

Inactive Publication Date: 2005-05-11
PANASONIC CORP
View PDF0 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0010] However, in the above-mentioned conventional technology, it is mandatory for the programmer to be aware that the common part of the program is described as an execution class of an unspecified type, which places a heavy burden on the programmer.

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
  • Template compilation method
  • Template compilation method
  • Template compilation method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0052] An embodiment of the compiling method of the present invention will be described below with reference to the accompanying drawings.

[0053] FIG. 1 is a configuration diagram of a compiling step in an embodiment of the present invention.

[0054] In Fig. 1, the compiling step includes: input step S102, sentence analysis step S103, identical function definition generation judgment step S105, function definition publicization step S106, function call replacement step S107, intermediate code generation step S109, optimization step S110, Resource allocation step S111 and output step S112. Each of these compiling steps is a process performed by a compiling device including a CPU according to a compiling program.

[0055] The program storage unit D101 stores an input program to be compiled.

[0056] In the input step S102, all the programs stored in the program storage unit D101 are input in order, and passed to the sentence analysis step S103.

[0057] In the ...

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 present invention provides a template compiling method. The same function definition generates a judgment step (S105), analyzes the dependencies between function definition codes and template parameters, and in the absence of dependencies, defines a common step by function (S106) Define a public function, and delete multiple function definitions before publicizing. Then, in the function call replacement step (S107), the function before publicization is replaced with a call to a public function. In this way, among a plurality of function definition codes generated from a template, by sharing the same function definition codes, it is possible to reduce the amount of codes increased due to the template structure.

Description

technical field [0001] The invention relates to a compiling method for converting a program written in a high-level language with template structure into object code. Background technique [0002] In software development in recent years, programs have become large-scale, and accordingly, object-oriented languages ​​that are easy to maintain and highly reusable have attracted attention. [0003] C++ language can be mentioned as a representative object-oriented language. The C++ language has a template structure, which can be used for general-purpose programming with easy maintenance and high reusability. Furthermore, a standard template library called STL (StandardTemplate Library) is usually provided by a compiler, and the number of programs using template structures will increase in the future. [0004] FIG. 12 shows an example of generated code when compiling a C++ program using the template structure. [0005] As shown in source codes (a) and (b) of Figure 12, C++ is u...

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): G06F9/45
CPCG06F8/41
Inventor 浅尾忍中嶋广二田中裕久
Owner PANASONIC CORP
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
Try Eureka
PatSnap group products