Skip to content

Commit

Permalink
Bug 1742628 - Part 3: Move AtomVector and FunctionBoxVector. r=tcampbell
Browse files Browse the repository at this point in the history
And remove some outdated comments referring to the previous trace list
managed by the parser.

Depends on D131922

Differential Revision: https://phabricator.services.mozilla.com/D131923
  • Loading branch information
anba committed Nov 24, 2021
1 parent 86e8ea0 commit 4757746
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
11 changes: 0 additions & 11 deletions js/src/frontend/NameAnalysisTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@

#include <stdint.h> // uint8_t, uint16_t, uint32_t

#include "frontend/ParserAtom.h" // TrivialTaggedParserAtomIndex
#include "js/AllocPolicy.h" // SystemAllocPolicy
#include "js/Vector.h" // Vector
#include "vm/BindingKind.h" // BindingKind, BindingLocation
#include "vm/BytecodeFormatFlags.h" // JOF_ENVCOORD
#include "vm/BytecodeUtil.h" // ENVCOORD_HOPS_BITS, ENVCOORD_SLOT_BITS, GET_ENVCOORD_HOPS, GET_ENVCOORD_SLOT, ENVCOORD_HOPS_LEN, JOF_OPTYPE, JSOp, LOCALNO_LIMIT
Expand Down Expand Up @@ -387,14 +384,6 @@ class NameLocation {
}
};

// These types are declared here for BaseScript::CreateLazy.
using AtomVector = Vector<TrivialTaggedParserAtomIndex, 24, SystemAllocPolicy>;

class FunctionBox;
// FunctionBoxes stored in this type are required to be rooted
// by the parser
using FunctionBoxVector = Vector<FunctionBox*, 24, SystemAllocPolicy>;

} // namespace frontend
} // namespace js

Expand Down
4 changes: 4 additions & 0 deletions js/src/frontend/NameCollections.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,10 @@ class VectorPool : public CollectionPool<RepresentativeVector,
}
};

using AtomVector = Vector<TrivialTaggedParserAtomIndex, 24, SystemAllocPolicy>;

using FunctionBoxVector = Vector<FunctionBox*, 24, SystemAllocPolicy>;

class NameCollectionPool {
InlineTablePool<AtomIndexMap> mapPool_;
VectorPool<AtomVector> atomVectorPool_;
Expand Down

0 comments on commit 4757746

Please sign in to comment.