Closed
Bug 766004
Opened 12 years ago
Closed 12 years ago
Remove LookupCompileTimeConstant()
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla16
People
(Reporter: n.nethercote, Assigned: n.nethercote)
References
Details
(Whiteboard: [js:t])
Attachments
(1 file)
(deleted),
patch
|
bhackett1024
:
review+
|
Details | Diff | 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)
Comment 1•12 years ago
|
||
I also found, in the case of huge generated JS files, that it takes like 10% of total frontend time.
Updated•12 years ago
|
Attachment #634266 -
Flags: review?(bhackett1024) → review+
Assignee | ||
Comment 2•12 years ago
|
||
Comment 3•12 years ago
|
||
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.
Description
•