1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:48:10 +00:00

LibJS: Replace uses of MarkedValueList with MarkedVector<Value>

This is effectively a drop-in replacement.
This commit is contained in:
Linus Groh 2022-02-09 10:06:40 +00:00
parent 1d32ac7b8b
commit bc183dbbcb
61 changed files with 143 additions and 142 deletions

View file

@ -384,7 +384,7 @@ ThrowCompletionOr<bool> Object::test_integrity_level(IntegrityLevel level) const
}
// 7.3.24 EnumerableOwnPropertyNames ( O, kind ), https://tc39.es/ecma262/#sec-enumerableownpropertynames
ThrowCompletionOr<MarkedValueList> Object::enumerable_own_property_names(PropertyKind kind) const
ThrowCompletionOr<MarkedVector<Value>> Object::enumerable_own_property_names(PropertyKind kind) const
{
// NOTE: This has been flattened for readability, so some `else` branches in the
// spec text have been replaced with `continue`s in the loop below.
@ -397,7 +397,7 @@ ThrowCompletionOr<MarkedValueList> Object::enumerable_own_property_names(Propert
auto own_keys = TRY(internal_own_property_keys());
// 3. Let properties be a new empty List.
auto properties = MarkedValueList { heap() };
auto properties = MarkedVector<Value> { heap() };
// 4. For each element key of ownKeys, do
for (auto& key : own_keys) {
@ -894,12 +894,12 @@ ThrowCompletionOr<bool> Object::internal_delete(PropertyKey const& property_key)
}
// 10.1.11 [[OwnPropertyKeys]] ( ), https://tc39.es/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots-ownpropertykeys
ThrowCompletionOr<MarkedValueList> Object::internal_own_property_keys() const
ThrowCompletionOr<MarkedVector<Value>> Object::internal_own_property_keys() const
{
auto& vm = this->vm();
// 1. Let keys be a new empty List.
MarkedValueList keys { heap() };
MarkedVector<Value> keys { heap() };
// 2. For each own property key P of O such that P is an array index, in ascending numeric index order, do
for (auto& entry : m_indexed_properties) {