mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
No bug - Rename JitInfo mJITInfo. (r=bhackett)
This commit is contained in:
parent
ad3c2e474a
commit
75cd584e97
@ -2422,7 +2422,7 @@ void
|
|||||||
JSScript::recompileForStepMode(FreeOp *fop)
|
JSScript::recompileForStepMode(FreeOp *fop)
|
||||||
{
|
{
|
||||||
#ifdef JS_METHODJIT
|
#ifdef JS_METHODJIT
|
||||||
if (hasJITInfo()) {
|
if (hasMJITInfo()) {
|
||||||
mjit::Recompiler::clearStackReferences(fop, this);
|
mjit::Recompiler::clearStackReferences(fop, this);
|
||||||
mjit::ReleaseScriptCode(fop, this);
|
mjit::ReleaseScriptCode(fop, this);
|
||||||
}
|
}
|
||||||
@ -2685,7 +2685,7 @@ JSScript::argumentsOptimizationFailed(JSContext *cx, JSScript *script_)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef JS_METHODJIT
|
#ifdef JS_METHODJIT
|
||||||
if (script->hasJITInfo()) {
|
if (script->hasMJITInfo()) {
|
||||||
mjit::ExpandInlineFrames(cx->compartment);
|
mjit::ExpandInlineFrames(cx->compartment);
|
||||||
mjit::Recompiler::clearStackReferences(cx->runtime->defaultFreeOp(), script);
|
mjit::Recompiler::clearStackReferences(cx->runtime->defaultFreeOp(), script);
|
||||||
mjit::ReleaseScriptCode(cx->runtime->defaultFreeOp(), script);
|
mjit::ReleaseScriptCode(cx->runtime->defaultFreeOp(), script);
|
||||||
|
@ -441,7 +441,7 @@ struct JSScript : public js::gc::Cell
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
#ifdef JS_METHODJIT
|
#ifdef JS_METHODJIT
|
||||||
JITScriptSet *jitInfo;
|
JITScriptSet *mJITInfo;
|
||||||
#endif
|
#endif
|
||||||
js::HeapPtrFunction function_;
|
js::HeapPtrFunction function_;
|
||||||
js::HeapPtrObject enclosingScope_;
|
js::HeapPtrObject enclosingScope_;
|
||||||
@ -680,24 +680,24 @@ struct JSScript : public js::gc::Cell
|
|||||||
friend class js::mjit::CallCompiler;
|
friend class js::mjit::CallCompiler;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool hasJITInfo() {
|
bool hasMJITInfo() {
|
||||||
return jitInfo != NULL;
|
return mJITInfo != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static size_t offsetOfJITInfo() { return offsetof(JSScript, jitInfo); }
|
static size_t offsetOfMJITInfo() { return offsetof(JSScript, mJITInfo); }
|
||||||
|
|
||||||
inline bool ensureHasJITInfo(JSContext *cx);
|
inline bool ensureHasMJITInfo(JSContext *cx);
|
||||||
inline void destroyJITInfo(js::FreeOp *fop);
|
inline void destroyMJITInfo(js::FreeOp *fop);
|
||||||
|
|
||||||
JITScriptHandle *jitHandle(bool constructing, bool barriers) {
|
JITScriptHandle *jitHandle(bool constructing, bool barriers) {
|
||||||
JS_ASSERT(jitInfo);
|
JS_ASSERT(mJITInfo);
|
||||||
return constructing
|
return constructing
|
||||||
? (barriers ? &jitInfo->jitHandleCtorBarriered : &jitInfo->jitHandleCtor)
|
? (barriers ? &mJITInfo->jitHandleCtorBarriered : &mJITInfo->jitHandleCtor)
|
||||||
: (barriers ? &jitInfo->jitHandleNormalBarriered : &jitInfo->jitHandleNormal);
|
: (barriers ? &mJITInfo->jitHandleNormalBarriered : &mJITInfo->jitHandleNormal);
|
||||||
}
|
}
|
||||||
|
|
||||||
js::mjit::JITScript *getJIT(bool constructing, bool barriers) {
|
js::mjit::JITScript *getJIT(bool constructing, bool barriers) {
|
||||||
if (!jitInfo)
|
if (!mJITInfo)
|
||||||
return NULL;
|
return NULL;
|
||||||
JITScriptHandle *jith = jitHandle(constructing, barriers);
|
JITScriptHandle *jith = jitHandle(constructing, barriers);
|
||||||
return jith->isValid() ? jith->getValid() : NULL;
|
return jith->isValid() ? jith->getValid() : NULL;
|
||||||
|
@ -194,19 +194,19 @@ JSScript::hasClearedGlobal() const
|
|||||||
|
|
||||||
#ifdef JS_METHODJIT
|
#ifdef JS_METHODJIT
|
||||||
inline bool
|
inline bool
|
||||||
JSScript::ensureHasJITInfo(JSContext *cx)
|
JSScript::ensureHasMJITInfo(JSContext *cx)
|
||||||
{
|
{
|
||||||
if (jitInfo)
|
if (mJITInfo)
|
||||||
return true;
|
return true;
|
||||||
jitInfo = cx->new_<JITScriptSet>();
|
mJITInfo = cx->new_<JITScriptSet>();
|
||||||
return jitInfo != NULL;
|
return mJITInfo != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
JSScript::destroyJITInfo(js::FreeOp *fop)
|
JSScript::destroyMJITInfo(js::FreeOp *fop)
|
||||||
{
|
{
|
||||||
fop->delete_(jitInfo);
|
fop->delete_(mJITInfo);
|
||||||
jitInfo = NULL;
|
mJITInfo = NULL;
|
||||||
}
|
}
|
||||||
#endif /* JS_METHODJIT */
|
#endif /* JS_METHODJIT */
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ mjit::Compiler::compile()
|
|||||||
|
|
||||||
CompileStatus status = performCompilation();
|
CompileStatus status = performCompilation();
|
||||||
if (status != Compile_Okay && status != Compile_Retry) {
|
if (status != Compile_Okay && status != Compile_Retry) {
|
||||||
if (!outerScript->ensureHasJITInfo(cx))
|
if (!outerScript->ensureHasMJITInfo(cx))
|
||||||
return Compile_Error;
|
return Compile_Error;
|
||||||
JSScript::JITScriptHandle *jith = outerScript->jitHandle(isConstructing, cx->compartment->needsBarrier());
|
JSScript::JITScriptHandle *jith = outerScript->jitHandle(isConstructing, cx->compartment->needsBarrier());
|
||||||
JSScript::ReleaseCode(cx->runtime->defaultFreeOp(), jith);
|
JSScript::ReleaseCode(cx->runtime->defaultFreeOp(), jith);
|
||||||
@ -930,7 +930,7 @@ mjit::CanMethodJIT(JSContext *cx, JSScript *script, jsbytecode *pc,
|
|||||||
if (frame->hasPushedSPSFrame() && !cx->runtime->spsProfiler.enabled())
|
if (frame->hasPushedSPSFrame() && !cx->runtime->spsProfiler.enabled())
|
||||||
return Compile_Skipped;
|
return Compile_Skipped;
|
||||||
|
|
||||||
if (script->hasJITInfo()) {
|
if (script->hasMJITInfo()) {
|
||||||
JSScript::JITScriptHandle *jith = script->jitHandle(construct, cx->compartment->needsBarrier());
|
JSScript::JITScriptHandle *jith = script->jitHandle(construct, cx->compartment->needsBarrier());
|
||||||
if (jith->isUnjittable())
|
if (jith->isUnjittable())
|
||||||
return Compile_Abort;
|
return Compile_Abort;
|
||||||
@ -953,7 +953,7 @@ mjit::CanMethodJIT(JSContext *cx, JSScript *script, jsbytecode *pc,
|
|||||||
|
|
||||||
uint64_t gcNumber = cx->runtime->gcNumber;
|
uint64_t gcNumber = cx->runtime->gcNumber;
|
||||||
|
|
||||||
if (!script->ensureHasJITInfo(cx))
|
if (!script->ensureHasMJITInfo(cx))
|
||||||
return Compile_Error;
|
return Compile_Error;
|
||||||
|
|
||||||
JSScript::JITScriptHandle *jith = script->jitHandle(construct, cx->compartment->needsBarrier());
|
JSScript::JITScriptHandle *jith = script->jitHandle(construct, cx->compartment->needsBarrier());
|
||||||
|
@ -1362,10 +1362,10 @@ JSScript::JITScriptHandle::staticAsserts()
|
|||||||
size_t
|
size_t
|
||||||
JSScript::sizeOfJitScripts(JSMallocSizeOfFun mallocSizeOf)
|
JSScript::sizeOfJitScripts(JSMallocSizeOfFun mallocSizeOf)
|
||||||
{
|
{
|
||||||
if (!hasJITInfo())
|
if (!hasMJITInfo())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
size_t n = mallocSizeOf(jitInfo);
|
size_t n = mallocSizeOf(mJITInfo);
|
||||||
for (int constructing = 0; constructing <= 1; constructing++) {
|
for (int constructing = 0; constructing <= 1; constructing++) {
|
||||||
for (int barriers = 0; barriers <= 1; barriers++) {
|
for (int barriers = 0; barriers <= 1; barriers++) {
|
||||||
JITScript *jit = getJIT((bool) constructing, (bool) barriers);
|
JITScript *jit = getJIT((bool) constructing, (bool) barriers);
|
||||||
|
@ -870,7 +870,7 @@ CanMethodJIT(JSContext *cx, JSScript *script, jsbytecode *pc,
|
|||||||
inline void
|
inline void
|
||||||
ReleaseScriptCode(FreeOp *fop, JSScript *script)
|
ReleaseScriptCode(FreeOp *fop, JSScript *script)
|
||||||
{
|
{
|
||||||
if (!script->hasJITInfo())
|
if (!script->hasMJITInfo())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (int constructing = 0; constructing <= 1; constructing++) {
|
for (int constructing = 0; constructing <= 1; constructing++) {
|
||||||
@ -881,7 +881,7 @@ ReleaseScriptCode(FreeOp *fop, JSScript *script)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
script->destroyJITInfo(fop);
|
script->destroyMJITInfo(fop);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Expand all stack frames inlined by the JIT within a compartment.
|
// Expand all stack frames inlined by the JIT within a compartment.
|
||||||
|
@ -573,10 +573,10 @@ class CallCompiler : public BaseCompiler
|
|||||||
masm.loadPtr(scriptAddr, t0);
|
masm.loadPtr(scriptAddr, t0);
|
||||||
|
|
||||||
// Test that:
|
// Test that:
|
||||||
// - script->jitInfo is not NULL
|
// - script->mJITInfo is not NULL
|
||||||
// - script->jitInfo->jitHandle{Ctor,Normal}->value is neither NULL nor UNJITTABLE, and
|
// - script->mJITInfo->jitHandle{Ctor,Normal}->value is neither NULL nor UNJITTABLE, and
|
||||||
// - script->jitInfo->jitHandle{Ctor,Normal}->value->arityCheckEntry is not NULL.
|
// - script->mJITInfo->jitHandle{Ctor,Normal}->value->arityCheckEntry is not NULL.
|
||||||
masm.loadPtr(Address(t0, JSScript::offsetOfJITInfo()), t0);
|
masm.loadPtr(Address(t0, JSScript::offsetOfMJITInfo()), t0);
|
||||||
Jump hasNoJitInfo = masm.branchPtr(Assembler::Equal, t0, ImmPtr(NULL));
|
Jump hasNoJitInfo = masm.branchPtr(Assembler::Equal, t0, ImmPtr(NULL));
|
||||||
size_t offset = JSScript::JITScriptSet::jitHandleOffset(callingNew,
|
size_t offset = JSScript::JITScriptSet::jitHandleOffset(callingNew,
|
||||||
f.cx->compartment->needsBarrier());
|
f.cx->compartment->needsBarrier());
|
||||||
|
@ -394,7 +394,7 @@ ClearAllFrames(JSCompartment *compartment)
|
|||||||
void
|
void
|
||||||
Recompiler::clearStackReferences(FreeOp *fop, JSScript *script)
|
Recompiler::clearStackReferences(FreeOp *fop, JSScript *script)
|
||||||
{
|
{
|
||||||
JS_ASSERT(script->hasJITInfo());
|
JS_ASSERT(script->hasMJITInfo());
|
||||||
|
|
||||||
JaegerSpew(JSpew_Recompile, "recompiling script (file \"%s\") (line \"%d\") (length \"%d\")\n",
|
JaegerSpew(JSpew_Recompile, "recompiling script (file \"%s\") (line \"%d\") (length \"%d\")\n",
|
||||||
script->filename, script->lineno, script->length);
|
script->filename, script->lineno, script->length);
|
||||||
|
@ -233,7 +233,7 @@ void
|
|||||||
BreakpointSite::recompile(FreeOp *fop)
|
BreakpointSite::recompile(FreeOp *fop)
|
||||||
{
|
{
|
||||||
#ifdef JS_METHODJIT
|
#ifdef JS_METHODJIT
|
||||||
if (script->hasJITInfo()) {
|
if (script->hasMJITInfo()) {
|
||||||
mjit::Recompiler::clearStackReferences(fop, script);
|
mjit::Recompiler::clearStackReferences(fop, script);
|
||||||
mjit::ReleaseScriptCode(fop, script);
|
mjit::ReleaseScriptCode(fop, script);
|
||||||
}
|
}
|
||||||
|
@ -504,7 +504,7 @@ GlobalObject::clear(JSContext *cx)
|
|||||||
*/
|
*/
|
||||||
for (gc::CellIter i(cx->compartment, gc::FINALIZE_SCRIPT); !i.done(); i.next()) {
|
for (gc::CellIter i(cx->compartment, gc::FINALIZE_SCRIPT); !i.done(); i.next()) {
|
||||||
JSScript *script = i.get<JSScript>();
|
JSScript *script = i.get<JSScript>();
|
||||||
if (script->compileAndGo && script->hasJITInfo() && script->hasClearedGlobal()) {
|
if (script->compileAndGo && script->hasMJITInfo() && script->hasClearedGlobal()) {
|
||||||
mjit::Recompiler::clearStackReferences(cx->runtime->defaultFreeOp(), script);
|
mjit::Recompiler::clearStackReferences(cx->runtime->defaultFreeOp(), script);
|
||||||
mjit::ReleaseScriptCode(cx->runtime->defaultFreeOp(), script);
|
mjit::ReleaseScriptCode(cx->runtime->defaultFreeOp(), script);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user