[jsdbg2] DebuggerWeakMap instances cost more in code size than they should.
Categories
(Core :: JavaScript: Debugger API, defect, P2)
Tracking
()
People
(Reporter: jimb, Unassigned)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
In Bug 1567245 patch D38539, I added a type parameter to DebuggerWeakMap for the value type. Unfortunately, this resulted in a ~60kiB increase in code size.
I think we could recover much of this by allowing the underlying WeakMap to always use JSObject* as its value type, as it did before the patch, and then having DebuggerWeakMap methods downcast as necessary.
Unfortunately, the patch won't be small in terms of lines changed: WeakMap uses a lot of member types in its API (Ptr, AddPtr, Enum) that will now need custom counterparts in DebuggerWeakMap. But I expect all these methods could be simple inline wrappers for calls to the more weakly typed methods on the WeakMap's types.
Updated•6 years ago
|
| Reporter | ||
Comment 1•6 years ago
|
||
Bug 1567245 patch D38543 also needs to be evaluated in this light.
Updated•6 years ago
|
Updated•5 years ago
|
Updated•4 years ago
|
Updated•3 years ago
|
Comment 2•1 month ago
|
||
Moving bugs to Debugger API component. Use castle-terms-potato to filter out.
Description
•