Configuration management through information and code injection at compile time
AssigneeRed Hat, Inc.
InventorUlrich Drepper
Life of this patent
Estimating the term…
Abstract
Systems and methods for configuration management through information and code injection at compile time. An example method comprises: receiving a source code comprising one or more references to a variable; receiving metadata associated with the source code, wherein the metadata specifies a range of values of the variable; and identifying, in view of the range of values of the variable, a reachable section of the source code.
Claims12
A method comprising:
- receiving, by a processing device, a source code comprising one or more references to a run-time variable;
- receiving metadata provided by a markup in the source code, wherein the metadata comprises a compiler-internal variable that specifies a run-time value of the run-time variable, wherein the run-time value determines an outcome of evaluating a conditional expression referencing the run-time variable;
- identifying, at compile time, by evaluating the conditional expression based on the run-time value of the run-time variable, a reachable section of the source code;
- injecting the run-time value of the run-time variable into the source code;
- and
- compiling the reachable section of the source code.
A system comprising:
- a memory;
- a processing device operatively coupled to the memory, the processing device to:
- receive a source code comprising one or more references to a run-time variable;
- receive metadata provided by a markup in the source code, wherein the metadata comprises a compiler-internal variable that specifies a run-time value of the run-time variable, wherein the run-time value determines an outcome of evaluating a conditional expression referencing the run-time variable;
- identify, at compile time, by evaluating the conditional expression based on the run-time value of the run-time variable, a reachable section of the source code;
- inject the run-time value of the run-time variable into the source code;
- and
- compile the reachable section of the source code.
A non-transitory computer-readable storage medium comprising executable instructions that, when executed by a processing device, cause the processing device to:
- receive a source code comprising one or more references to a run-time variable;
- receive metadata provided by a markup in the source code, wherein the metadata comprises a compiler-internal variable that specifies a run-time value of the run-time variable, wherein the run-time value determines an outcome of evaluating a conditional expression referencing the run-time variable;
- identify, at compile time, by evaluating the conditional expression based on the run-time value of the run-time variable, a reachable section of the source code;
- inject the run-time value of the run-time variable into the source code;
- and
- compile the reachable section of the source code.
Dependencies are inferred from the claim text.