mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibJS/Bytecode: Infer name of anonymous exported classes when possible
5 new passes on test262. :^)
This commit is contained in:
parent
b0ae1e80fb
commit
cea2071349
Notes:
sideshowbarker
2024-07-17 01:55:29 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/cea2071349 Pull-request: https://github.com/SerenityOS/serenity/pull/19748
1 changed files with 1 additions and 1 deletions
|
@ -2899,7 +2899,7 @@ Bytecode::CodeGenerationErrorOr<void> ExportStatement::generate_bytecode(Bytecod
|
|||
}
|
||||
|
||||
if (is<ClassExpression>(*m_statement)) {
|
||||
TRY(m_statement->generate_bytecode(generator));
|
||||
TRY(generator.emit_named_evaluation_if_anonymous_function(static_cast<ClassExpression const&>(*m_statement), generator.intern_identifier("default"sv)));
|
||||
|
||||
if (!static_cast<ClassExpression const&>(*m_statement).has_name())
|
||||
generator.emit<Bytecode::Op::SetVariable>(generator.intern_identifier(ExportStatement::local_name_for_default), Bytecode::Op::SetVariable::InitializationMode::Initialize);
|
||||
|
|
Loading…
Reference in a new issue