Open
Bug 1339814
Opened 8 years ago
Updated 2 years ago
Add central template for weak map marking
Categories
(Core :: JavaScript: GC, defect, P3)
Core
JavaScript: GC
Tracking
()
NEW
People
(Reporter: mccr8, Unassigned)
References
Details
(Keywords: triage-deferred)
We have at least three copies of the logic for weak map marking (GC, plus two for the CC). It isn't that complex, but it is a little fiddly, so it would be nice if we had some way to let them all use the same core logic, via some template.
Comment 1•8 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #0)
This is a great idea. I'm not sure exactly what form you had in mind though... like some kind of truth table? It might be difficult to make the implementation use this (the GC weak map marking code is a little convoluted) but the fixup code and any checks certainly could.
Blocks: 1317672
Reporter | ||
Comment 2•8 years ago
|
||
I'm not familiar with how the GC marking code works. Maybe this isn't practical.
Comment 3•8 years ago
|
||
I would guess that it's practical and a good idea for everything *but* the GC marking code. There's a major difference between the GC marking case and all others: the GC marking case doesn't know yet what maps are alive. All other cases do (well, they know a conservative estimate of what's alive, anyway).
When doing GC marking, you can't just say eg "mark the value if both the map and the key are marked", because either you're doing this when marking the map (and the key may not have been marked *yet*), or when marking the key (and either the map may not have been marked yet, or you're doing the first fast marking phase which does not check whether some random object is a key).
Updated•7 years ago
|
Keywords: triage-deferred
Priority: -- → P3
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•