Closed Bug 1066799 Opened 10 years ago Closed 9 years ago

AVM2 duplicates scope lookups

Categories

(Firefox Graveyard :: Shumway, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: till, Unassigned)

References

Details

Attachments

(1 file)

Stumbled upon this while debugging some AVM1 event handling stuff. For the _addEventHandlerProxy function in [1], AVM2 generates the attached code. For the lines highlighted in [2], it generates four findScopeProperty calls for the same property. I understand that we might call a function closing over the same scope and potentially modifying the property, so it's not safe in the general case to hoist the lookup. Would it at least be possible to hoist it within sequences that don't contain function calls? [1]: https://github.com/mozilla/shumway/blob/a6cdada99687d7584e0a04ce82aaace789856091/src/avm1lib/AVM1Utils.as#L87 [2]: https://github.com/mozilla/shumway/blob/a6cdada99687d7584e0a04ce82aaace789856091/src/avm1lib/AVM1Utils.as#L105-L108
Flags: needinfo?(mbebenita)
Attached file AVM2-compiled code (deleted) —
And now actually with the compiled code. Dunno why that wasn't attached originally.
Low-priority optimization.
Blocks: shumway-1.0
Blocks: shumway-m5
No longer blocks: shumway-1.0
Product: Firefox → Firefox Graveyard
Flags: needinfo?(mbebenita)
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.

Attachment

General

Created:
Updated:
Size: