Patent · US Active

Method and apparatus for performing conditional compilation

US8161465B2 · kind B2 · utility

6Cited by
6References
16Claims
0Family size

Assignee

Inventors

Key dates

Filing dateJul 27, 2006
Grant dateApr 17, 2012
Priority date
Expiry dateNov 25, 2029

Classification

  • Technology area (CPC G)Physics
  • CPC primaryG06F8/443
  • WIPO fieldComputer technology
  • WIPO sectorElectrical engineering

Abstract

One embodiment of the present invention provides a system that facilitates performing conditional compilation. The system operates by analyzing programming language source code prior to compilation to locate a preprocessing directive that specifies a condition to be evaluated, and also identifies source code to be conditionally included during compilation of the source code. Next, the system generates evaluation source code that evaluates the condition. The system then evaluates the condition by evaluating ordinary programming language and environmental variables within the evaluation source code. Note that the run-time variables are also available at run-time during execution of a compiled version of the original source code. Next, the system conditionally includes source code associated with a result of the evaluation and compiles the revised source code. Finally, the system records the use of any variables during condition evaluation in a persistent manner and automatically restarts the entire processing if any of the recorded variables may have been changed subsequent to the original compilation.

Source: USPTO / EPO open patent data. Objective bibliographic and citation counts.