[WEBINAR] Bulletproof: How Today's Business Leaders Stay on Top

Code Generation

Definition - What does Code Generation mean?

Code generation is a mechanism where a compiler takes the source code as an input and converts it into machine code. This machine code is actually executed by the system. Code generation is generally considered the last phase of compilation, although there are multiple intermediate steps performed before the final executable is produced. These intermediate steps are used to perform optimization and other relevant processes.

Techopedia explains Code Generation

The code generation process is performed by a component known as a code generator, part of the compiler program. The original source code of any program passes through multiple phases before the final executable is generated. This final executable code is actually the machine code, which computer systems can execute readily.

In the intermediate phases of compilation, code optimization rules are applied one at a time. Sometimes these optimization processes are dependent on each other, so they are applied one after another based on the dependency hierarchy. After passing multiple phases, a parse tree or an abstract syntax tree is generated and that is the input to the code generator. At this point, the code generator converts it into linear sequential instructions. After this stage, there may be some more steps depending upon the compiler. The final optimized code is the machine code for execution and output generation.

Share this:

Connect with us

Email Newsletter

Join thousands of others with our weekly newsletter

The 4th Era of IT Infrastructure: Superconverged Systems
The 4th Era of IT Infrastructure: Superconverged Systems:
Learn the benefits and limitations of the 3 generations of IT infrastructure – siloed, converged and hyperconverged – and discover how the 4th...
Approaches and Benefits of Network Virtualization
Approaches and Benefits of Network Virtualization:
Businesses today aspire to achieve a software-defined datacenter (SDDC) to enhance business agility and reduce operational complexity. However, the...
Free E-Book: Public Cloud Guide
Free E-Book: Public Cloud Guide:
This white paper is for leaders of Operations, Engineering, or Infrastructure teams who are creating or executing an IT roadmap.
Free Tool: Virtual Health Monitor
Free Tool: Virtual Health Monitor:
Virtual Health Monitor is a free virtualization monitoring and reporting tool for VMware, Hyper-V, RHEV, and XenServer environments.
Free 30 Day Trial – Turbonomic
Free 30 Day Trial – Turbonomic:
Turbonomic delivers an autonomic platform where virtual and cloud environments self-manage in real-time to assure application performance.