Bug 1346958 - Eliminate PickleIterator::operator= calls. r=kanru
authorAndrew McCreight <continuation@gmail.com>
Mon, 13 Mar 2017 14:24:45 -0700
changeset 347524 20045f98a66c7a1c2eb9da4a2f12c21a5c724e5e
parent 347523 1306b08b3c98ac6ce25dd7ff73b7d87a23b11f98
child 347525 d9aeb5fbd1796ba98e7bf3dfd630a06c4f604f28
push id31499
push userkwierso@gmail.com
push dateTue, 14 Mar 2017 23:41:39 +0000
treeherdermozilla-central@cef93bf5a0a1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskanru
bugs1346958
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1346958 - Eliminate PickleIterator::operator= calls. r=kanru MozReview-Commit-ID: BGJUt9NG3GX
ipc/ipdl/ipdl/lower.py
--- a/ipc/ipdl/ipdl/lower.py
+++ b/ipc/ipdl/ipdl/lower.py
@@ -4133,20 +4133,19 @@ class _GenerateProtocolActorCode(ipdl.as
         msgexpr = ExprAddrOf(msgvar)
         itervar = ExprVar('msgverifyIter__')
         # IPC::Message msgverify__ = Move(*(reply__)); or
         # IPC::Message msgverify__ = Move(*(msg__));
         stmts.append(StmtDecl(Decl(Type('IPC::Message', ptr=0), 'msgverify__'),
                                    init=ExprMove(ExprDeref(msgsrcVar))))
 
         stmts.extend((
-            # PickleIterator msgverifyIter__ = PickleIterator(msgverify__);
+            # PickleIterator msgverifyIter__(msgverify__);
             [ StmtDecl(Decl(_iterType(ptr=0), itervar.name),
-                       init=ExprCall(ExprVar('PickleIterator'),
-                                     args=[ msgvar ])) ]
+                       initargs=[ msgvar ]) ]
             # declare varCopy for each variable to deserialize.
             + [ StmtDecl(Decl(p.bareType(side), p.var().name + 'Copy'))
                       for p in params ]
             + [ Whitespace.NL ]
             #  checked Read(&(varCopy), &(msgverify__), &(msgverifyIter__))
             + [ self.checkedRead(p.ipdltype,
                                  ExprAddrOf(ExprVar(p.var().name + 'Copy')),
                                  msgexpr, ExprAddrOf(itervar),
@@ -4206,18 +4205,17 @@ class _GenerateProtocolActorCode(ipdl.as
             reads = [ self.checkedRead(None, ExprAddrOf(handlevar), msgexpr,
                                        ExprAddrOf(self.itervar),
                                        errfn, "'%s'" % handletype.name,
                                        sentinelKey='actor', errfnSentinel=errfnSent) ]
             start = 1
 
         stmts.extend((
             [ StmtDecl(Decl(_iterType(ptr=0), self.itervar.name),
-                     init=ExprCall(ExprVar('PickleIterator'),
-                                   args=[ msgvar ])) ]
+                       initargs=[ msgvar ]) ]
             + decls + [ StmtDecl(Decl(p.bareType(side), p.var().name))
                       for p in md.params ]
             + [ Whitespace.NL ]
             + reads + [ self.checkedRead(p.ipdltype, ExprAddrOf(p.var()),
                                          msgexpr, ExprAddrOf(itervar),
                                          errfn, "'%s'" % p.bareType(side).name,
                                          sentinelKey=p.name, errfnSentinel=errfnSent)
                         for p in md.params[start:] ]
@@ -4232,18 +4230,17 @@ class _GenerateProtocolActorCode(ipdl.as
                                    'Received reply ', actor, receiving=True) ]
         if 0 == len(md.returns):
             return stmts
 
         itervar = self.itervar
         stmts.extend(
             [ Whitespace.NL,
               StmtDecl(Decl(_iterType(ptr=0), itervar.name),
-                       init=ExprCall(ExprVar('PickleIterator'),
-                                     args=[ self.replyvar ])) ]
+                       initargs= [ self.replyvar ]) ]
             + [ self.checkedRead(r.ipdltype, r.var(),
                                  ExprAddrOf(self.replyvar),
                                  ExprAddrOf(self.itervar),
                                  errfn, "'%s'" % r.bareType(side).name,
                                  sentinelKey=r.name, errfnSentinel=errfnSentinel)
                 for r in md.returns ]
             + [ self.endRead(self.replyvar, itervar) ])