const Assembler::VoidType Assembler::Void;
-Assembler::Assembler(InstructionSelection *isel, V4IR::Function* function, QV4::ExecutionEngine *engine)
- : _function(function), _isel(isel), _engine(engine), _nextBlock(0)
+Assembler::Assembler(InstructionSelection *isel, V4IR::Function* function, QV4::ExecutableAllocator *executableAllocator)
+ : _function(function), _isel(isel), _executableAllocator(executableAllocator), _nextBlock(0)
{
}
}
}
- JSC::JSGlobalData dummy(_engine->executableAllocator);
+ JSC::JSGlobalData dummy(_executableAllocator);
JSC::LinkBuffer linkBuffer(dummy, this, 0);
QVector<uint> lineNumberMapping(codeLineNumberMappings.count() * 2);
qSwap(_function, function);
qSwap(_reentryBlocks, reentryBlocks);
Assembler* oldAssembler = _as;
- _as = new Assembler(this, _function, engine());
+ _as = new Assembler(this, _function, engine()->executableAllocator);
V4IR::Optimizer opt(_function);
opt.run();
class Assembler : public JSC::MacroAssembler
{
public:
- Assembler(InstructionSelection *isel, V4IR::Function* function, QV4::ExecutionEngine *engine);
+ Assembler(InstructionSelection *isel, V4IR::Function* function, QV4::ExecutableAllocator *executableAllocator);
#if CPU(X86)
#undef VALUE_FITS_IN_REGISTER
QHash<V4IR::BasicBlock *, QVector<DataLabelPtr> > _labelPatches;
V4IR::BasicBlock *_nextBlock;
- QV4::ExecutionEngine *_engine;
+ QV4::ExecutableAllocator *_executableAllocator;
InstructionSelection *_isel;
struct CodeLineNumerMapping
codeRefs.insert(_function, squeezeCode());
- if (QV4::Debugging::Debugger *debugger = engine()->debugger)
- debugger->setPendingBreakpoints(_vmFunction);
-
qSwap(_currentStatement, cs);
qSwap(_stackSlotAllocator, stackSlotAllocator);
delete stackSlotAllocator;
runtimeFunction->codeData = reinterpret_cast<const uchar *>(codeRefs.at(i).constData());
+ if (QV4::Debugging::Debugger *debugger = engine->debugger)
+ debugger->setPendingBreakpoints(runtimeFunction);
+
if (compiledFunction == compiledRootFunction) {
assert(!rootRuntimeFunction);
rootRuntimeFunction = runtimeFunction;