CACAO
Public Member Functions | Static Private Member Functions | Private Attributes
Recompiler Class Reference

Thread for JIT recompilations. More...

Public Member Functions

 Recompiler ()
 
 ~Recompiler ()
 Stop the worker thread. More...
 
bool start ()
 Start the worker thread. More...
 
void queue_method (methodinfo *m)
 Queue a method for recompilation. More...
 

Static Private Member Functions

static void thread ()
 Worker thread. More...
 

Private Attributes

Mutex _mutex
 
Condition _cond
 
std::queue< methodinfo * > _methods
 
bool _run
 Flag to stop worker thread. More...
 

Detailed Description

Thread for JIT recompilations.

Definition at line 39 of file recompiler.hpp.

Constructor & Destructor Documentation

Recompiler::Recompiler ( )
inline

Definition at line 49 of file recompiler.hpp.

Recompiler::~Recompiler ( )

Stop the worker thread.

Definition at line 48 of file recompiler.cpp.

Member Function Documentation

void Recompiler::queue_method ( methodinfo m)

Queue a method for recompilation.

Add a method to the recompilation queue and signal the recompilation thread that there is some work to do.

Parameters
mMethod to recompile.

Definition at line 195 of file recompiler.cpp.

bool Recompiler::start ( )

Start the worker thread.

Start the recompilation thread.

Returns
true on success, false otherwise.

Definition at line 178 of file recompiler.cpp.

void Recompiler::thread ( )
staticprivate

Worker thread.

The actual recompilation thread.

Definition at line 133 of file recompiler.cpp.

Field Documentation

Condition Recompiler::_cond
private

Definition at line 42 of file recompiler.hpp.

std::queue<methodinfo*> Recompiler::_methods
private

Definition at line 43 of file recompiler.hpp.

Mutex Recompiler::_mutex
private

Definition at line 41 of file recompiler.hpp.

bool Recompiler::_run
private

Flag to stop worker thread.

Definition at line 44 of file recompiler.hpp.


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