mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-15 20:49:41 +00:00
LibJS: Port remaining bytecode identifiers to UTF-16
This commit is contained in:
parent
829fd25264
commit
cf61171864
Notes:
github-actions[bot]
2025-08-14 08:28:21 +00:00
Author: https://github.com/trflynn89
Commit: cf61171864
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5845
Reviewed-by: https://github.com/gmta ✅
5 changed files with 16 additions and 21 deletions
|
@ -2093,7 +2093,7 @@ Bytecode::CodeGenerationErrorOr<Optional<ScopedOperand>> YieldExpression::genera
|
|||
|
||||
// i. Let throw be ? GetMethod(iterator, "throw").
|
||||
auto throw_method = generator.allocate_register();
|
||||
generator.emit<Bytecode::Op::GetMethod>(throw_method, iterator, generator.intern_identifier("throw"_fly_string));
|
||||
generator.emit<Bytecode::Op::GetMethod>(throw_method, iterator, generator.intern_identifier("throw"_utf16_fly_string));
|
||||
|
||||
// ii. If throw is not undefined, then
|
||||
auto& throw_method_is_defined_block = generator.make_block();
|
||||
|
@ -2178,7 +2178,7 @@ Bytecode::CodeGenerationErrorOr<Optional<ScopedOperand>> YieldExpression::genera
|
|||
|
||||
// ii. Let return be ? GetMethod(iterator, "return").
|
||||
auto return_method = generator.allocate_register();
|
||||
generator.emit<Bytecode::Op::GetMethod>(return_method, iterator, generator.intern_identifier("return"_fly_string));
|
||||
generator.emit<Bytecode::Op::GetMethod>(return_method, iterator, generator.intern_identifier("return"_utf16_fly_string));
|
||||
|
||||
// iii. If return is undefined, then
|
||||
auto& return_is_undefined_block = generator.make_block();
|
||||
|
@ -2533,7 +2533,7 @@ Bytecode::CodeGenerationErrorOr<Optional<ScopedOperand>> TaggedTemplateLiteral::
|
|||
generator.emit_with_extra_operand_slots<Bytecode::Op::NewArray>(raw_string_regs.size(), raw_strings_array, raw_string_regs);
|
||||
}
|
||||
|
||||
generator.emit<Bytecode::Op::PutById>(strings_array, generator.intern_identifier("raw"_fly_string), raw_strings_array, Bytecode::Op::PropertyKind::KeyValue, generator.next_property_lookup_cache());
|
||||
generator.emit<Bytecode::Op::PutById>(strings_array, generator.intern_identifier("raw"_utf16_fly_string), raw_strings_array, Bytecode::Op::PropertyKind::KeyValue, generator.next_property_lookup_cache());
|
||||
|
||||
auto arguments = generator.allocate_register();
|
||||
if (!argument_regs.is_empty())
|
||||
|
@ -3578,7 +3578,7 @@ Bytecode::CodeGenerationErrorOr<Optional<ScopedOperand>> ExportStatement::genera
|
|||
}
|
||||
|
||||
if (is<ClassExpression>(*m_statement)) {
|
||||
auto value = TRY(generator.emit_named_evaluation_if_anonymous_function(static_cast<ClassExpression const&>(*m_statement), generator.intern_identifier("default"_fly_string)));
|
||||
auto value = TRY(generator.emit_named_evaluation_if_anonymous_function(static_cast<ClassExpression const&>(*m_statement), generator.intern_identifier("default"_utf16_fly_string)));
|
||||
|
||||
if (!static_cast<ClassExpression const&>(*m_statement).has_name()) {
|
||||
generator.emit<Bytecode::Op::InitializeLexicalBinding>(
|
||||
|
@ -3591,7 +3591,7 @@ Bytecode::CodeGenerationErrorOr<Optional<ScopedOperand>> ExportStatement::genera
|
|||
|
||||
// ExportDeclaration : export default AssignmentExpression ;
|
||||
VERIFY(is<Expression>(*m_statement));
|
||||
auto value = TRY(generator.emit_named_evaluation_if_anonymous_function(static_cast<Expression const&>(*m_statement), generator.intern_identifier("default"_fly_string)));
|
||||
auto value = TRY(generator.emit_named_evaluation_if_anonymous_function(static_cast<Expression const&>(*m_statement), generator.intern_identifier("default"_utf16_fly_string)));
|
||||
generator.emit<Bytecode::Op::InitializeLexicalBinding>(
|
||||
generator.intern_identifier(ExportStatement::local_name_for_default),
|
||||
value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue