Bug 1317180, part 5 - Get rid of the now-unused state field in TypeSpec. r=billm draft
authorAndrew McCreight <continuation@gmail.com>
Mon, 14 Nov 2016 10:50:49 -0800
changeset 438682 f6305a1f4abc9b68b28ad4d081e24adf7ccff4c8
parent 438681 5011b91b46d920d94bef63e7119cae613527ac3c
child 438683 a384dae027844d4326f401b2420d70deb20ffd26
push id35795
push userbmo:continuation@gmail.com
push dateMon, 14 Nov 2016 22:23:52 +0000
reviewersbillm
bugs1317180
milestone53.0a1
Bug 1317180, part 5 - Get rid of the now-unused state field in TypeSpec. r=billm
ipc/ipdl/ipdl/ast.py
ipc/ipdl/ipdl/type.py
--- a/ipc/ipdl/ipdl/ast.py
+++ b/ipc/ipdl/ipdl/ast.py
@@ -401,32 +401,28 @@ State.DYING = State(Loc.NONE, '[dying]',
 
 class Param(Node):
     def __init__(self, loc, typespec, name):
         Node.__init__(self, loc)
         self.name = name
         self.typespec = typespec
 
 class TypeSpec(Node):
-    def __init__(self, loc, spec, state=None, array=0, nullable=0,
+    def __init__(self, loc, spec, array=0, nullable=0,
                  myChmod=None, otherChmod=None):
         Node.__init__(self, loc)
         self.spec = spec                # QualifiedId
-        self.state = state              # None or State
         self.array = array              # bool
         self.nullable = nullable        # bool
         self.myChmod = myChmod          # None or string
         self.otherChmod = otherChmod    # None or string
 
     def basename(self):
         return self.spec.baseid
 
-    def isActor(self):
-        return self.state is not None
-
     def __str__(self):  return str(self.spec)
 
 class QualifiedId:              # FIXME inherit from node?
     def __init__(self, loc, baseid, quals=[ ]):
         assert isinstance(baseid, str)
         for qual in quals: assert isinstance(qual, str)
 
         self.loc = loc
--- a/ipc/ipdl/ipdl/type.py
+++ b/ipc/ipdl/ipdl/type.py
@@ -1215,21 +1215,19 @@ class GatherDecls(TcheckVisitor):
                 toState.decl = sdecl
                 toState.start = sdecl.type.start
 
         t.toStates = set(t.toStates)
 
 
     def _canonicalType(self, itype, typespec, chmodallowed=0):
         loc = typespec.loc
-        
         if itype.isIPDL():
             if itype.isProtocol():
                 itype = ActorType(itype,
-                                  state=typespec.state,
                                   nullable=typespec.nullable)
             # FIXME/cjones: ShmemChmod is disabled until bug 524193
             if 0 and chmodallowed and itype.isShmem():
                 itype = ShmemChmodType(
                     itype,
                     myChmod=typespec.myChmod,
                     otherChmod=typespec.otherChmod)