mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1038563 - Rename JS::Zone's jit-specific barrier state from Ion to jit. r=jandem
This commit is contained in:
parent
7219695112
commit
5aac5cee18
@ -251,7 +251,7 @@ gc::GCRuntime::startVerifyPreBarriers()
|
||||
rt->setNeedsBarrier(true);
|
||||
for (ZonesIter zone(rt, WithAtoms); !zone.done(); zone.next()) {
|
||||
PurgeJITCaches(zone);
|
||||
zone->setNeedsBarrier(true, Zone::UpdateIon);
|
||||
zone->setNeedsBarrier(true, Zone::UpdateJit);
|
||||
zone->allocator.arenas.purge();
|
||||
}
|
||||
|
||||
@ -336,7 +336,7 @@ gc::GCRuntime::endVerifyPreBarriers()
|
||||
if (!zone->needsBarrier())
|
||||
compartmentCreated = true;
|
||||
|
||||
zone->setNeedsBarrier(false, Zone::UpdateIon);
|
||||
zone->setNeedsBarrier(false, Zone::UpdateJit);
|
||||
PurgeJITCaches(zone);
|
||||
}
|
||||
rt->setNeedsBarrier(false);
|
||||
|
@ -42,7 +42,7 @@ JS::Zone::Zone(JSRuntime *rt)
|
||||
gcState_(NoGC),
|
||||
gcScheduled_(false),
|
||||
gcPreserveCode_(false),
|
||||
ionUsingBarriers_(false)
|
||||
jitUsingBarriers_(false)
|
||||
{
|
||||
/* Ensure that there are no vtables to mess us up here. */
|
||||
JS_ASSERT(reinterpret_cast<JS::shadow::Zone *>(this) ==
|
||||
@ -68,12 +68,12 @@ bool Zone::init()
|
||||
}
|
||||
|
||||
void
|
||||
Zone::setNeedsBarrier(bool needs, ShouldUpdateIon updateIon)
|
||||
Zone::setNeedsBarrier(bool needs, ShouldUpdateJit updateJit)
|
||||
{
|
||||
#ifdef JS_ION
|
||||
if (updateIon == UpdateIon && needs != ionUsingBarriers_) {
|
||||
if (updateJit == UpdateJit && needs != jitUsingBarriers_) {
|
||||
jit::ToggleBarriers(this, needs);
|
||||
ionUsingBarriers_ = needs;
|
||||
jitUsingBarriers_ = needs;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -187,8 +187,8 @@ struct Zone : public JS::shadow::Zone,
|
||||
return needsBarrier || runtimeFromMainThread()->gcZeal() == js::gc::ZealVerifierPreValue;
|
||||
}
|
||||
|
||||
enum ShouldUpdateIon { DontUpdateIon, UpdateIon };
|
||||
void setNeedsBarrier(bool needs, ShouldUpdateIon updateIon);
|
||||
enum ShouldUpdateJit { DontUpdateJit, UpdateJit };
|
||||
void setNeedsBarrier(bool needs, ShouldUpdateJit updateJit);
|
||||
const bool *addressOfNeedsBarrier() const { return &needsBarrier_; }
|
||||
|
||||
js::jit::JitZone *getJitZone(JSContext *cx) { return jitZone_ ? jitZone_ : createJitZone(cx); }
|
||||
@ -274,7 +274,7 @@ struct Zone : public JS::shadow::Zone,
|
||||
GCState gcState_;
|
||||
bool gcScheduled_;
|
||||
bool gcPreserveCode_;
|
||||
bool ionUsingBarriers_;
|
||||
bool jitUsingBarriers_;
|
||||
|
||||
friend bool js::CurrentThreadCanAccessZone(Zone *zone);
|
||||
friend class js::gc::GCRuntime;
|
||||
|
@ -3848,7 +3848,7 @@ GCRuntime::getNextZoneGroup()
|
||||
for (GCZoneGroupIter zone(rt); !zone.done(); zone.next()) {
|
||||
JS_ASSERT(!zone->gcNextGraphComponent);
|
||||
JS_ASSERT(zone->isGCMarking());
|
||||
zone->setNeedsBarrier(false, Zone::UpdateIon);
|
||||
zone->setNeedsBarrier(false, Zone::UpdateJit);
|
||||
zone->setGCState(Zone::NoGC);
|
||||
zone->gcGrayRoots.clearAndFree();
|
||||
}
|
||||
@ -4663,7 +4663,7 @@ GCRuntime::resetIncrementalGC(const char *reason)
|
||||
|
||||
for (GCZonesIter zone(rt); !zone.done(); zone.next()) {
|
||||
JS_ASSERT(zone->isGCMarking());
|
||||
zone->setNeedsBarrier(false, Zone::UpdateIon);
|
||||
zone->setNeedsBarrier(false, Zone::UpdateJit);
|
||||
zone->setGCState(Zone::NoGC);
|
||||
}
|
||||
rt->setNeedsBarrier(false);
|
||||
@ -4744,7 +4744,7 @@ AutoGCSlice::AutoGCSlice(JSRuntime *rt)
|
||||
*/
|
||||
if (zone->isGCMarking()) {
|
||||
JS_ASSERT(zone->needsBarrier());
|
||||
zone->setNeedsBarrier(false, Zone::DontUpdateIon);
|
||||
zone->setNeedsBarrier(false, Zone::DontUpdateJit);
|
||||
} else {
|
||||
JS_ASSERT(!zone->needsBarrier());
|
||||
}
|
||||
@ -4759,11 +4759,11 @@ AutoGCSlice::~AutoGCSlice()
|
||||
bool haveBarriers = false;
|
||||
for (ZonesIter zone(runtime, WithAtoms); !zone.done(); zone.next()) {
|
||||
if (zone->isGCMarking()) {
|
||||
zone->setNeedsBarrier(true, Zone::UpdateIon);
|
||||
zone->setNeedsBarrier(true, Zone::UpdateJit);
|
||||
zone->allocator.arenas.prepareForIncrementalGC(runtime);
|
||||
haveBarriers = true;
|
||||
} else {
|
||||
zone->setNeedsBarrier(false, Zone::UpdateIon);
|
||||
zone->setNeedsBarrier(false, Zone::UpdateJit);
|
||||
}
|
||||
}
|
||||
runtime->setNeedsBarrier(haveBarriers);
|
||||
|
Loading…
Reference in New Issue
Block a user