Closed Bug 941760 Opened 12 years ago Closed 3 years ago

Handle conditional initialization in definite properties analysis

Categories

(Core :: JavaScript Engine: JIT, defect, P3)

x86
macOS
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: bhackett1024, Unassigned)

References

(Blocks 2 open bugs)

Details

(Keywords: perf)

When analyzing new properties in functions like the following: function Foo(x) { if (x) this.f = 0; else this.f = 1; } new Foo(...); The resulting type won't have any definite properties since Foo's new property isn't added in code that is definitely executed. |f| will, however, definitely be added taking both branches of the |if| into account. It would be nice to handle this case; it both seems realistic to encounter and happens in the octane richards benchmark. Tweaking that benchmark so that the property becomes definite increases our score by 1000 points (23k -> 24k) so this seems like an easy win.
Blocks: sm-js-perf
Priority: -- → P3
Keywords: perf

Definite properties analysis has been removed.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.