Home

compiling

Compiling is the process of transforming source code written in a programming language into a lower-level form that can be executed by a computer, typically machine code or an intermediate representation. A program that performs this translation is called a compiler. Compiling differs from interpretation in that the translation occurs before execution, rather than during runtime.

A typical compiler operates in several stages. The front end performs lexical analysis and parsing to convert

There are different models of compilation. Ahead-of-Time (AOT) compilation translates the entire program before execution, producing

Common outputs of compilation include object files, static or shared libraries, and executables. The performance and

Examples of languages typically compiled include C, C++, Rust, and Go, whereas languages like Java and C#

source
text
into
a
structured
representation,
while
checking
syntax
and
enforcing
semantic
rules
such
as
types.
The
middle
end
carries
out
optimizations
and
transforms
the
program
into
an
intermediate
representation
that
is
easier
to
optimize
across
architectures.
The
back
end
generates
target-specific
code,
which
may
be
machine
code,
assembly,
or
bytecode,
and
may
perform
additional
optimizations.
The
final
output
is
object
code
that
can
be
linked
with
libraries
to
form
an
executable.
a
standalone
executable.
Just-In-Time
(JIT)
compilation
compiles
code
at
run
time,
often
within
a
virtual
machine,
to
enable
runtime
optimization
based
on
actual
program
behavior.
Some
languages
and
environments
employ
both
approaches,
depending
on
deployment
or
runtime
characteristics.
portability
of
compiled
programs
depend
on
the
compiler,
the
target
architecture,
and
the
available
optimizations.
Compilation
errors
are
reported
during
various
stages
of
the
process
and
may
include
syntax,
type,
or
linkage
issues.
Debug
information
can
be
embedded
to
map
machine
code
back
to
source
code
for
troubleshooting.
often
rely
on
managed
runtimes
with
JIT
or
AOT
strategies
in
different
environments.