Closed Bug 1070676 Opened 10 years ago Closed 9 years ago

Figure out execution order of AVM2 static initializers.

Categories

(Firefox Graveyard :: Shumway, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: mbx, Assigned: mbx)

References

Details

The AS3 compiler in Flash Builder appears to generate an ABC file for each class in the application (could be for debug builds only). All of the generated DoABC tags evaluate ABCs eagerly (which usually means running the static constructor), so if a class in ABC n makes a reference to a class in ABC n + k, then you end up in a runtime error. Flash builder tries to reorder DoABC tags so that all references are to classes that come before, but this doesn't always work out. I experimented a bit, and it looks like if k is small enough (1 for instance) then the Flash player works anyway which seems to suggest that it probably loads (without executing) a few DoABC tags ahead of the one that it is currently being executed.
Till, do you have any idea how any of this is supposed to work?
Flags: needinfo?(till)
Blocks: shumway-m3
Priority: -- → P1
Michael says this is an issue for Flash games.
Blocks: shumway-m4
No longer blocks: shumway-m3
Flags: needinfo?(till)
Priority: P1 → --
I'm not aware of any issues we have with this right now. Eventually it'd be nice to verify it, but for now, we don't need to.
Blocks: shumway-later
No longer blocks: shumway-m4
Product: Firefox → Firefox Graveyard
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.