mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 11:20:03 +00:00
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:
committed by
Andreas Kling
parent
ada36e5c0a
commit
3bfb0534be
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user