mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 10:07:40 +00:00
LibJS/Bytecode: Support private identifiers in optional chaining
Fixes 4 test262 tests :^)
This commit is contained in:
parent
fc45831fb3
commit
95d619943e
1 changed files with 5 additions and 5 deletions
|
@ -2698,11 +2698,11 @@ static Bytecode::CodeGenerationErrorOr<void> generate_optional_chain(Bytecode::G
|
||||||
generator.emit<Bytecode::Op::Store>(current_value_register);
|
generator.emit<Bytecode::Op::Store>(current_value_register);
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
[&](OptionalChain::PrivateMemberReference const&) -> Bytecode::CodeGenerationErrorOr<void> {
|
[&](OptionalChain::PrivateMemberReference const& ref) -> Bytecode::CodeGenerationErrorOr<void> {
|
||||||
return Bytecode::CodeGenerationError {
|
generator.emit<Bytecode::Op::Store>(current_base_register);
|
||||||
&optional_chain,
|
generator.emit<Bytecode::Op::GetPrivateById>(generator.intern_identifier(ref.private_identifier->string()));
|
||||||
"Unimplemented reference: PrivateMemberReference"sv,
|
generator.emit<Bytecode::Op::Store>(current_value_register);
|
||||||
};
|
return {};
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue