mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 747543 - Convert JIT registration API to use JITChunks nearly everywhere in place of JITScripts. r=bhackett
--HG-- extra : rebase_source : fd1ab3d4e24b8046b85421b29dfa96e1a74bf608
This commit is contained in:
parent
c7e97d8358
commit
e55dffb2ed
@ -217,33 +217,33 @@ Probes::JITWatcher::CollectNativeRegions(RegionVector ®ions,
|
||||
}
|
||||
|
||||
void
|
||||
Probes::registerMJITCode(JSContext *cx, js::mjit::JITScript *jscr,
|
||||
Probes::registerMJITCode(JSContext *cx, js::mjit::JITChunk *chunk,
|
||||
js::mjit::JSActiveFrame *outerFrame,
|
||||
js::mjit::JSActiveFrame **inlineFrames,
|
||||
void *mainCodeAddress, size_t mainCodeSize,
|
||||
void *stubCodeAddress, size_t stubCodeSize)
|
||||
{
|
||||
for (JITWatcher **p = jitWatchers.begin(); p != jitWatchers.end(); ++p)
|
||||
(*p)->registerMJITCode(cx, jscr, outerFrame,
|
||||
(*p)->registerMJITCode(cx, chunk, outerFrame,
|
||||
inlineFrames,
|
||||
mainCodeAddress, mainCodeSize,
|
||||
stubCodeAddress, stubCodeSize);
|
||||
}
|
||||
|
||||
void
|
||||
Probes::discardMJITCode(FreeOp *fop, mjit::JITScript *jscr, JSScript *script, void* address)
|
||||
Probes::discardMJITCode(FreeOp *fop, mjit::JITScript *jscr, mjit::JITChunk *chunk, void* address)
|
||||
{
|
||||
for (JITWatcher **p = jitWatchers.begin(); p != jitWatchers.end(); ++p)
|
||||
(*p)->discardMJITCode(fop, jscr, script, address);
|
||||
(*p)->discardMJITCode(fop, jscr, chunk, address);
|
||||
}
|
||||
|
||||
void
|
||||
Probes::registerICCode(JSContext *cx,
|
||||
mjit::JITScript *jscr, JSScript *script, jsbytecode* pc,
|
||||
mjit::JITChunk *chunk, JSScript *script, jsbytecode* pc,
|
||||
void *start, size_t size)
|
||||
{
|
||||
for (JITWatcher **p = jitWatchers.begin(); p != jitWatchers.end(); ++p)
|
||||
(*p)->registerICCode(cx, jscr, script, pc, start, size);
|
||||
(*p)->registerICCode(cx, chunk, script, pc, start, size);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -258,17 +258,17 @@ public:
|
||||
mjit::JSActiveFrame *outerFrame,
|
||||
mjit::JSActiveFrame **inlineFrames);
|
||||
|
||||
virtual void registerMJITCode(JSContext *cx, js::mjit::JITScript *jscr,
|
||||
virtual void registerMJITCode(JSContext *cx, js::mjit::JITChunk *chunk,
|
||||
mjit::JSActiveFrame *outerFrame,
|
||||
mjit::JSActiveFrame **inlineFrames,
|
||||
void *mainCodeAddress, size_t mainCodeSize,
|
||||
void *stubCodeAddress, size_t stubCodeSize) = 0;
|
||||
|
||||
virtual void discardMJITCode(FreeOp *fop, mjit::JITScript *jscr, JSScript *script,
|
||||
virtual void discardMJITCode(FreeOp *fop, mjit::JITScript *jscr, mjit::JITChunk *chunk,
|
||||
void* address) = 0;
|
||||
|
||||
virtual void registerICCode(JSContext *cx,
|
||||
js::mjit::JITScript *jscr, JSScript *script, jsbytecode* pc,
|
||||
js::mjit::JITChunk *chunk, JSScript *script, jsbytecode* pc,
|
||||
void *start, size_t size) = 0;
|
||||
#endif
|
||||
|
||||
@ -306,7 +306,7 @@ JITGranularityRequested();
|
||||
* New method JIT code has been created
|
||||
*/
|
||||
void
|
||||
registerMJITCode(JSContext *cx, js::mjit::JITScript *jscr,
|
||||
registerMJITCode(JSContext *cx, js::mjit::JITChunk *chunk,
|
||||
mjit::JSActiveFrame *outerFrame,
|
||||
mjit::JSActiveFrame **inlineFrames,
|
||||
void *mainCodeAddress, size_t mainCodeSize,
|
||||
@ -316,14 +316,14 @@ registerMJITCode(JSContext *cx, js::mjit::JITScript *jscr,
|
||||
* Method JIT code is about to be discarded
|
||||
*/
|
||||
void
|
||||
discardMJITCode(FreeOp *fop, mjit::JITScript *jscr, JSScript *script, void* address);
|
||||
discardMJITCode(FreeOp *fop, mjit::JITScript *jscr, mjit::JITChunk *chunk, void* address);
|
||||
|
||||
/*
|
||||
* IC code has been allocated within the given JITScript
|
||||
* IC code has been allocated within the given JITChunk
|
||||
*/
|
||||
void
|
||||
registerICCode(JSContext *cx,
|
||||
mjit::JITScript *jscr, JSScript *script, jsbytecode* pc,
|
||||
mjit::JITChunk *chunk, JSScript *script, jsbytecode* pc,
|
||||
void *start, size_t size);
|
||||
#endif /* JS_METHODJIT */
|
||||
|
||||
|
@ -171,7 +171,7 @@ class LinkerHelper : public JSC::LinkBuffer
|
||||
JSC::CodeLocationLabel finalize(VMFrame &f) {
|
||||
masm.finalize(*this);
|
||||
JSC::CodeLocationLabel label = finalizeCodeAddendum();
|
||||
Probes::registerICCode(f.cx, f.jit(), f.script(), f.pc(),
|
||||
Probes::registerICCode(f.cx, f.chunk(), f.script(), f.pc(),
|
||||
label.executableAddress(), masm.size());
|
||||
return label;
|
||||
}
|
||||
|
@ -1774,7 +1774,7 @@ mjit::Compiler::finishThisUp()
|
||||
JSC::ExecutableAllocator::makeExecutable(result, masm.size() + stubcc.size());
|
||||
JSC::ExecutableAllocator::cacheFlush(result, masm.size() + stubcc.size());
|
||||
|
||||
Probes::registerMJITCode(cx, jit,
|
||||
Probes::registerMJITCode(cx, chunk,
|
||||
a,
|
||||
(JSActiveFrame**) inlineFrames.begin(),
|
||||
result, masm.size(),
|
||||
|
@ -1328,7 +1328,7 @@ JITScript::destroyChunk(FreeOp *fop, unsigned chunkIndex, bool resetUses)
|
||||
ChunkDescriptor &desc = chunkDescriptor(chunkIndex);
|
||||
|
||||
if (desc.chunk) {
|
||||
Probes::discardMJITCode(fop, this, script, desc.chunk->code.m_code.executableAddress());
|
||||
Probes::discardMJITCode(fop, this, desc.chunk, desc.chunk->code.m_code.executableAddress());
|
||||
fop->delete_(desc.chunk);
|
||||
desc.chunk = NULL;
|
||||
|
||||
@ -1484,6 +1484,8 @@ JITScript::nativeToPC(void *returnAddress, CallSite **pinline)
|
||||
JITChunk *chunk = findCodeChunk(returnAddress);
|
||||
JS_ASSERT(chunk);
|
||||
|
||||
JS_ASSERT(chunk->isValidCode(returnAddress));
|
||||
|
||||
size_t low = 0;
|
||||
size_t high = chunk->nCallICs;
|
||||
js::mjit::ic::CallICInfo *callICs_ = chunk->callICs();
|
||||
|
Loading…
Reference in New Issue
Block a user