Closed
Bug 610022
Opened 15 years ago
Closed 15 years ago
WeakRefList should have a method to prune collected items
Categories
(Tamarin Graveyard :: Virtual Machine, enhancement)
Tamarin Graveyard
Virtual Machine
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: stejohns, Assigned: stejohns)
Details
Attachments
(1 file, 2 obsolete files)
|
4.61 KB,
patch
|
lhansen
:
review+
|
Details | Diff | Splinter Review |
There are lots of ad-hoc bits of code in Flash/AIR that prunes "dead" entries from lists of WeakRefs; we should add such a method to WeakRefList directly.
| Assignee | ||
Comment 1•15 years ago
|
||
Assignee: nobody → stejohns
Attachment #488572 -
Flags: review?(wsharp)
| Assignee | ||
Comment 2•15 years ago
|
||
Once again, in slightly more efficient form
Attachment #488572 -
Attachment is obsolete: true
Attachment #488586 -
Flags: review?(wsharp)
Attachment #488572 -
Flags: review?(wsharp)
Updated•15 years ago
|
Attachment #488586 -
Flags: review?(wsharp) → review+
| Assignee | ||
Comment 3•15 years ago
|
||
TR 5521:bd91f230f82e
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 4•15 years ago
|
||
Bah, existing code is clearly bogus; reopening (and will submit with a testcase this time, bad programmer, no cookie)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Comment 5•15 years ago
|
||
Working patch, with selftest this time
Attachment #488586 -
Attachment is obsolete: true
Attachment #489307 -
Flags: review?(lhansen)
Attachment #489307 -
Flags: feedback?(stan)
Comment 6•15 years ago
|
||
(In reply to comment #0)
> There are lots of ad-hoc bits of code in Flash/AIR that prunes "dead" entries
> from lists of WeakRefs; we should add such a method to WeakRefList directly.
Agree, this is a nice addition.
Comment 7•15 years ago
|
||
Comment on attachment 489307 [details] [diff] [review]
Patch v3
I think "(T)NULL" would be better than "(T)0".
If it were me I would not perform the ::store() unless kept < i, as that reduces write barrier traffic and generally makes it less expensive to call removeNullItems on lists that rarely see elements drop out. Depends on how you expect it to be used, I guess, and how expensive you expect a barrier to be.
Attachment #489307 -
Flags: review?(lhansen) → review+
| Assignee | ||
Comment 8•15 years ago
|
||
(In reply to comment #7)
> I think "(T)NULL" would be better than "(T)0".
Yeah, but newer gcc versions tend to be warning-prone about mismatching 0 and NULL; I thought 0 slightly less likely to generate warnings.
> If it were me I would not perform the ::store() unless kept < i,
Ah -- good catch. I'll test with that in mind and push that way if everything passes.
| Assignee | ||
Comment 9•15 years ago
|
||
FWIW, using (T)NULL causes Xcode to generate this helpful warning:
warning: NULL used in arithmetic
sigh...
| Assignee | ||
Comment 10•15 years ago
|
||
pushed with kept<i, TR 5557:1497bb59b69d
Status: REOPENED → RESOLVED
Closed: 15 years ago → 15 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•15 years ago
|
Attachment #489307 -
Flags: feedback?(stan)
Comment 11•15 years ago
|
||
changeset: 5558:4f999233eeac
user: Steven Johnson <stejohns@adobe.com>
date: Wed Nov 17 13:52:02 2010 -0800
summary: Bug 610022 (followup): I applied Lars optimization incorrectly (r=stejohns)
http://hg.mozilla.org/tamarin-redux/rev/4f999233eeac
Comment 12•15 years ago
|
||
changeset: 5564:8abb0f8342eb
user: Steven Johnson <stejohns@adobe.com>
summary: Bug 610022 (followup 2): I *still* applied Lars optimization incorrectly (r=stejohns)
http://hg.mozilla.org/tamarin-redux/rev/8abb0f8342eb
You need to log in
before you can comment on or make changes to this bug.
Description
•