Thursday, August 18, 2011

Compilers - 2

Different types of compilers
Depending on the number of stages, compilers are divided into two types

1.One-Pass compiler : This compiler does the compilation process in a single stage. Faster, but not a good one for development.
eg: PASCAL compiler

2.Multipass compiler : This compiler takes more than one stage. Slower, but very good for development
eg: GCC

Depending on their functionality, the following are the different types of compilers

1. Threaded code compiler ( interpreter), used in FORTH. It replaces the given strings in the source with the binary code and gives an error, if it cannot do so

2. Stage compiler, that compiles the assembly language of a theoretical machine, like some Prolog implementations. This Prolog machine, is also known as the Warren Abstract Machine (WAM)

3. Incremental compilers, used in LISP systems, that do a step by step compilation of individual functions

4. Just-in-time compiler, used by small talk and Java systems

5. A retargetable compiler, that can be relatively be modified with ease to generate code for different CPU architectures. All the cross compilers such as GCC, are examples of this type

6. A parallelizing compiler, that converts a serial input program, into a form suitable for efficient execution on parallel computer architecture. Example is the most famous "Open MP compiler"


Tommorrow, let's see the details of two famous compilers, GCC and .net in a step by step manner

No comments:

Post a Comment