Bug 1608183 - Move js::ScopeCreationData to js::frontend namespace r=mgaudet

Differential Revision: https://phabricator.services.mozilla.com/D59827

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Rob Rico 2020-01-16 23:34:09 +00:00
Родитель 679c329501
Коммит c7e51fec5c
4 изменённых файлов: 17 добавлений и 13 удалений

Просмотреть файл

@ -21,11 +21,11 @@ class Scope;
class GlobalScope;
class EvalScope;
class GCMarker;
class ScopeCreationData;
namespace frontend {
struct ParseInfo;
class FunctionBox;
class ScopeCreationData;
} // namespace frontend
using ScopeIndex = frontend::TypedIndex<Scope>;
@ -89,7 +89,7 @@ class AbstractScope {
bool isScopeCreationData() const { return scope_.is<Deferred>(); }
// Note: this handle is rooted in the ParseInfo.
MutableHandle<ScopeCreationData> scopeCreationData() const;
MutableHandle<frontend::ScopeCreationData> scopeCreationData() const;
Scope* scope() const { return scope_.as<HeapPtrScope>(); }

Просмотреть файл

@ -200,11 +200,9 @@ class BigIntCreationData {
using BigIntIndex = TypedIndex<BigIntCreationData>;
} /* namespace frontend */
class ScopeCreationData {
friend class AbstractScope;
friend class GCMarker;
friend class js::AbstractScope;
friend class js::GCMarker;
// The enclosing scope if it exists
AbstractScope enclosing_;
@ -337,12 +335,13 @@ class ScopeCreationData {
}
};
} /* namespace frontend */
} /* namespace js */
namespace JS {
template <>
struct GCPolicy<js::ScopeCreationData*> {
static void trace(JSTracer* trc, js::ScopeCreationData** data,
struct GCPolicy<js::frontend::ScopeCreationData*> {
static void trace(JSTracer* trc, js::frontend::ScopeCreationData** data,
const char* name) {
(*data)->trace(trc);
}

Просмотреть файл

@ -26,6 +26,7 @@
#include "vm/Shape-inl.h"
using namespace js;
using namespace js::frontend;
using mozilla::Maybe;

Просмотреть файл

@ -25,6 +25,10 @@
namespace js {
namespace frontend {
class ScopeCreationData;
};
class BaseScopeData;
class ModuleObject;
class AbstractScope;
@ -239,7 +243,7 @@ class WrappedPtrOperations<Scope*, Wrapper> {
//
class Scope : public js::gc::TenuredCell {
friend class GCMarker;
friend class ScopeCreationData;
friend class frontend::ScopeCreationData;
// The enclosing scope or nullptr.
const GCPtrScope enclosing_;
@ -393,7 +397,7 @@ class LexicalScope : public Scope {
friend class Scope;
friend class BindingIter;
friend class GCMarker;
friend class ScopeCreationData;
friend class frontend::ScopeCreationData;
public:
// Data is public because it is created by the frontend. See
@ -621,7 +625,7 @@ class VarScope : public Scope {
friend class GCMarker;
friend class BindingIter;
friend class Scope;
friend class ScopeCreationData;
friend class frontend::ScopeCreationData;
public:
// Data is public because it is created by the
@ -796,7 +800,7 @@ class EvalScope : public Scope {
friend class Scope;
friend class BindingIter;
friend class GCMarker;
friend class ScopeCreationData;
friend class frontend::ScopeCreationData;
public:
// Data is public because it is created by the frontend. See
@ -883,7 +887,7 @@ class ModuleScope : public Scope {
friend class BindingIter;
friend class Scope;
friend class AbstractScope;
friend class ScopeCreationData;
friend class frontend::ScopeCreationData;
static const ScopeKind classScopeKind_ = ScopeKind::Module;
public: