No bug - Rename JitInfo mJITInfo. (r=bhackett)

This commit is contained in:
Eric Faust 2012-07-26 19:44:52 -07:00
parent ad3c2e474a
commit 75cd584e97
10 changed files with 33 additions and 33 deletions

View File

@ -2422,7 +2422,7 @@ void
JSScript::recompileForStepMode(FreeOp *fop)
{
#ifdef JS_METHODJIT
if (hasJITInfo()) {
if (hasMJITInfo()) {
mjit::Recompiler::clearStackReferences(fop, this);
mjit::ReleaseScriptCode(fop, this);
}
@ -2685,7 +2685,7 @@ JSScript::argumentsOptimizationFailed(JSContext *cx, JSScript *script_)
}
#ifdef JS_METHODJIT
if (script->hasJITInfo()) {
if (script->hasMJITInfo()) {
mjit::ExpandInlineFrames(cx->compartment);
mjit::Recompiler::clearStackReferences(cx->runtime->defaultFreeOp(), script);
mjit::ReleaseScriptCode(cx->runtime->defaultFreeOp(), script);

View File

@ -441,7 +441,7 @@ struct JSScript : public js::gc::Cell
private:
#ifdef JS_METHODJIT
JITScriptSet *jitInfo;
JITScriptSet *mJITInfo;
#endif
js::HeapPtrFunction function_;
js::HeapPtrObject enclosingScope_;
@ -680,24 +680,24 @@ struct JSScript : public js::gc::Cell
friend class js::mjit::CallCompiler;
public:
bool hasJITInfo() {
return jitInfo != NULL;
bool hasMJITInfo() {
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 void destroyJITInfo(js::FreeOp *fop);
inline bool ensureHasMJITInfo(JSContext *cx);
inline void destroyMJITInfo(js::FreeOp *fop);
JITScriptHandle *jitHandle(bool constructing, bool barriers) {
JS_ASSERT(jitInfo);
JS_ASSERT(mJITInfo);
return constructing
? (barriers ? &jitInfo->jitHandleCtorBarriered : &jitInfo->jitHandleCtor)
: (barriers ? &jitInfo->jitHandleNormalBarriered : &jitInfo->jitHandleNormal);
? (barriers ? &mJITInfo->jitHandleCtorBarriered : &mJITInfo->jitHandleCtor)
: (barriers ? &mJITInfo->jitHandleNormalBarriered : &mJITInfo->jitHandleNormal);
}
js::mjit::JITScript *getJIT(bool constructing, bool barriers) {
if (!jitInfo)
if (!mJITInfo)
return NULL;
JITScriptHandle *jith = jitHandle(constructing, barriers);
return jith->isValid() ? jith->getValid() : NULL;

View File

@ -194,19 +194,19 @@ JSScript::hasClearedGlobal() const
#ifdef JS_METHODJIT
inline bool
JSScript::ensureHasJITInfo(JSContext *cx)
JSScript::ensureHasMJITInfo(JSContext *cx)
{
if (jitInfo)
if (mJITInfo)
return true;
jitInfo = cx->new_<JITScriptSet>();
return jitInfo != NULL;
mJITInfo = cx->new_<JITScriptSet>();
return mJITInfo != NULL;
}
inline void
JSScript::destroyJITInfo(js::FreeOp *fop)
JSScript::destroyMJITInfo(js::FreeOp *fop)
{
fop->delete_(jitInfo);
jitInfo = NULL;
fop->delete_(mJITInfo);
mJITInfo = NULL;
}
#endif /* JS_METHODJIT */

View File

@ -111,7 +111,7 @@ mjit::Compiler::compile()
CompileStatus status = performCompilation();
if (status != Compile_Okay && status != Compile_Retry) {
if (!outerScript->ensureHasJITInfo(cx))
if (!outerScript->ensureHasMJITInfo(cx))
return Compile_Error;
JSScript::JITScriptHandle *jith = outerScript->jitHandle(isConstructing, cx->compartment->needsBarrier());
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())
return Compile_Skipped;
if (script->hasJITInfo()) {
if (script->hasMJITInfo()) {
JSScript::JITScriptHandle *jith = script->jitHandle(construct, cx->compartment->needsBarrier());
if (jith->isUnjittable())
return Compile_Abort;
@ -953,7 +953,7 @@ mjit::CanMethodJIT(JSContext *cx, JSScript *script, jsbytecode *pc,
uint64_t gcNumber = cx->runtime->gcNumber;
if (!script->ensureHasJITInfo(cx))
if (!script->ensureHasMJITInfo(cx))
return Compile_Error;
JSScript::JITScriptHandle *jith = script->jitHandle(construct, cx->compartment->needsBarrier());

View File

@ -1362,10 +1362,10 @@ JSScript::JITScriptHandle::staticAsserts()
size_t
JSScript::sizeOfJitScripts(JSMallocSizeOfFun mallocSizeOf)
{
if (!hasJITInfo())
if (!hasMJITInfo())
return 0;
size_t n = mallocSizeOf(jitInfo);
size_t n = mallocSizeOf(mJITInfo);
for (int constructing = 0; constructing <= 1; constructing++) {
for (int barriers = 0; barriers <= 1; barriers++) {
JITScript *jit = getJIT((bool) constructing, (bool) barriers);

View File

@ -870,7 +870,7 @@ CanMethodJIT(JSContext *cx, JSScript *script, jsbytecode *pc,
inline void
ReleaseScriptCode(FreeOp *fop, JSScript *script)
{
if (!script->hasJITInfo())
if (!script->hasMJITInfo())
return;
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.

View File

@ -573,10 +573,10 @@ class CallCompiler : public BaseCompiler
masm.loadPtr(scriptAddr, t0);
// Test that:
// - script->jitInfo is not NULL
// - script->jitInfo->jitHandle{Ctor,Normal}->value is neither NULL nor UNJITTABLE, and
// - script->jitInfo->jitHandle{Ctor,Normal}->value->arityCheckEntry is not NULL.
masm.loadPtr(Address(t0, JSScript::offsetOfJITInfo()), t0);
// - script->mJITInfo is not NULL
// - script->mJITInfo->jitHandle{Ctor,Normal}->value is neither NULL nor UNJITTABLE, and
// - script->mJITInfo->jitHandle{Ctor,Normal}->value->arityCheckEntry is not NULL.
masm.loadPtr(Address(t0, JSScript::offsetOfMJITInfo()), t0);
Jump hasNoJitInfo = masm.branchPtr(Assembler::Equal, t0, ImmPtr(NULL));
size_t offset = JSScript::JITScriptSet::jitHandleOffset(callingNew,
f.cx->compartment->needsBarrier());

View File

@ -394,7 +394,7 @@ ClearAllFrames(JSCompartment *compartment)
void
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",
script->filename, script->lineno, script->length);

View File

@ -233,7 +233,7 @@ void
BreakpointSite::recompile(FreeOp *fop)
{
#ifdef JS_METHODJIT
if (script->hasJITInfo()) {
if (script->hasMJITInfo()) {
mjit::Recompiler::clearStackReferences(fop, script);
mjit::ReleaseScriptCode(fop, script);
}

View File

@ -504,7 +504,7 @@ GlobalObject::clear(JSContext *cx)
*/
for (gc::CellIter i(cx->compartment, gc::FINALIZE_SCRIPT); !i.done(); i.next()) {
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::ReleaseScriptCode(cx->runtime->defaultFreeOp(), script);
}