Closed
Bug 722102
Opened 14 years ago
Closed 11 months ago
SpiderMonkey should provide debugging names for builtin class instances' reserved slots
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
INCOMPLETE
mozilla13
People
(Reporter: jimb, Assigned: jimb)
Details
Attachments
(1 file, 2 obsolete files)
It's nice when the GC can provide proper names for edges in the graph. However, at the moment, objects' reserved slots get named "**UNKNOWN SLOT 0**", which is less than helpful. Proper names also make things like findReferences more useful in tests, because the names can remain stable.
| Assignee | ||
Comment 1•14 years ago
|
||
I think this covers everything.
try: https://tbpl.mozilla.org/?tree=Try&rev=1845f0b22fbf
| Assignee | ||
Updated•14 years ago
|
OS: Linux → All
Hardware: x86_64 → All
Target Milestone: --- → mozilla13
Version: unspecified → Trunk
| Assignee | ||
Updated•14 years ago
|
Flags: in-testsuite+
| Assignee | ||
Comment 2•14 years ago
|
||
If this patch lands, I'll write the docs for it as well.
Status: ASSIGNED → NEW
OS: All → Linux
Hardware: All → x86_64
Target Milestone: mozilla13 → ---
| Assignee | ||
Updated•14 years ago
|
Status: NEW → ASSIGNED
OS: Linux → All
Hardware: x86_64 → All
Target Milestone: --- → mozilla13
| Assignee | ||
Comment 3•14 years ago
|
||
Fixed a test that wasn't checking that findReferences is available.
New try: https://tbpl.mozilla.org/?tree=Try&rev=a412183ca6ec
Attachment #594907 -
Attachment is obsolete: true
| Assignee | ||
Comment 4•14 years ago
|
||
Comment on attachment 595079 [details] [diff] [review]
In SpiderMonkey, provide debugging names for built-in classes' reserved slots.
Review of attachment 595079 [details] [diff] [review]:
-----------------------------------------------------------------
Try looks good.
Attachment #595079 -
Flags: review?(jwalden+bmo)
Comment 5•13 years ago
|
||
Comment on attachment 595079 [details] [diff] [review]
In SpiderMonkey, provide debugging names for built-in classes' reserved slots.
Review of attachment 595079 [details] [diff] [review]:
-----------------------------------------------------------------
The dynamicity of implementation here smells funny, given that reserved slots are a purely static function of object class. Can't this just be encoded in a static const array per class, indexed by slot number, bounds-checked by JSSLOT_FREE(clasp)? This would require a little trickiness if this is supposed to be part of the public API, but not much at all. Could you try something along those lines, please?
Attachment #595079 -
Flags: review?(jwalden+bmo)
Comment 6•10 years ago
|
||
This is possibly interesting for magic DOM since it uses a lot of reserved slots.
A static const array per class is enough for many but not all cases. It's possible to have something that's effectively a union, so the names of the slots would change based on the content of some other slot. Not having support for that isn't a big problem for most of my cases though - those kinds of slots seem rare.
Updated•3 years ago
|
Severity: normal → S3
Updated•11 months ago
|
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•