Closed Bug 571468 Opened 14 years ago Closed 6 years ago

Rest arguments optimization could be made less brittle

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)

In bug #569321 we introduced an optimization that avoids allocating the rest array if it does not escape, by means of a conservative escape analysis that is run on the ABC code.  That escape analysis makes an assumption about the ABC code, namely that the rest array stays allocated to the local in which it is placed by the ABI.

Changes in code generation strategies in ASC, or the use of other compilers to target Tamarin, or the use of post-processors, or naive changes in source code (such as copying the value from the initial local to another local), may therefore make the analysis fail.  Also, complicated index expressions such as rest[a?b:c] will make the analysis fail.

The analysis can almost certainly be generalized at low cost, to deal with the rest array value being copied from one local to another, thus removing a lot of brittleness.  This is of primary importance.

The analysis can probably be generalized, also at low cost, to deal with control flow (effectively a lazily created rest array exists on the evaluation stack across a control flow join and the join must ensure that if one path into it has a rest array in a particular slot then all paths do).  This is of secondary importance.
Assignee: nobody → lhansen
Flags: flashplayer-qrb+
Not working on this until 2011 at the earliest.
Assignee: lhansen → nobody
Tamarin isn't maintained anymore. WONTFIX remaining bugs.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.