Closed
Bug 1268805
Opened 8 years ago
Closed 8 years ago
Store private GC things inside Values
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: shu, Unassigned)
Details
Attachments
(1 file)
36.32 KB,
patch
|
terrence
:
review+
|
Details | Diff | Splinter Review |
Often in Classes with reserved slots I want to store a GC thing that's not an Object, String, or Symbol. Having a PrivateGCThingValue that's automatically handled by GC would be very convenient.
Reporter | ||
Comment 1•8 years ago
|
||
I noticed no performance regressions on octane.
Attachment #8746963 -
Flags: review?(terrence)
Comment 2•8 years ago
|
||
Comment on attachment 8746963 [details] [diff] [review] Implement PrivateGCThingValue. Review of attachment 8746963 [details] [diff] [review]: ----------------------------------------------------------------- Looks great! ::: js/public/HeapAPI.h @@ +392,5 @@ > return js::gc::detail::CellIsMarkedGray(thing.asCell()); > } > > +extern JS_PUBLIC_API(JS::TraceKind) > +GCThingTraceKind(void* thing); Can this be js::gc::Cell* here? If not no worries. ::: js/src/gc/Marking.h @@ +438,5 @@ > + !mozilla::IsBaseOf<JS::Symbol, T>::value, T> > +{ > + static_assert(!mozilla::IsSame<Cell, T>::value && !mozilla::IsSame<TenuredCell, T>::value, > + "T must not be Cell or TenuredCell"); > +}; Nice! ::: js/src/jsapi-tests/testPrivateGCThingValue.cpp @@ +13,5 @@ > +class TestTracer : public JS::CallbackTracer > +{ > + void onChild(const JS::GCCellPtr& thing) override { > + printf("*thingp = %p\n", thing.asCell()); > + printf("kind = %d\n", static_cast<int>(thing.kind())); Comment or remove the prints before checking in.
Attachment #8746963 -
Flags: review?(terrence) → review+
Comment 5•8 years ago
|
||
Backed the original patch and the follow-up out for build bustage. Backout: https://hg.mozilla.org/integration/mozilla-inbound/rev/03af61c547dd Follow-up push with failing jobs: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=b8a517eb7c6b700b6845a4f43e65cb2f0da58287
Flags: needinfo?(shu)
Comment 7•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/fdea8d099dbd
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in
before you can comment on or make changes to this bug.
Description
•