mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00
LibJS: Add and fix some spec comments in AbstractOperations
This commit is contained in:
parent
d72022ba04
commit
9d3623f0e8
1 changed files with 4 additions and 1 deletions
|
@ -199,7 +199,7 @@ ThrowCompletionOr<Realm*> get_function_realm(GlobalObject& global_object, Functi
|
||||||
return vm.current_realm();
|
return vm.current_realm();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 8.5.2.1 InitializeBoundName ( name, value, environment ), 8.5.2.1 InitializeBoundName ( name, value, environment )
|
// 8.5.2.1 InitializeBoundName ( name, value, environment ), https://tc39.es/ecma262/#sec-initializeboundname
|
||||||
ThrowCompletionOr<void> initialize_bound_name(GlobalObject& global_object, FlyString const& name, Value value, Environment* environment)
|
ThrowCompletionOr<void> initialize_bound_name(GlobalObject& global_object, FlyString const& name, Value value, Environment* environment)
|
||||||
{
|
{
|
||||||
auto& vm = global_object.vm();
|
auto& vm = global_object.vm();
|
||||||
|
@ -445,8 +445,11 @@ FunctionEnvironment* new_function_environment(ECMAScriptFunctionObject& function
|
||||||
return env;
|
return env;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 9.2.1.1 NewPrivateEnvironment ( outerPrivEnv ), https://tc39.es/ecma262/#sec-newprivateenvironment
|
||||||
PrivateEnvironment* new_private_environment(VM& vm, PrivateEnvironment* outer)
|
PrivateEnvironment* new_private_environment(VM& vm, PrivateEnvironment* outer)
|
||||||
{
|
{
|
||||||
|
// 1. Let names be a new empty List.
|
||||||
|
// 2. Return the PrivateEnvironment Record { [[OuterPrivateEnvironment]]: outerPrivEnv, [[Names]]: names }.
|
||||||
return vm.heap().allocate<PrivateEnvironment>(vm.current_realm()->global_object(), outer);
|
return vm.heap().allocate<PrivateEnvironment>(vm.current_realm()->global_object(), outer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue