Bug 1317180, part 5 - Get rid of the now-unused state field in TypeSpec. r=billm
--- 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)