mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 09:45:41 +00:00
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:
parent
7110e845e3
commit
6a91705585
@ -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>(); }
|
||||
|
||||
|
@ -184,8 +184,6 @@ class BigIntCreationData {
|
||||
|
||||
using BigIntIndex = TypedIndex<BigIntCreationData>;
|
||||
|
||||
} /* namespace frontend */
|
||||
|
||||
class ScopeCreationData {
|
||||
friend class AbstractScope;
|
||||
friend class GCMarker;
|
||||
@ -321,12 +319,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:
|
||||
|
Loading…
Reference in New Issue
Block a user