LibGC: Delete operators ! and bool from GC::Ref

The GC::Ref smart pointer is always non-null, so there's no need for it
to be convertible to bool.

This exposed a small number of unnecessary null checks which we remove.
This commit is contained in:
Andreas Kling 2025-10-28 18:48:41 +01:00 committed by Andreas Kling
parent e4e18ca84b
commit 3fb678b376
Notes: github-actions[bot] 2025-10-29 20:22:34 +00:00
3 changed files with 3 additions and 2 deletions

View file

@ -1344,7 +1344,6 @@ static Value instantiate_ordinary_function_expression(Interpreter& interpreter,
auto environment = GC::Ref { *interpreter.running_execution_context().lexical_environment };
if (has_own_name) {
VERIFY(environment);
environment = new_declarative_environment(*environment);
MUST(environment->create_immutable_binding(interpreter.vm(), own_name, false));
}