CompilationUnit::~CompilationUnit()
{
foreach (Function *f, runtimeFunctions)
- engine->allFunctions.remove(reinterpret_cast<quintptr>(f->codePtr));
+ engine->allFunctions.remove(reinterpret_cast<quintptr>(f->code));
}
void CompilationUnit::linkBackendToEngine(ExecutionEngine *engine)
}
foreach (Function *f, runtimeFunctions)
- engine->allFunctions.insert(reinterpret_cast<quintptr>(f->codePtr), f);
+ engine->allFunctions.insert(reinterpret_cast<quintptr>(f->code), f);
}
QV4::ExecutableAllocator::ChunkOfPages *CompilationUnit::chunkForFunction(int functionIndex)
{
bool operator()(Function *function, quintptr pc)
{
- return reinterpret_cast<quintptr>(function->codePtr) < pc
- && (reinterpret_cast<quintptr>(function->codePtr) + function->codeSize) < pc;
+ return reinterpret_cast<quintptr>(function->code) < pc
+ && (reinterpret_cast<quintptr>(function->code) + function->codeSize) < pc;
}
bool operator()(quintptr pc, Function *function)
{
- return pc < reinterpret_cast<quintptr>(function->codePtr);
+ return pc < reinterpret_cast<quintptr>(function->code);
}
};
}
ReturnedValue (*codePtr)(ExecutionContext *, const uchar *), quint32 _codeSize)
: compiledFunction(function)
, compilationUnit(unit)
- , codePtr(codePtr)
+ , code(codePtr)
, codeData(0)
, codeSize(_codeSize)
{
const CompiledData::Function *compiledFunction;
CompiledData::CompilationUnit *compilationUnit;
- inline ReturnedValue code(ExecutionContext *ctx, const uchar *data) {
- return codePtr(ctx, data);
- }
- ReturnedValue (*codePtr)(ExecutionContext *, const uchar *);
+ ReturnedValue (*code)(ExecutionContext *, const uchar *);
const uchar *codeData;
quint32 codeSize;
this->function = function;
this->function->compilationUnit->ref();
Q_ASSERT(function);
- Q_ASSERT(function->codePtr);
+ Q_ASSERT(function->code);
// global function
if (!scope)
this->function = function;
this->function->compilationUnit->ref();
Q_ASSERT(function);
- Q_ASSERT(function->codePtr);
+ Q_ASSERT(function->code);
// global function
if (!scope)