mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-15 20:49:41 +00:00
LibJS: Port the Identifier AST (and related) nodes to UTF-16
This eliminates quite a lot of UTF-8 / UTF-16 churn.
This commit is contained in:
parent
00182a2405
commit
b955c9b2a9
Notes:
github-actions[bot]
2025-08-13 13:57:20 +00:00
Author: https://github.com/trflynn89
Commit: b955c9b2a9
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5762
20 changed files with 206 additions and 238 deletions
|
@ -1361,7 +1361,7 @@ inline Value new_function(VM& vm, FunctionNode const& function_node, Optional<Id
|
|||
} else {
|
||||
value = ECMAScriptFunctionObject::create_from_function_node(
|
||||
function_node,
|
||||
Utf16FlyString::from_utf8(function_node.name()),
|
||||
function_node.name(),
|
||||
*vm.current_realm(),
|
||||
vm.lexical_environment(),
|
||||
vm.running_execution_context().private_environment);
|
||||
|
@ -1622,9 +1622,8 @@ inline ThrowCompletionOr<ECMAScriptFunctionObject*> new_class(VM& vm, Value supe
|
|||
if (!class_expression.has_name() && lhs_name.has_value()) {
|
||||
class_name = interpreter.current_executable().get_identifier(lhs_name.value());
|
||||
} else {
|
||||
auto name = Utf16FlyString::from_utf8(class_expression.name());
|
||||
binding_name = name;
|
||||
class_name = name;
|
||||
class_name = class_expression.name();
|
||||
binding_name = class_name;
|
||||
}
|
||||
|
||||
return TRY(class_expression.create_class_constructor(vm, class_environment, vm.lexical_environment(), super_class, element_keys, binding_name, class_name));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue