--> Skip to main content

कम्पाइलर किसे कहते है

Views

What is compiler

For some time, forget about compiler and imagine that you have gone to a beautiful country to spend your vacation. A very basic problem in this is that you speak, write and understand only in your regional language which is Hindi. But there the citizens of that country do not know anything other than English only. Then how will you communicate with others there?

In such a situation, the only solution is that you will need a language translator, which can be a human or a book or even an App. This language translator will translate your Hindi into English so that the other person can understand your words. Together, he will convert English into Hindi as well so that you too can understand his language.
The same thing happens with a computer. Computers also understand only binary language (language which consists of 0s and 1s), while users who understand Computer as English or any language. In such a situation, how will the computer understand the commands given by you? Also, you will not understand any process calculation performed by the computer. In such a situation, there is a need for a language translator so that they can ma
What is Compiler
If not, then there is a great opportunity for you to understand this technology easily. Whether you are from a technical student or a non-tech background, it is good for everyone to understand this compiler. Because it is used in all places. By the way, it is very important for a Computer Science student to understand it. Because if you have to understand about programming completely then it becomes very important to know about the work of the compiler.

What is compiler

For some time, forget about compiler and imagine that you have gone to a beautiful country to spend your vacation. A very basic problem in this is that you speak, write and understand only in your regional language which is Hindi. But there the citizens of that country do not know anything other than English only. Then how will you communicate with others there?

TYPE
One classification of compilers is by the platform on which their generated code executes. This is known as the target platform.
native or hosted compiler is one whose output is intended to directly run on the same type of computer and operating system that the compiler itself runs on. The output of a cross compiler is designed to run on a different platform. Cross compilers are often used when developing software for embedded systems that are not intended to support a software development environment.
The output of a compiler that produces code for a virtual machine (VM) may or may not be executed on the same platform as the compiler that produced it. For this reason such compilers are not usually classified as native or cross compilers.
The lower level language that is the target of a compiler may itself be a high-level programming language. C, viewed by some as a sort of portable assembly language, is frequently the target language of such compilers. For example, Cfront, the original compiler for C++, used C as its target language. The C code generated by such a compiler is usually not intended to be readable and maintained by humans, so indent style and creating pretty C intermediate code are ignored. Some of the features of C that make it a good target language include the #line directive, which can be generated by the compiler to support debugging of the original source, and the wide platform support available with C compilers.
While a common compiler type outputs machine code, there are many other types:
  • Source-to-source compilers are a type of compiler that takes a high-level language as its input and outputs a high-level language. For example, an automatic parallelizing compiler will frequently take in a high-level language program as an input and then transform the code and annotate it with parallel code annotations (e.g. OpenMP) or language constructs (e.g. Fortran's DOALL statements).
  • Bytecode compilers that compile to assembly language of a theoretical machine, like some Prolog implementations
  • Just-in-time compilers (JIT compiler) defer compilation until runtime. JIT compilers exist for many modern languages including PythonJavaScriptSmalltalkJava, Microsoft .NET's Common Intermediate Language (CIL) and others. A JIT compiler generally runs inside an interpreter. When the interpreter detects that a code path is "hot", meaning it is executed frequently, the JIT compiler will be invoked and compile the "hot" code for increased performance.
    • For some languages, such as Java, applications are first compiled using a bytecode compiler and delivered in a machine-independent intermediate representation. A bytecode interpreter executes the bytecode, but the JIT compiler will translate the bytecode to machine code when increased performance is necessary.[47][non-primary source needed]
  • Hardware compilers (also known as syntheses tools) are compilers whose output is a description of the hardware configuration instead of a sequence of instructions.
  • An assembler is a program that compiles human readable assembly language to machine code, the actual instructions executed by hardware. The inverse program that translates machine code to assembly language is called a disassembler.
  • A program that translates from a low-level language to a higher level one is a decompiler.[citation needed]
  • A program that translates between high-level languages is usually called a language translator, source-to-source compiler, language converter, or language rewriter.[citation needed] The last term is usually applied to translations that do not involve a change of language.[51]
  • A program that translates into an object code format that is not supported on the compilation machine is called a cross compiler and is commonly used to prepare code for embedded applications.[citation needed][clarification needed]
  • A program that rewrites object code back into the same type of object code while applying optimisations and transformations is a binary recompiler.
Comment Policy: Please write your comments that match the topic of this page's posts. Comments that contain links will not be displayed until they are approved.
Leave a Comment
Close comments