Encyclopedia > Compile-time

  Article Content

Compile-time

In computer science, compile-time, as opposed to run-time, is the compiling phase in which code written in one programming language is translated into another language.

Because some information are only available for compiler and some other are only can be extracted in runtime, certain tasks can be done in compile-time and some in runtime. Typically in compile-time the following tasks can be done: Type-checking[?], Static binding[?], enforcing scoping rules, instantiating of templates[?], optimization. Those are also called semantic analysis. Typically the following tasks might not be done: boundary check of an array, dynamic binding[?].

Compile-time errors are those detected already during compilation, i.e. before even starting execution.

In compile-time, some tasks that cannot be done in a run-time environment can be done. See cross-compiler[?].

When an interpreter is used there may be no separation between compile-time and run-time. There may instead be a interpretation phase (often into bytecode) followed by execution, but performed by the same software and not exposed to the user. A type of error that would otherwise be a compile-time error, will then be detected in the course of executing the program.


See also: compiler, run-time, binding



All Wikipedia text is available under the terms of the GNU Free Documentation License

 
  Search Encyclopedia

Search over one million articles, find something about almost anything!
 
 
  
  Featured Article
Islip Terrace, New York

... size is 3.51. In the town the population is spread out with 29.5% under the age of 18, 6.7% from 18 to 24, 33.6% from 25 to 44, 20.6% from 45 to 64, and 9.6% who are 65 ...

 
 
 
This page was created in 70.3 ms