Bug 1334720 - Remove some unused IPDL code generator methods. r=jld
MozReview-Commit-ID: 4PRMjdjyFM8
--- a/ipc/ipdl/ipdl/lower.py
+++ b/ipc/ipdl/ipdl/lower.py
@@ -414,20 +414,16 @@ def _unionTypeReadError(unionname):
def _killProcess(pid):
return ExprCall(
ExprVar('base::KillProcess'),
args=[ pid,
# XXX this is meaningless on POSIX
ExprVar('base::PROCESS_END_KILLED_BY_USER'),
ExprLiteral.FALSE ])
-def _badTransition():
- # FIXME: make this a FatalError()
- return [ _printWarningMessage('bad state transition!') ]
-
# Results that IPDL-generated code returns back to *Channel code.
# Users never see these
class _Result:
@staticmethod
def Type():
return Type('Result')
Processed = ExprVar('MsgProcessed')
--- a/ipc/ipdl/ipdl/type.py
+++ b/ipc/ipdl/ipdl/type.py
@@ -434,43 +434,27 @@ def iteractortypes(t, visited=None):
for actor in iteractortypes(t.basetype, visited):
yield actor
elif t.isCompound() and t not in visited:
visited.add(t)
for c in t.itercomponents():
for actor in iteractortypes(c, visited):
yield actor
-def hasactor(type):
- """Return true iff |type| is an actor or has one buried within."""
- for _ in iteractortypes(type): return True
- return False
-
def hasshmem(type):
"""Return true iff |type| is shmem or has it buried within."""
class found: pass
class findShmem(TypeVisitor):
def visitShmemType(self, s): raise found()
try:
type.accept(findShmem())
except found:
return True
return False
-def hasfd(type):
- """Return true iff |type| is fd or has it buried within."""
- class found: pass
- class findFD(TypeVisitor):
- def visitFDType(self, s): raise found()
- try:
- type.accept(findFD())
- except found:
- return True
- return False
-
##--------------------
_builtinloc = Loc('<builtin>', 0)
def makeBuiltinUsing(tname):
quals = tname.split('::')
base = quals.pop()
quals = quals[0:]
return UsingStmt(_builtinloc,
TypeSpec(_builtinloc,