Closed
Bug 1206290
Opened 9 years ago
Closed 9 years ago
Implement a JS::ubi::PostOrder depth first traversal
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: fitzgen, Assigned: fitzgen)
References
Details
Attachments
(2 files, 3 obsolete files)
4.95 KB,
patch
|
sfink
:
review+
|
Details | Diff | Splinter Review |
12.20 KB,
patch
|
fitzgen
:
review+
|
Details | Diff | Splinter Review |
To compute dominator trees, we need to do post order traversals. We should make this reusable, similar to JS::ubi::BreadthFirst.
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8664521 -
Flags: review?(sphink)
Assignee | ||
Comment 2•9 years ago
|
||
Attachment #8664522 -
Flags: review?(sphink)
Assignee | ||
Comment 3•9 years ago
|
||
Try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=2b888e6e0297
Assignee | ||
Comment 4•9 years ago
|
||
Attachment #8664522 -
Attachment is obsolete: true
Attachment #8664522 -
Flags: review?(sphink)
Attachment #8664907 -
Flags: review?(sphink)
Assignee | ||
Comment 5•9 years ago
|
||
warnings-as-errors really didn't like that I specialized JS::ubi::Concrete outside of the JS::ubi namespace :-/ New try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=54d7965acfa1
Assignee | ||
Comment 6•9 years ago
|
||
Attachment #8664907 -
Attachment is obsolete: true
Attachment #8664907 -
Flags: review?(sphink)
Attachment #8665160 -
Flags: review?(sphink)
Assignee | ||
Comment 7•9 years ago
|
||
Sorry for the bug spam. This version has a fix for the bad header include order and make OriginAndEdges' move construction/assignment explicit since msvc won't create defaults for them. New try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e7680389dfee
Updated•9 years ago
|
Attachment #8664521 -
Flags: review?(sphink) → review+
Comment 8•9 years ago
|
||
Comment on attachment 8665160 [details] [diff] [review] Part 1: Implement a JS::ubi::PostOrder depth first traversal Review of attachment 8665160 [details] [diff] [review]: ----------------------------------------------------------------- lgtm ::: js/public/UbiNodePostOrder.h @@ +11,5 @@ > + > +#include "js/UbiNode.h" > +#include "js/Utility.h" > +#include "js/Vector.h" > + #include "mozilla/Move.h" @@ +75,5 @@ > + private: > + bool fillEdgesFromRange(EdgeVector& edges, UniquePtr<EdgeRange>& range) { > + MOZ_ASSERT(range); > + for ( ; !range->empty(); range->popFront()) { > + if (!edges.append(mozilla::Move(range->front()))) isn't this Move() redundant? @@ +117,5 @@ > + // Traverse the graph in post-order, starting with the set of nodes passed > + // to `addStart` and applying `visitor::operator()` for each node in > + // the graph, as described above. > + // > + // This should be called only once per instance of this class. That's funky. I guess the only reason you have an object at all here is so you can split out the addStart calls from everything else? It seems like this should be asserted. Or let it happen, and define the semantics -- as long as you don't mutate the graph, you can call addStart again and find out what is only reachable from that node (or nodes). But that doesn't seem very useful.
Attachment #8665160 -
Flags: review?(sphink) → review+
Assignee | ||
Comment 9•9 years ago
|
||
Attachment #8665160 -
Attachment is obsolete: true
Attachment #8665470 -
Flags: review+
Assignee | ||
Comment 10•9 years ago
|
||
Added the missing header include. Assert that traverse() is only called once.
Keywords: checkin-needed
Comment 11•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/b9b74d5bd423 https://hg.mozilla.org/integration/mozilla-inbound/rev/8bdf0fb54af3
Keywords: checkin-needed
Comment 12•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/b9b74d5bd423 https://hg.mozilla.org/mozilla-central/rev/8bdf0fb54af3
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in
before you can comment on or make changes to this bug.
Description
•