Closed Bug 1466979 Opened 6 years ago Closed 6 years ago

Separate JS::ubi::EdgeVectorTracer and JS::ubi::SimpleEdgeRange into UbiNodeUtils.h

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: KrisWright, Assigned: KrisWright)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file, 6 obsolete files)

JS::ubi::EdgeVectorTracer[1] and JS::ubi::SimpleEdgeRange[2] need to be separated into a utils header file where they can be further accessed in other locations. Also, SimpleEdgeRange needs to be updated to attach single edges that do not come from the GC. [1] https://searchfox.org/mozilla-central/rev/3737701cfab93ccea04c0e9cab211ad10f931d87/js/src/vm/UbiNode.cpp#226-286 [2] https://searchfox.org/mozilla-central/rev/3737701cfab93ccea04c0e9cab211ad10f931d87/js/src/vm/UbiNode.cpp#289-310
Separated the classes into the new UbiNodeUtils.h, updated build files, changed SimpleEdgeRange::init to SimpleEdgeRange::addTracerEdges, created bool addEdge to add new edges to the vector.
Attachment #8983622 - Flags: review?(jimb)
Separated the classes into the new UbiNodeUtils.h, updated build files, changed SimpleEdgeRange::init to SimpleEdgeRange::addTracerEdges, created bool addEdge to add new edges to the vector.
Attachment #8983622 - Attachment is obsolete: true
Attachment #8983622 - Flags: review?(jimb)
Separated the classes into the new UbiNodeUtils.h, updated build files, changed SimpleEdgeRange::init to SimpleEdgeRange::addTracerEdges, created bool addEdge to add new edges to the vector.
Attachment #8985971 - Attachment is obsolete: true
Attachment #8985977 - Flags: review?(jimb)
Separated the classes into the new UbiNodeUtils.h, updated build files, changed SimpleEdgeRange::init to SimpleEdgeRange::addTracerEdges, created bool addEdge to add new edges to the vector.
Attachment #8985977 - Attachment is obsolete: true
Attachment #8985977 - Flags: review?(jimb)
Attachment #8986573 - Flags: review?(jimb)
Separated the classes into the new UbiNodeUtils.h, updated build files, changed SimpleEdgeRange::init to SimpleEdgeRange::addTracerEdges, created bool addEdge to add new edges to the vector.
Attachment #8986573 - Attachment is obsolete: true
Attachment #8986573 - Flags: review?(jimb)
Attachment #8989573 - Flags: review?(jimb)
Comment on attachment 8989573 [details] [diff] [review] Separate JS::ubi::EdgeVectorTracer and JS::ubi::SimpleEdgeRange into UbiNodeUtils.h Review of attachment 8989573 [details] [diff] [review]: ----------------------------------------------------------------- This looks fine overall. I have some minor changes I would like; see the comments. I've cleared the review flag, indicating the patch should not land as-is; but set the "feedback+" flag, which indicates agreement with the overall approach. I noticed that this patch doesn't apply to current mozilla-central; I think this is because someone else went through and removed all uses of mozilla::Move, since we can just use std::move now. (It seems like you correctly dropped the use of Move in `EdgeVectorTracer::onChild`, where it was redundant.) If you can rebase the patch series so that it applies cleanly, we can just have the tree sheriffs land the patch for us once it's approved, which will be convenient. ::: js/public/UbiNodeUtils.h @@ +23,5 @@ > +namespace ubi { > + > +// A JS::CallbackTracer subclass that adds a Edge to a Vector for each > +// edge on which it is invoked. > +class EdgeVectorTracer : public JS::CallbackTracer { Isn't EdgeVectorTracer used only within addTracerEdges? Since that method's definition is still in UbiNode.cpp, it would be nice to keep this this implementation detail isolated to that file. So if possible, let's keep EdgeVectortracer in UbiNode.cpp. ::: js/src/vm/UbiNode.cpp @@ +473,5 @@ > + } > +} > + > +bool > +SimpleEdgeRange::addTracerEdges(JSRuntime* rt, void* thing, JS::TraceKind kind, bool wantNames = true) { Since the default value for wantNames is given in the method declaration in the header file, we don't need to reiterate it here.
Attachment #8989573 - Flags: review?(jimb) → feedback+
Blocks: 1474383
Separated SimpleEdgeRange into the new UbiNodeUtils.h, updated build files, changed SimpleEdgeRange::init to SimpleEdgeRange::addTracerEdges, created bool addEdge to add new edges to the vector.
Attachment #8989573 - Attachment is obsolete: true
Attachment #8990860 - Flags: review?(jimb)
Comment on attachment 8990860 [details] [diff] [review] Separate JS::ubi::EdgeVectorTracer and JS::ubi::SimpleEdgeRange into UbiNodeUtils.h Review of attachment 8990860 [details] [diff] [review]: ----------------------------------------------------------------- Looks good.
Attachment #8990860 - Flags: review?(jimb) → review+
Keywords: checkin-needed
Pushed by nerli@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/caab8817cbf2 Separate JS::ubi::EdgeVectorTracer and JS::ubi::SimpleEdgeRange into UbiNodeUtils.h r=jimb
Keywords: checkin-needed
Separated SimpleEdgeRange into the new UbiNodeUtils.h, updated build files, changed SimpleEdgeRange::init to SimpleEdgeRange::addTracerEdges, created bool addEdge to add new edges to the vector.
Attachment #8990860 - Attachment is obsolete: true
Attachment #8991128 - Flags: review+
Flags: needinfo?(kwright)
Keywords: checkin-needed
Pushed by csabou@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/383714d5acad Separate JS::ubi::EdgeVectorTracer and JS::ubi::SimpleEdgeRange into UbiNodeUtils.h r=jimb
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: