Bug 819791 - Part 9: Use explicit TArray copy constructors in IPDL generated code. r=cjones
authorJustin Lebar <justin.lebar@gmail.com>
Tue, 18 Dec 2012 20:16:07 -0500
changeset 125587 fa47cd60942c26de1b31564620ba1fcbe4f9578e
parent 125586 18289b3b138ee840896f88337d611394ec91594f
child 125588 80ca371b52d5e7a2e6ed6726bfd1a0c4b53ddcfd
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscjones
bugs819791
milestone20.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 819791 - Part 9: Use explicit TArray copy constructors in IPDL generated code. r=cjones This cset makes two nop changes to generated IPDL code. 1) Change an instance of InfallibleTArray<Foo> foo = InfallibleTArray<Foo>(); to InfallibleTArray<Foo> foo; 2) Change an instance of InfallibleTArray<Foo> foo = bar; to InfallibleTArray<Foo> foo(bar);
ipc/ipdl/ipdl/lower.py
--- a/ipc/ipdl/ipdl/lower.py
+++ b/ipc/ipdl/ipdl/lower.py
@@ -3287,17 +3287,17 @@ class _GenerateProtocolActorCode(ipdl.as
 
             block = StmtBlock()
             block.addstmts([
                 Whitespace(
                     '// Recursively shutting down %s kids\n'% (managed.name()),
                     indent=1),
                 StmtDecl(
                     Decl(p.managedVarType(managed, self.side), kidsvar.name),
-                    init=p.managedVar(managed, self.side)),
+                    initargs=[ p.managedVar(managed, self.side) ]),
                 foreachdestroy,
             ])
             destroysubtree.addstmt(block)
 
         if len(ptype.manages):
             destroysubtree.addstmt(Whitespace.NL)
         destroysubtree.addstmts([ Whitespace('// Finally, destroy "us".\n',
                                              indent=1),
@@ -4396,17 +4396,17 @@ class _GenerateProtocolActorCode(ipdl.as
                 # XXX: better error message
                 readcase.addstmt(StmtReturn.FALSE)
             else:
                 if c.special:
                     c = c.other       # see above
                 tmpvar = ExprVar('tmp')
                 ct = c.bareType()
                 readcase.addstmts([
-                    StmtDecl(Decl(ct, tmpvar.name), init=c.defaultValue()),
+                    StmtDecl(Decl(ct, tmpvar.name)),
                     StmtExpr(ExprAssn(ExprDeref(var), tmpvar)),
                     StmtReturn(self.read(
                         c.ipdltype,
                         ExprAddrOf(ExprCall(ExprSelect(var, '->',
                                                        c.getTypeName()))),
                         msgvar, itervar))
                 ])