Closed
Bug 885176
Opened 11 years ago
Closed 11 years ago
Use Vector's bulk append function instead of appending elements one at a time
Categories
(Core :: JavaScript Engine, enhancement)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: sunfish, Assigned: sunfish)
Details
Attachments
(3 files)
11.74 KB,
patch
|
nbp
:
review+
|
Details | Diff | Splinter Review |
2.89 KB,
patch
|
sstangl
:
review+
|
Details | Diff | Splinter Review |
2.72 KB,
patch
|
sstangl
:
review+
|
Details | Diff | Splinter Review |
The Vector class template has append methods which can insert many elements at once. This is simpler than using an explicit loop to insert multiple elements one at a time, and may reduce intermediate allocations in some cases.
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #765164 -
Flags: review?(nicolas.b.pierron)
Comment 2•11 years ago
|
||
Comment on attachment 765164 [details] [diff] [review] a proposed fix Review of attachment 765164 [details] [diff] [review]: ----------------------------------------------------------------- Great, thanks for doing that.
Attachment #765164 -
Flags: review?(nicolas.b.pierron) → review+
Assignee | ||
Comment 3•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/adfd8d9bfd0b
Comment 4•11 years ago
|
||
Comment on attachment 765164 [details] [diff] [review] a proposed fix Review of attachment 765164 [details] [diff] [review]: ----------------------------------------------------------------- Follow-up style nits? ::: js/src/ion/IonAnalysis.cpp @@ +787,5 @@ > block->setDomIndex(index); > > + if (!worklist.append(block->immediatelyDominatedBlocksBegin(), > + block->immediatelyDominatedBlocksEnd())) > + return false; nit: needs {} @@ +1358,5 @@ > > // Add all immediate dominators to the front of the worklist. > + if (!worklist.append(block->immediatelyDominatedBlocksBegin(), > + block->immediatelyDominatedBlocksEnd())) > + return false; {} ::: js/src/ion/ValueNumbering.cpp @@ +367,5 @@ > > // Add all immediate dominators to the front of the worklist. > + if (!worklist.append(block->immediatelyDominatedBlocksBegin(), > + block->immediatelyDominatedBlocksEnd())) > + return false; {}
Comment 5•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/adfd8d9bfd0b
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Updated•11 years ago
|
Assignee: general → sunfish
Assignee | ||
Comment 6•11 years ago
|
||
Attachment #766697 -
Flags: review?(sstangl)
Comment 7•11 years ago
|
||
Comment on attachment 766697 [details] [diff] [review] follow-up style nits Review of attachment 766697 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/ion/IonAnalysis.cpp @@ +786,5 @@ > MBasicBlock *block = worklist.popCopy(); > block->setDomIndex(index); > > if (!worklist.append(block->immediatelyDominatedBlocksBegin(), > + block->immediatelyDominatedBlocksEnd())) { style guide requires { on a new line, aligned with the first character of "if". @@ +1358,5 @@ > MBasicBlock *block = worklist.popCopy(); > > // Add all immediate dominators to the front of the worklist. > if (!worklist.append(block->immediatelyDominatedBlocksBegin(), > + block->immediatelyDominatedBlocksEnd())) { and here ::: js/src/ion/ValueNumbering.cpp @@ +366,5 @@ > IonSpew(IonSpew_GVN, "Looking at block %d", block->id()); > > // Add all immediate dominators to the front of the worklist. > if (!worklist.append(block->immediatelyDominatedBlocksBegin(), > + block->immediatelyDominatedBlocksEnd())) { and here :)
Attachment #766697 -
Flags: review?(sstangl) → review+
Assignee | ||
Comment 8•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/8f45d23330a9
Comment 9•11 years ago
|
||
hmmmmm
Assignee | ||
Comment 10•11 years ago
|
||
Oops, I applied the patch without your most recent comments fixed. Here's a patch which fixes that.
Attachment #766961 -
Flags: review?(sstangl)
Comment 11•11 years ago
|
||
Comment on attachment 766961 [details] [diff] [review] fix the fix Review of attachment 766961 [details] [diff] [review]: ----------------------------------------------------------------- Thanks, no worries.
Attachment #766961 -
Flags: review?(sstangl) → review+
You need to log in
before you can comment on or make changes to this bug.
Description
•