mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset c1b7927df546.
This commit is contained in:
parent
b8396b4791
commit
d8024ac298
@ -491,7 +491,7 @@ JSCompartment::markTypes(JSTracer *trc)
|
||||
}
|
||||
|
||||
void
|
||||
JSCompartment::discardJitCode(FreeOp *fop, bool discardConstraints)
|
||||
JSCompartment::discardJitCode(FreeOp *fop)
|
||||
{
|
||||
#ifdef JS_METHODJIT
|
||||
|
||||
@ -527,7 +527,7 @@ JSCompartment::discardJitCode(FreeOp *fop, bool discardConstraints)
|
||||
script->resetUseCount();
|
||||
}
|
||||
|
||||
types.sweepCompilerOutputs(fop, discardConstraints);
|
||||
types.sweepCompilerOutputs(fop);
|
||||
}
|
||||
|
||||
#endif /* JS_METHODJIT */
|
||||
@ -547,7 +547,7 @@ JSCompartment::sweep(FreeOp *fop, bool releaseTypes)
|
||||
{
|
||||
{
|
||||
gcstats::AutoPhase ap(rt->gcStats, gcstats::PHASE_SWEEP_DISCARD_CODE);
|
||||
discardJitCode(fop, !activeAnalysis && !gcPreserveCode);
|
||||
discardJitCode(fop);
|
||||
}
|
||||
|
||||
/* This function includes itself in PHASE_SWEEP_TABLES. */
|
||||
@ -581,7 +581,6 @@ JSCompartment::sweep(FreeOp *fop, bool releaseTypes)
|
||||
}
|
||||
|
||||
if (!activeAnalysis && !gcPreserveCode) {
|
||||
JS_ASSERT(!types.constrainedOutputs);
|
||||
gcstats::AutoPhase ap(rt->gcStats, gcstats::PHASE_DISCARD_ANALYSIS);
|
||||
|
||||
/*
|
||||
|
@ -347,7 +347,7 @@ struct JSCompartment
|
||||
|
||||
void mark(JSTracer *trc);
|
||||
void markTypes(JSTracer *trc);
|
||||
void discardJitCode(js::FreeOp *fop, bool discardConstraints);
|
||||
void discardJitCode(js::FreeOp *fop);
|
||||
bool isDiscardingJitCode(JSTracer *trc);
|
||||
void sweep(js::FreeOp *fop, bool releaseTypes);
|
||||
void sweepCrossCompartmentWrappers();
|
||||
|
@ -3351,7 +3351,7 @@ BeginMarkPhase(JSRuntime *rt)
|
||||
if (rt->gcIsIncremental) {
|
||||
for (GCCompartmentsIter c(rt); !c.done(); c.next()) {
|
||||
gcstats::AutoPhase ap(rt->gcStats, gcstats::PHASE_MARK_DISCARD_CODE);
|
||||
c->discardJitCode(rt->defaultFreeOp(), false);
|
||||
c->discardJitCode(rt->defaultFreeOp());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5849,16 +5849,16 @@ TypeCompartment::sweep(FreeOp *fop)
|
||||
pendingArray = NULL;
|
||||
pendingCapacity = 0;
|
||||
|
||||
sweepCompilerOutputs(fop, true);
|
||||
sweepCompilerOutputs(fop);
|
||||
}
|
||||
|
||||
void
|
||||
TypeCompartment::sweepCompilerOutputs(FreeOp *fop, bool discardConstraints)
|
||||
TypeCompartment::sweepCompilerOutputs(FreeOp *fop)
|
||||
{
|
||||
if (constrainedOutputs) {
|
||||
bool isCompiling = compiledInfo.outputIndex != RecompileInfo::NoCompilerRunning;
|
||||
if (discardConstraints) {
|
||||
JS_ASSERT(!isCompiling);
|
||||
if (isCompiling && !compartment()->activeAnalysis)
|
||||
{
|
||||
#if DEBUG
|
||||
for (unsigned i = 0; i < constrainedOutputs->length(); i++) {
|
||||
CompilerOutput &co = (*constrainedOutputs)[i];
|
||||
@ -5869,9 +5869,10 @@ TypeCompartment::sweepCompilerOutputs(FreeOp *fop, bool discardConstraints)
|
||||
fop->delete_(constrainedOutputs);
|
||||
constrainedOutputs = NULL;
|
||||
} else {
|
||||
// Constraints have captured an index to the constrained outputs
|
||||
// vector. Thus, we invalidate all compilations except the one
|
||||
// which is potentially running now.
|
||||
// A Compilation is running and the AutoEnterCompilation class has
|
||||
// captured an index into the constrained outputs vector and
|
||||
// potentially created multiple types with this index. Instead, we
|
||||
// invalidate all compilations except the one running now.
|
||||
size_t len = constrainedOutputs->length();
|
||||
for (unsigned i = 0; i < len; i++) {
|
||||
if (i != compiledInfo.outputIndex) {
|
||||
|
@ -1180,7 +1180,7 @@ struct TypeCompartment
|
||||
void markSetsUnknown(JSContext *cx, TypeObject *obj);
|
||||
|
||||
void sweep(FreeOp *fop);
|
||||
void sweepCompilerOutputs(FreeOp *fop, bool discardConstraints);
|
||||
void sweepCompilerOutputs(FreeOp *fop);
|
||||
void finalizeObjects();
|
||||
};
|
||||
|
||||
|
@ -336,7 +336,6 @@ struct AutoEnterCompilation
|
||||
info(cx->compartment->types.compiledInfo),
|
||||
mode(mode)
|
||||
{
|
||||
JS_ASSERT(cx->compartment->activeAnalysis);
|
||||
JS_ASSERT(info.outputIndex == RecompileInfo::NoCompilerRunning);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user