LibGC: Rename MarkedVector => RootVector

Let's try to make it a bit more clear that this is a Vector of GC roots.
This commit is contained in:
Andreas Kling 2024-12-26 14:32:52 +01:00 committed by Andreas Kling
commit 3bfb0534be
Notes: github-actions[bot] 2024-12-26 18:11:36 +00:00
117 changed files with 281 additions and 281 deletions

View file

@ -93,7 +93,7 @@ enum class GetOwnPropertyKeysType {
};
// 20.1.2.11.1 GetOwnPropertyKeys ( O, type ), https://tc39.es/ecma262/#sec-getownpropertykeys
static ThrowCompletionOr<GC::MarkedVector<Value>> get_own_property_keys(VM& vm, Value value, GetOwnPropertyKeysType type)
static ThrowCompletionOr<GC::RootVector<Value>> get_own_property_keys(VM& vm, Value value, GetOwnPropertyKeysType type)
{
// 1. Let obj be ? ToObject(O).
auto object = TRY(value.to_object(vm));
@ -102,7 +102,7 @@ static ThrowCompletionOr<GC::MarkedVector<Value>> get_own_property_keys(VM& vm,
auto keys = TRY(object->internal_own_property_keys());
// 3. Let nameList be a new empty List.
auto name_list = GC::MarkedVector<Value> { vm.heap() };
auto name_list = GC::RootVector<Value> { vm.heap() };
// 4. For each element nextKey of keys, do
for (auto& next_key : keys) {
@ -382,7 +382,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::group_by)
auto callback_function = vm.argument(1);
// 1. Let groups be ? GroupBy(items, callbackfn, property).
auto groups = TRY((JS::group_by<OrderedHashMap<PropertyKey, GC::MarkedVector<Value>>, PropertyKey>(vm, items, callback_function)));
auto groups = TRY((JS::group_by<OrderedHashMap<PropertyKey, GC::RootVector<Value>>, PropertyKey>(vm, items, callback_function)));
// 2. Let obj be OrdinaryObjectCreate(null).
auto object = Object::create(realm, nullptr);