Bug 1316755, part 2 - Eliminate spurious usage of Actor in lower.py. draft
authorAndrew McCreight <continuation@gmail.com>
Fri, 27 Jan 2017 15:48:52 -0800
changeset 467555 53be4b927dc1047822ed3b7f4fe2c31de661522e
parent 467554 2539bf5dbfb64ff48955fe0b59d2c8366b8caf76
child 467556 bcc0f737b704e83d3a02e8c480bf2f11ff2c5ceb
push id43218
push userbmo:continuation@gmail.com
push dateSat, 28 Jan 2017 00:54:33 +0000
bugs1316755
milestone54.0a1
Bug 1316755, part 2 - Eliminate spurious usage of Actor in lower.py. Actor is used in the process checking code, which will get deleted later. MozReview-Commit-ID: 9zfD4MuscVw
ipc/ipdl/ipdl/lower.py
--- a/ipc/ipdl/ipdl/lower.py
+++ b/ipc/ipdl/ipdl/lower.py
@@ -4,17 +4,17 @@
 
 import os, re, sys
 from copy import deepcopy
 from collections import OrderedDict
 
 import ipdl.ast
 import ipdl.builtin
 from ipdl.cxx.ast import *
-from ipdl.type import Actor, ActorType, ProcessGraph, TypeVisitor, builtinHeaderIncludes
+from ipdl.type import ActorType, ProcessGraph, TypeVisitor, builtinHeaderIncludes
 
 ##-----------------------------------------------------------------------------
 ## "Public" interface to lowering
 ##
 class LowerToCxx:
     def lower(self, tu):
         '''returns |[ header: File ], [ cpp : File ]| representing the
 lowered form of |tu|'''
@@ -569,20 +569,20 @@ def _cxxConstPtrToType(ipdltype, side):
         t.ptr = 0
         t.ptrconstptr = 1
         return t
     t.const = 1
     t.ptr = 1
     return t
 
 def _allocMethod(ptype, side):
-    return ExprVar('Alloc'+ str(Actor(ptype, side)))
+    return ExprVar('Alloc' + ptype.name() + side.title())
 
 def _deallocMethod(ptype, side):
-    return ExprVar('Dealloc'+ str(Actor(ptype, side)))
+    return ExprVar('Dealloc' + ptype.name() + side.title())
 
 ##
 ## A _HybridDecl straddles IPDL and C++ decls.  It knows which C++
 ## types correspond to which IPDL types, and it also knows how
 ## serialize and deserialize "special" IPDL C++ types.
 ##
 class _HybridDecl:
     """A hybrid decl stores both an IPDL type and all the C++ type