AngelScript
 
Loading...
Searching...
No Matches
asIJITCompilerV2 Class Referenceabstract

The interface that AS use to interact with the JIT compiler for version 2. More...

Inherits asIJITCompilerAbstract.

Public Member Functions

virtual void NewFunction (asIScriptFunction *scriptFunc)=0
 Called by AngelScript when a new function is compiled.
 
virtual void CleanFunction (asIScriptFunction *scriptFunc, asJITFunction jitFunc)=0
 Called by AngelScript when the JIT function must be cleaned up.
 

Detailed Description

This is the minimal interface that the JIT compiler must implement for version 2 so that AngelScript can request the compilation of the script functions.

See also
How to build a JIT compiler

Member Function Documentation

◆ CleanFunction()

virtual void asIJITCompilerV2::CleanFunction ( asIScriptFunction scriptFunc,
asJITFunction  jitFunc 
)
pure virtual
Parameters
[in]scriptFuncThe script function related to the JIT function
[in]jitFuncThe JIT function that was set by the JIT compiler for the script function

AngelScript will call this either when the script function is being destroyed, or when a new JIT function is set on the script function, in which case the old JIT function must be cleaned up.

◆ NewFunction()

virtual void asIJITCompilerV2::NewFunction ( asIScriptFunction scriptFunc)
pure virtual
Parameters
[in]scriptFuncThe script function that was just called

AngelScript will call this function when a new script function is compiled.

The JIT compiler is not required to do the JIT compilation at this moment. Depending on the JIT compiler strategy it may be better to defer the JIT compilation until the full script has been compiled, so better global optimizations can be done.

When the JIT compilation is done, the JIT compiler must use asIScriptFunction::SetJITFunction to link the JIT function with the script function.


The documentation for this class was generated from the following file: