зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1549986 - Make all concrete implementations of JSTracer final to aid devirtualization r=sfink?
Differential Revision: https://phabricator.services.mozilla.com/D30362 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
6d85f4e2fa
Коммит
94e50ef5a8
|
@ -1369,7 +1369,7 @@ static bool NondeterministicGetWeakMapKeys(JSContext* cx, unsigned argc,
|
|||
return true;
|
||||
}
|
||||
|
||||
class HasChildTracer : public JS::CallbackTracer {
|
||||
class HasChildTracer final : public JS::CallbackTracer {
|
||||
RootedValue child_;
|
||||
bool found_;
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
namespace js {
|
||||
namespace gc {
|
||||
|
||||
struct ClearEdgesTracer : public JS::CallbackTracer {
|
||||
struct ClearEdgesTracer final : public JS::CallbackTracer {
|
||||
ClearEdgesTracer();
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
|
@ -4066,7 +4066,7 @@ bool GCRuntime::shouldPreserveJITCode(Realm* realm,
|
|||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
class CompartmentCheckTracer : public JS::CallbackTracer {
|
||||
class CompartmentCheckTracer final : public JS::CallbackTracer {
|
||||
void onChild(const JS::GCCellPtr& thing) override;
|
||||
|
||||
public:
|
||||
|
|
|
@ -149,7 +149,7 @@ void CheckHashTablesAfterMovingGC(JSRuntime* rt);
|
|||
void CheckHeapAfterGC(JSRuntime* rt);
|
||||
#endif
|
||||
|
||||
struct MovingTracer : JS::CallbackTracer {
|
||||
struct MovingTracer final : public JS::CallbackTracer {
|
||||
explicit MovingTracer(JSRuntime* rt)
|
||||
: CallbackTracer(rt, TraceWeakMapKeysValues) {}
|
||||
|
||||
|
|
|
@ -3371,7 +3371,7 @@ FOR_EACH_PUBLIC_TAGGED_GC_POINTER_TYPE(INSTANTIATE_INTERNAL_MARKING_FUNCTIONS)
|
|||
*/
|
||||
|
||||
#ifdef DEBUG
|
||||
struct AssertNonGrayTracer : public JS::CallbackTracer {
|
||||
struct AssertNonGrayTracer final : public JS::CallbackTracer {
|
||||
explicit AssertNonGrayTracer(JSRuntime* rt) : JS::CallbackTracer(rt) {}
|
||||
void onChild(const JS::GCCellPtr& thing) override {
|
||||
MOZ_ASSERT(!thing.asCell()->isMarkedGray());
|
||||
|
@ -3379,7 +3379,7 @@ struct AssertNonGrayTracer : public JS::CallbackTracer {
|
|||
};
|
||||
#endif
|
||||
|
||||
class UnmarkGrayTracer : public JS::CallbackTracer {
|
||||
class UnmarkGrayTracer final : public JS::CallbackTracer {
|
||||
public:
|
||||
// We set weakMapAction to DoNotTraceWeakMaps because the cycle collector
|
||||
// will fix up any color mismatches involving weakmaps when it runs.
|
||||
|
|
|
@ -415,7 +415,7 @@ void js::gc::GCRuntime::traceRuntimeCommon(JSTracer* trc,
|
|||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
class AssertNoRootsTracer : public JS::CallbackTracer {
|
||||
class AssertNoRootsTracer final : public JS::CallbackTracer {
|
||||
void onChild(const JS::GCCellPtr& thing) override {
|
||||
MOZ_CRASH("There should not be any roots after finishRoots");
|
||||
}
|
||||
|
|
|
@ -266,7 +266,7 @@ static bool IsMarkedOrAllocated(TenuredCell* cell) {
|
|||
return cell->isMarkedAny();
|
||||
}
|
||||
|
||||
struct CheckEdgeTracer : public JS::CallbackTracer {
|
||||
struct CheckEdgeTracer final : public JS::CallbackTracer {
|
||||
VerifyNode* node;
|
||||
explicit CheckEdgeTracer(JSRuntime* rt)
|
||||
: JS::CallbackTracer(rt), node(nullptr) {}
|
||||
|
|
|
@ -71,7 +71,7 @@ static bool ConstructCCW(JSContext* cx, const JSClass* globalClasp,
|
|||
return true;
|
||||
}
|
||||
|
||||
class CCWTestTracer : public JS::CallbackTracer {
|
||||
class CCWTestTracer final : public JS::CallbackTracer {
|
||||
void onChild(const JS::GCCellPtr& thing) override {
|
||||
numberOfThingsTraced++;
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "js/SourceText.h" // JS::Source{Ownership,Text}
|
||||
#include "jsapi-tests/tests.h"
|
||||
|
||||
class TestTracer : public JS::CallbackTracer {
|
||||
class TestTracer final : public JS::CallbackTracer {
|
||||
void onChild(const JS::GCCellPtr& thing) override {
|
||||
if (thing.asCell() == expectedCell && thing.kind() == expectedKind) {
|
||||
found = true;
|
||||
|
|
|
@ -1006,7 +1006,7 @@ extern JS_FRIEND_API int JS::IsGCPoisoning() {
|
|||
#endif
|
||||
}
|
||||
|
||||
struct DumpHeapTracer : public JS::CallbackTracer, public WeakMapTracer {
|
||||
struct DumpHeapTracer final : public JS::CallbackTracer, public WeakMapTracer {
|
||||
const char* prefix;
|
||||
FILE* output;
|
||||
mozilla::MallocSizeOf mallocSizeOf;
|
||||
|
|
|
@ -191,7 +191,7 @@ Value Node::exposeToJS() const {
|
|||
|
||||
// A JS::CallbackTracer subclass that adds a Edge to a Vector for each
|
||||
// edge on which it is invoked.
|
||||
class EdgeVectorTracer : public JS::CallbackTracer {
|
||||
class EdgeVectorTracer final : public JS::CallbackTracer {
|
||||
// The vector to which we add Edges.
|
||||
EdgeVector* vec;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче