Bug 1335103 - Remove spurious usage of Actor in lower.py. r=billm draft
authorAndrew McCreight <continuation@gmail.com>
Fri, 27 Jan 2017 15:48:52 -0800
changeset 468111 8325692163a1de9b6c04298a2aeb504a6003448e
parent 468005 f7e1982a2582b14c5885d787b530f879da3a040e
child 543848 0e2a5def1a6555d2ba34a5fae0f37082cb2ff789
push id43354
push userbmo:continuation@gmail.com
push dateMon, 30 Jan 2017 18:40:20 +0000
reviewersbillm
bugs1335103
milestone54.0a1
Bug 1335103 - Remove spurious usage of Actor in lower.py. r=billm Actor is used in the process checking code, which will get deleted in a separate bug. Instead, just convert the actor name + side to a string manually. 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|'''
@@ -573,20 +573,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