The first work to understand the compiler theory

(1) Description of the compiler and translator, assembler connections and differences of the program.

A: The translation program includes compilers and interpreters.
Assembler: source program written in assembly reasons, translated into the target program of machine tool program instructions and other information composed.
Difference: the compiler will generate the target program is running, the assembler output of binary machine instructions.

(2) the compilation process, including the main function of which several main stages and each stage.

A: compilation process consists of two parts: pre-treatment, pre-compiled.
Files in the preprocessor to process four cases: macros, # include file contains conditional compilation, special symbols.
Compiling precompiled special symbols appearing in the source string interpretation replaced with the appropriate value.

(3) Description of the difference between the interpreter and compiler.

A: Compile: specifically refers to a high-level language into a language foundation, explained: accept a language input of a high-level language, to explain and control the computer to perform, immediately get the results of this sentence, and then to accept the next sentence.

Compiler: high efficiency, fast ie time, space province; interactive and dynamic characteristics are poor, poor portability. Most PL using this method translation

Interpreter: low efficiency, that is, slow time and space costs; good interactive and dynamic features, portability is good. Early Basic and now Java and so on.

(4) understand the new open-source compiler Huawei Ark (https://www.openarkcompiler.cn/home), understand and talk about its basic ideas and technology route, as well as its Android software ecosystem will be affected.

A: Ark compiler as a development tool, open a new door for mobile applications and ecological experience. Advances in technology, the world can not do without the dedication of countless scientists and engineers. Industry prosperity, openness is the only way!

Huawei's Ark compiler provides a mechanism to compile and run the new systems and applications. The dynamically compiled into a statically compiled, the high-level language compiled directly into machine code, eliminating the overhead of Android virtual machines dynamically compiled.

 Huawei's Ark without pausing the compiler memory recovery recovery applications, ready to use recycled at any time, Andrews need to pause the application when the global recovery in memory, to be generating random Caton.

Ark compiler through a lot of optimization and adjustment, hand-depth understanding of the Java language and then meticulous reconstruction, on the other hand the sequence of machine instructions require a very clear understanding of the structure, the higher the degree of matching these two areas, the higher the efficiency of the compiler .

Guess you like

Origin www.cnblogs.com/fzwboke/p/11458091.html