Closed Bug 592961 Opened 15 years ago Closed 7 years ago

Add support for inlining top-level constant values

Categories

(Tamarin Graveyard :: Baseline JIT (CodegenLIR), defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX
Future

People

(Reporter: lhansen, Unassigned)

References

Details

(Whiteboard: PACMAN)

(This may be tied in with our general handling of 'const', but it may also be a simpler case of that.) The JIT should replace references to at least built-in constant value bindings with the values themselves - top-level 'undefined', 'Infinity', 'NaN' - Math.PI, ... - Number.MIN_VALUE, ... These values may be warm - most people won't know to write "void(0)" to get an undefined value at a lower price, and why would they - and inlining them will benefit everyone. The reason we're not handling 'const' well is because it is technically possible for a constructor function to change the value of a previously written const binding on an instance, and it requires analysis of the constructor function to do better. However, most values we care about are static and most static initializers, certainly in built-in code, are pretty straightforward. (Plus, they can be blessed and we could use that fact if we had to.) Thus handling built-ins may be low-hanging fruit and may be a good initial item on the road to handling const properly.
See Also: → 588922
Assignee: nobody → wmaddox
Flags: flashplayer-qrb+
Assignee: wmaddox → nobody
Target Milestone: --- → Future
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.