Closed Bug 766004 Opened 12 years ago Closed 12 years ago

Remove LookupCompileTimeConstant()

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla16

People

(Reporter: n.nethercote, Assigned: n.nethercote)

References

Details

(Whiteboard: [js:t])

Attachments

(1 file)

Attached patch patch (deleted) — Splinter Review
LookupCompileTimeConstant() is a problem for lazy bytecode. It potentially traverses along bce->parent from the innermost BytecodeEmitter all the way to the top of the BytecodeEmitter chain. But if we're lazily compiling an inner function we won't have the parent BytecodeEmitter around any more. It's there just to optimize the handling of |const| variables in switches, e.g.: const x = "foo" switch (y) { case x: ... ... } It's an old optimization, pre-dating the CVS-to-Mercurial transition in 2007. And I don't think |const| is used that much on the web, is it? bhackett said "it's antique code and if there is any need for what it's doing we can do a more effective job using TI info during mjit compilation".
Attachment #634266 - Flags: review?(bhackett1024)
I also found, in the case of huge generated JS files, that it takes like 10% of total frontend time.
Attachment #634266 - Flags: review?(bhackett1024) → review+
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: