LibJS+LibWeb: Rename Heap::allocate_without_realm to Heap::allocate

Now that the heap has no knowledge about a JavaScript realm and is
purely for managing the memory of the heap, it does not make sense
to name this function to say that it is a non-realm variant.
This commit is contained in:
Shannon Booth 2024-11-14 06:13:46 +13:00 committed by Tim Flynn
commit 1e54003cb1
Notes: github-actions[bot] 2024-11-13 21:52:39 +00:00
115 changed files with 243 additions and 243 deletions

View file

@ -394,7 +394,7 @@ NonnullGCPtr<DeclarativeEnvironment> new_declarative_environment(Environment& en
// 1. Let env be a new Declarative Environment Record containing no bindings.
// 2. Set env.[[OuterEnv]] to E.
// 3. Return env.
return heap.allocate_without_realm<DeclarativeEnvironment>(&environment);
return heap.allocate<DeclarativeEnvironment>(&environment);
}
// 9.1.2.3 NewObjectEnvironment ( O, W, E ), https://tc39.es/ecma262/#sec-newobjectenvironment
@ -407,7 +407,7 @@ NonnullGCPtr<ObjectEnvironment> new_object_environment(Object& object, bool is_w
// 3. Set env.[[IsWithEnvironment]] to W.
// 4. Set env.[[OuterEnv]] to E.
// 5. Return env.
return heap.allocate_without_realm<ObjectEnvironment>(object, is_with_environment ? ObjectEnvironment::IsWithEnvironment::Yes : ObjectEnvironment::IsWithEnvironment::No, environment);
return heap.allocate<ObjectEnvironment>(object, is_with_environment ? ObjectEnvironment::IsWithEnvironment::Yes : ObjectEnvironment::IsWithEnvironment::No, environment);
}
// 9.1.2.4 NewFunctionEnvironment ( F, newTarget ), https://tc39.es/ecma262/#sec-newfunctionenvironment
@ -416,7 +416,7 @@ NonnullGCPtr<FunctionEnvironment> new_function_environment(ECMAScriptFunctionObj
auto& heap = function.heap();
// 1. Let env be a new function Environment Record containing no bindings.
auto env = heap.allocate_without_realm<FunctionEnvironment>(function.environment());
auto env = heap.allocate<FunctionEnvironment>(function.environment());
// 2. Set env.[[FunctionObject]] to F.
env->set_function_object(function);
@ -443,7 +443,7 @@ NonnullGCPtr<PrivateEnvironment> new_private_environment(VM& vm, PrivateEnvironm
{
// 1. Let names be a new empty List.
// 2. Return the PrivateEnvironment Record { [[OuterPrivateEnvironment]]: outerPrivEnv, [[Names]]: names }.
return vm.heap().allocate_without_realm<PrivateEnvironment>(outer);
return vm.heap().allocate<PrivateEnvironment>(outer);
}
// 9.4.3 GetThisEnvironment ( ), https://tc39.es/ecma262/#sec-getthisenvironment