1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:07:44 +00:00

LibJS: Remove a bunch of gratuitous JS namespace qualifiers

This commit is contained in:
Linus Groh 2022-04-03 15:19:33 +01:00
parent f2c02077ba
commit 5b48912d35
17 changed files with 66 additions and 65 deletions

View file

@ -580,13 +580,13 @@ ThrowCompletionOr<Value> perform_eval(Value x, GlobalObject& caller_realm, Calle
Optional<Value> eval_result;
if (auto* bytecode_interpreter = Bytecode::Interpreter::current()) {
auto executable_result = JS::Bytecode::Generator::generate(program);
auto executable_result = Bytecode::Generator::generate(program);
if (executable_result.is_error())
return vm.throw_completion<InternalError>(bytecode_interpreter->global_object(), ErrorType::NotImplemented, executable_result.error().to_string());
auto executable = executable_result.release_value();
executable->name = "eval"sv;
if (JS::Bytecode::g_dump_bytecode)
if (Bytecode::g_dump_bytecode)
executable->dump();
eval_result = TRY(bytecode_interpreter->run(*executable));
// Turn potentially empty JS::Value from the bytecode interpreter into an empty Optional
@ -1009,7 +1009,7 @@ Object* create_mapped_arguments_object(GlobalObject& global_object, FunctionObje
// 3. Perform map.[[DefineOwnProperty]](! ToString(𝔽(index)), PropertyDescriptor { [[Set]]: p, [[Get]]: g, [[Enumerable]]: false, [[Configurable]]: true }).
object->parameter_map().define_native_accessor(
PropertyKey { index },
[&environment, name](VM&, GlobalObject& global_object_getter) -> JS::ThrowCompletionOr<Value> {
[&environment, name](VM&, GlobalObject& global_object_getter) -> ThrowCompletionOr<Value> {
return MUST(environment.get_binding_value(global_object_getter, name, false));
},
[&environment, name](VM& vm, GlobalObject& global_object_setter) {