Files
ladybird/Tests/LibJS/Bytecode/input/super-computed-string-to-id.js
Andreas Kling fa72fd9f95 LibJS: Optimize constant string computed properties to MemberId
When a computed member expression uses a constant string (e.g.
super["minutes"] or obj["key"]), optimize it to use the MemberId or
SuperMemberId reference form instead of the value-based form, matching
the C++ pipeline optimization.
2026-03-04 12:17:59 +01:00

8 lines
105 B
JavaScript

class C extends Object {
constructor() {
super();
super["foo"] = 1;
}
}
new C();