Closed Bug 493754 Opened 15 years ago Closed 13 years ago

Missed opportunity for flat closure, within funarg

Categories

(Core :: JavaScript Engine, defect)

Other Branch
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: jorendorff, Assigned: brendan)

References

Details

function a(z) function b() function c() z; Here b is a flat closure but c is not. And a is heavyweight, because c uses JSOP_NAME "z".
Depends on: 493260
Jason reverse-engineered why I did what I did: the "middle escapee" function means the lowest (in upvar sense, the function using the upvar) function's closure is formed when the escapee has been called -- where the display is no use for finding the upvar values to copy. This bug is worth pondering though. Maybe there's a cheap-ish way. Will Clinger's 2bit Scheme compiler does lambda-lifting: everything lifts to top level and gains arguments, but you need to solve dataflow equations. In hacking upvar2, I was looking for a fast dynamic analysis that avoided this and optimized most of the sweet-spot cases. Still need to measure how sweet it is. /be
Blocks: 532696
No more flat closures, funargs.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.