mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:48:11 +00:00
LibJS/Bytecode: Actually get value from super base for computed property
This commit is contained in:
parent
1116ba191a
commit
357174d8fd
2 changed files with 8 additions and 2 deletions
|
@ -1311,7 +1311,10 @@ static Bytecode::CodeGenerationErrorOr<void> get_base_and_value_from_member_expr
|
|||
if (computed_property_value_register.has_value()) {
|
||||
// 5. Let propertyKey be ? ToPropertyKey(propertyNameValue).
|
||||
// FIXME: This does ToPropertyKey out of order, which is observable by Symbol.toPrimitive!
|
||||
generator.emit<Bytecode::Op::GetByValue>(*computed_property_value_register);
|
||||
auto super_base_register = generator.allocate_register();
|
||||
generator.emit<Bytecode::Op::Store>(super_base_register);
|
||||
generator.emit<Bytecode::Op::Load>(*computed_property_value_register);
|
||||
generator.emit<Bytecode::Op::GetByValue>(super_base_register);
|
||||
} else {
|
||||
// 3. Let propertyKey be StringValue of IdentifierName.
|
||||
auto identifier_table_ref = generator.intern_identifier(verify_cast<Identifier>(member_expression.property()).string());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue