23.3   Using the Just-in-time Compiler with HDevEngine/.NET

The just-in-time compilation of procedures needs to be enabled in your instance of the HDevEngine class:

...
Engine = new HDevEngine();

// Enable or disable execution of compiled procedures.
Engine.SetEngineAttribute("execute_procedures_jit_compiled", "true");

Procedures (and procedures referenced by it) are compiled at the moment a corresponding instance of HDevProcedureCall or HDevProgramCall is created.

You can also explicitly pre-compile all used procedures of a HDevelop program or procedure using the method CompileUsedProcedures of HDevProgram or HDevProcedure, respectively.

In the following example, all used procedures of a procedure call are just-in-time compiled:

Program = new HDevProgram(ProgramPathString);
// Get local procedure.
Proc = new HDevProcedure(Program, name);
...
Proc.CompileUsedProcedures();