Closed Bug 1237445 Opened 7 years ago Closed 7 years ago

Migrate more hashtable users to GC-aware versions, including those needing rekeying


(Core :: JavaScript: GC, defect)

Not set



Tracking Status
firefox46 --- fixed
firefox47 --- fixed


(Reporter: sfink, Assigned: sfink)




(3 files, 1 obsolete file)

Bug 1225298 went into the previous release cycle, so opening a new bug for the remaining landings.
I still don't have everything working, but one big chunk is the things that required rekeying. This patch makes a GCRekeyableHashMap for those so I can land them in advance of any future rekeying removal.
Attachment #8704847 - Flags: review?(terrence)
Comment on attachment 8704847 [details] [diff] [review]
Implement GCRekeyableHashMap

Review of attachment 8704847 [details] [diff] [review]:

Attachment #8704847 - Flags: review?(terrence) → review+
Note to anyone suspicious: the patches landing here are attached and marked r+ in bug 1225298.

Next time I'm going to use a constellation of separate bugs.
This is the bug I wanted to use.

This is now a very minimal refactoring change to make it look more like GCHashSet without actually using GCHashSet (which I hope wouldn't compile at this point, since no zero-arg needsSweep is defined for RegExpShared so set_->sweep() can't be defined.)

Totally optional at this point. Pretty much irrelevant, since it'll be scrapped either way if we make RegExpShared into a gc thing.
Attachment #8709606 - Flags: review?(terrence)
Comment on attachment 8709606 [details] [diff] [review]
Use GCHashSet for RegExpShared sweeping

Review of attachment 8709606 [details] [diff] [review]:

I like it.

::: js/src/vm/RegExpObject.cpp
@@ +828,5 @@
>              e.removeFront();
>          }
>      }
>      if (matchResultTemplateObject_ &&

Just noticed that !set_.initialized() implies !matchResultTemplateObject_. Is it worth asserting this relation.
Attachment #8709606 - Flags: review?(terrence) → review+
Resolution: FIXED → ---
Attached patch Rekey ArrayObjectTable (obsolete) — Splinter Review
As mentioned on IRC, this table still needs rekeying.
Attachment #8710012 - Flags: review?(terrence)
Comment on attachment 8710012 [details] [diff] [review]
Rekey ArrayObjectTable

Gah. Wrong patch from wrong terminal.
Attachment #8710012 - Attachment is obsolete: true
Attachment #8710012 - Flags: review?(terrence)
Ok, let's try this again.
Attachment #8710016 - Flags: review?(terrence)
Comment on attachment 8710016 [details] [diff] [review]
Rekey ArrayObjectTable

Review of attachment 8710016 [details] [diff] [review]:

Attachment #8710016 - Flags: review?(terrence) → review+
You need to log in before you can comment on or make changes to this bug.