Bug 1317180, part 5 - Get rid of the now-unused state field in TypeSpec. r=billm
authorAndrew McCreight <continuation@gmail.com>
Mon, 14 Nov 2016 10:50:49 -0800
changeset 322632 e7059b65e7aa08c2c6c427b6806fb1d3d082f56b
parent 322631 67e266ee225a735e40f7fba37848306358c7d361
child 322633 9c02838f29ecc5af20638eabdb9ebb3bb861e92b
push id21
push usermaklebus@msu.edu
push dateThu, 01 Dec 2016 06:22:08 +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)