author | David Mandelin <dmandelin@mozilla.com> |
Fri, 27 Jul 2012 15:49:11 -0700 | |
changeset 100784 | 88ca3f681c99ea89b8ec0715315a4340fec3d3d7 |
parent 100783 | fa933ff1f137a70773e3b78fda00560875d60f23 |
child 100785 | 83a4dfef9a7d9d24dfc1c1b65a0ea5c12d0261a1 |
push id | 23193 |
push user | ryanvm@gmail.com |
push date | Sat, 28 Jul 2012 21:54:39 +0000 |
treeherder | mozilla-central@29bff59d3bbe [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
milestone | 17.0a1 |
backs out | 8bd9d81db80aa4c09eaf63680f42c1120d90b181 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/js/src/jsinferinlines.h +++ b/js/src/jsinferinlines.h @@ -278,17 +278,17 @@ struct AutoEnterCompilation return false; return true; } ~AutoEnterCompilation() { CompilerOutput *co = info.compilerOutput(cx); #ifdef JS_METHODJIT - if (co->script->hasMJITInfo()) + if (co->script->hasJITInfo()) co->mjit = co->script->getJIT(co->constructing, co->barriers); #endif info.outputIndex = RecompileInfo::NoCompilerRunning; } }; ///////////////////////////////////////////////////////////////////// // Interface functions
--- a/js/src/jsscript.cpp +++ b/js/src/jsscript.cpp @@ -2425,17 +2425,17 @@ JSScript::ensureHasDebugScript(JSContext return true; } void JSScript::recompileForStepMode(FreeOp *fop) { #ifdef JS_METHODJIT - if (hasMJITInfo()) { + if (hasJITInfo()) { mjit::Recompiler::clearStackReferences(fop, this); mjit::ReleaseScriptCode(fop, this); } #endif } bool JSScript::tryNewStepMode(JSContext *cx, uint32_t newValue) @@ -2688,17 +2688,17 @@ JSScript::argumentsOptimizationFailed(JS /* Note: 'arguments' may have already been overwritten. */ if (fp->unaliasedLocal(var).isMagic(JS_OPTIMIZED_ARGUMENTS)) fp->unaliasedLocal(var) = ObjectValue(*argsobj); } } #ifdef JS_METHODJIT - if (script->hasMJITInfo()) { + if (script->hasJITInfo()) { mjit::ExpandInlineFrames(cx->compartment); mjit::Recompiler::clearStackReferences(cx->runtime->defaultFreeOp(), script); mjit::ReleaseScriptCode(cx->runtime->defaultFreeOp(), script); } #endif if (script->hasAnalysis() && script->analysis()->ranInference()) { types::AutoEnterTypeInference enter(cx);
--- a/js/src/jsscript.h +++ b/js/src/jsscript.h @@ -436,17 +436,17 @@ struct JSScript : public js::gc::Cell /* Persistent type information retained across GCs. */ js::types::TypeScript *types; js::ScriptSource *source; /* source code */ private: #ifdef JS_METHODJIT - JITScriptSet *mJITInfo; + JITScriptSet *jitInfo; #endif js::HeapPtrFunction function_; js::HeapPtrObject enclosingScope_; // 32-bit fields. public: uint32_t length; /* length of code vector */ @@ -675,34 +675,34 @@ struct JSScript : public js::gc::Cell #ifdef JS_METHODJIT private: // CallCompiler must be a friend because it generates code that directly // accesses jitHandleNormal/jitHandleCtor, via jitHandleOffset(). friend class js::mjit::CallCompiler; public: - bool hasMJITInfo() { - return mJITInfo != NULL; + bool hasJITInfo() { + return jitInfo != NULL; } - static size_t offsetOfMJITInfo() { return offsetof(JSScript, mJITInfo); } + static size_t offsetOfJITInfo() { return offsetof(JSScript, jitInfo); } - inline bool ensureHasMJITInfo(JSContext *cx); - inline void destroyMJITInfo(js::FreeOp *fop); + inline bool ensureHasJITInfo(JSContext *cx); + inline void destroyJITInfo(js::FreeOp *fop); JITScriptHandle *jitHandle(bool constructing, bool barriers) { - JS_ASSERT(mJITInfo); + JS_ASSERT(jitInfo); return constructing - ? (barriers ? &mJITInfo->jitHandleCtorBarriered : &mJITInfo->jitHandleCtor) - : (barriers ? &mJITInfo->jitHandleNormalBarriered : &mJITInfo->jitHandleNormal); + ? (barriers ? &jitInfo->jitHandleCtorBarriered : &jitInfo->jitHandleCtor) + : (barriers ? &jitInfo->jitHandleNormalBarriered : &jitInfo->jitHandleNormal); } js::mjit::JITScript *getJIT(bool constructing, bool barriers) { - if (!mJITInfo) + if (!jitInfo) return NULL; JITScriptHandle *jith = jitHandle(constructing, barriers); return jith->isValid() ? jith->getValid() : NULL; } static void ReleaseCode(js::FreeOp *fop, JITScriptHandle *jith); // These methods are implemented in MethodJIT.h.
--- a/js/src/jsscriptinlines.h +++ b/js/src/jsscriptinlines.h @@ -189,29 +189,29 @@ inline bool JSScript::hasClearedGlobal() const { JS_ASSERT(types); return global().isCleared(); } #ifdef JS_METHODJIT inline bool -JSScript::ensureHasMJITInfo(JSContext *cx) +JSScript::ensureHasJITInfo(JSContext *cx) { - if (mJITInfo) + if (jitInfo) return true; - mJITInfo = cx->new_<JITScriptSet>(); - return mJITInfo != NULL; + jitInfo = cx->new_<JITScriptSet>(); + return jitInfo != NULL; } inline void -JSScript::destroyMJITInfo(js::FreeOp *fop) +JSScript::destroyJITInfo(js::FreeOp *fop) { - fop->delete_(mJITInfo); - mJITInfo = NULL; + fop->delete_(jitInfo); + jitInfo = NULL; } #endif /* JS_METHODJIT */ inline void JSScript::writeBarrierPre(JSScript *script) { #ifdef JSGC_INCREMENTAL if (!script)
--- a/js/src/methodjit/Compiler.cpp +++ b/js/src/methodjit/Compiler.cpp @@ -106,17 +106,17 @@ mjit::Compiler::Compiler(JSContext *cx, CompileStatus mjit::Compiler::compile() { JS_ASSERT(!outerChunkRef().chunk); CompileStatus status = performCompilation(); if (status != Compile_Okay && status != Compile_Retry) { - if (!outerScript->ensureHasMJITInfo(cx)) + if (!outerScript->ensureHasJITInfo(cx)) return Compile_Error; JSScript::JITScriptHandle *jith = outerScript->jitHandle(isConstructing, cx->compartment->needsBarrier()); JSScript::ReleaseCode(cx->runtime->defaultFreeOp(), jith); jith->setUnjittable(); if (outerScript->function()) { outerScript->uninlineable = true; types::MarkTypeObjectFlags(cx, outerScript->function(), @@ -925,17 +925,17 @@ mjit::CanMethodJIT(JSContext *cx, JSScri * If an SPS frame has already been pushed and profiling has since been * turned off, then we can't enter the jit because the epilogue of a pop * will not be emitted. Otherwise, we're safe with respect to balancing the * push/pops to the SPS sampling stack. */ if (frame->hasPushedSPSFrame() && !cx->runtime->spsProfiler.enabled()) return Compile_Skipped; - if (script->hasMJITInfo()) { + if (script->hasJITInfo()) { JSScript::JITScriptHandle *jith = script->jitHandle(construct, cx->compartment->needsBarrier()); if (jith->isUnjittable()) return Compile_Abort; } if (!cx->hasRunOption(JSOPTION_METHODJIT_ALWAYS) && (cx->typeInferenceEnabled() ? script->incUseCount() <= INFER_USES_BEFORE_COMPILE @@ -948,17 +948,17 @@ mjit::CanMethodJIT(JSContext *cx, JSScri return Compile_Error; // Ensure that constructors have at least one slot. if (construct && !script->nslots) script->nslots++; uint64_t gcNumber = cx->runtime->gcNumber; - if (!script->ensureHasMJITInfo(cx)) + if (!script->ensureHasJITInfo(cx)) return Compile_Error; JSScript::JITScriptHandle *jith = script->jitHandle(construct, cx->compartment->needsBarrier()); JITScript *jit; if (jith->isEmpty()) { jit = MakeJITScript(cx, script); if (!jit)
--- a/js/src/methodjit/MethodJIT.cpp +++ b/js/src/methodjit/MethodJIT.cpp @@ -1357,20 +1357,20 @@ JSScript::JITScriptHandle::staticAsserts JS_STATIC_ASSERT(JS_ALIGNMENT_OF(JSScript::JITScriptHandle) == JS_ALIGNMENT_OF(js::mjit::JITScript *)); JS_STATIC_ASSERT(offsetof(JSScript::JITScriptHandle, value) == 0); } size_t JSScript::sizeOfJitScripts(JSMallocSizeOfFun mallocSizeOf) { - if (!hasMJITInfo()) + if (!hasJITInfo()) return 0; - size_t n = mallocSizeOf(mJITInfo); + size_t n = mallocSizeOf(jitInfo); for (int constructing = 0; constructing <= 1; constructing++) { for (int barriers = 0; barriers <= 1; barriers++) { JITScript *jit = getJIT((bool) constructing, (bool) barriers); if (jit) n += jit->sizeOfIncludingThis(mallocSizeOf); } } return n;
--- a/js/src/methodjit/MethodJIT.h +++ b/js/src/methodjit/MethodJIT.h @@ -865,28 +865,28 @@ enum CompileRequest CompileStatus CanMethodJIT(JSContext *cx, JSScript *script, jsbytecode *pc, bool construct, CompileRequest request, StackFrame *sp); inline void ReleaseScriptCode(FreeOp *fop, JSScript *script) { - if (!script->hasMJITInfo()) + if (!script->hasJITInfo()) return; for (int constructing = 0; constructing <= 1; constructing++) { for (int barriers = 0; barriers <= 1; barriers++) { JSScript::JITScriptHandle *jith = script->jitHandle((bool) constructing, (bool) barriers); if (jith && jith->isValid()) JSScript::ReleaseCode(fop, jith); } } - script->destroyMJITInfo(fop); + script->destroyJITInfo(fop); } // Expand all stack frames inlined by the JIT within a compartment. void ExpandInlineFrames(JSCompartment *compartment); // Return all VMFrames in a compartment to the interpreter. This must be // followed by destroying all JIT code in the compartment.
--- a/js/src/methodjit/MonoIC.cpp +++ b/js/src/methodjit/MonoIC.cpp @@ -568,20 +568,20 @@ class CallCompiler : public BaseCompiler void *ncode = ic.funGuard.labelAtOffset(ic.joinPointOffset).executableAddress(); inlFrame.assemble(ncode, f.pc()); /* funObjReg is still valid. Check if a compilation is needed. */ Address scriptAddr(ic.funObjReg, JSFunction::offsetOfNativeOrScript()); masm.loadPtr(scriptAddr, t0); // Test that: - // - 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); + // - 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); Jump hasNoJitInfo = masm.branchPtr(Assembler::Equal, t0, ImmPtr(NULL)); size_t offset = JSScript::JITScriptSet::jitHandleOffset(callingNew, f.cx->compartment->needsBarrier()); masm.loadPtr(Address(t0, offset), t0); Jump hasNoJitCode = masm.branchPtr(Assembler::BelowOrEqual, t0, ImmPtr(JSScript::JITScriptHandle::UNJITTABLE)); masm.loadPtr(Address(t0, offsetof(JITScript, arityCheckEntry)), t0);
--- a/js/src/methodjit/Retcon.cpp +++ b/js/src/methodjit/Retcon.cpp @@ -389,17 +389,17 @@ ClearAllFrames(JSCompartment *compartmen * * - For VMFrames whose entryncode address (the value of entryfp->ncode before * being clobbered with JaegerTrampolineReturn) is in the original script, * redirect that entryncode to the interpoline. */ void Recompiler::clearStackReferences(FreeOp *fop, JSScript *script) { - JS_ASSERT(script->hasMJITInfo()); + JS_ASSERT(script->hasJITInfo()); JaegerSpew(JSpew_Recompile, "recompiling script (file \"%s\") (line \"%d\") (length \"%d\")\n", script->filename, script->lineno, script->length); JSCompartment *comp = script->compartment(); types::AutoEnterTypeInference enter(fop, comp); /*
--- a/js/src/vm/Debugger.cpp +++ b/js/src/vm/Debugger.cpp @@ -228,17 +228,17 @@ BreakpointSite::BreakpointSite(JSScript JS_ASSERT(!script->hasBreakpointsAt(pc)); JS_INIT_CLIST(&breakpoints); } void BreakpointSite::recompile(FreeOp *fop) { #ifdef JS_METHODJIT - if (script->hasMJITInfo()) { + if (script->hasJITInfo()) { mjit::Recompiler::clearStackReferences(fop, script); mjit::ReleaseScriptCode(fop, script); } #endif } void BreakpointSite::inc(FreeOp *fop)
--- a/js/src/vm/GlobalObject.cpp +++ b/js/src/vm/GlobalObject.cpp @@ -499,17 +499,17 @@ GlobalObject::clear(JSContext *cx) #ifdef JS_METHODJIT /* * Destroy compiled code for any scripts parented to this global. Call ICs * can directly call scripts which have associated JIT code, and do so * without checking whether the script's global has been cleared. */ for (gc::CellIter i(cx->compartment, gc::FINALIZE_SCRIPT); !i.done(); i.next()) { JSScript *script = i.get<JSScript>(); - if (script->compileAndGo && script->hasMJITInfo() && script->hasClearedGlobal()) { + if (script->compileAndGo && script->hasJITInfo() && script->hasClearedGlobal()) { mjit::Recompiler::clearStackReferences(cx->runtime->defaultFreeOp(), script); mjit::ReleaseScriptCode(cx->runtime->defaultFreeOp(), script); } } #endif } bool