Bug 1323468, part 4 - inline |from| in Transition. r=kanru

MozReview-Commit-ID: LwcpNikbe2b

--HG--
extra : rebase_source : 25ace3d2f3e408ca48c72f6e8ea11217990a6f12
This commit is contained in:
Andrew McCreight 2016-12-14 11:15:05 -08:00
Родитель d0dc5ef0a4
Коммит f27d72c33d
1 изменённых файлов: 1 добавлений и 4 удалений

Просмотреть файл

@ -1665,7 +1665,6 @@ class _GenerateProtocolCode(ipdl.ast.Visitor):
# bool Transition(MessageType msg, State* next)
# The state we are transitioning from is stored in *next.
fromvar = ExprVar('from')
msgtypevar = ExprVar('msg')
nextvar = ExprVar('next')
@ -1675,7 +1674,7 @@ class _GenerateProtocolCode(ipdl.ast.Visitor):
Decl(Type('State', ptr=1), nextvar.name) ],
ret=Type.VOID))
fromswitch = StmtSwitch(fromvar)
fromswitch = StmtSwitch(ExprDeref(nextvar))
# special case for Null
nullerrorblock = Block()
@ -1714,8 +1713,6 @@ class _GenerateProtocolCode(ipdl.ast.Visitor):
StmtBreak() ])
fromswitch.addcase(DefaultLabel(), unreachedblock)
transitionfunc.addstmt(StmtDecl(Decl(Type('State'), fromvar.name),
init=ExprDeref(nextvar)))
transitionfunc.addstmt(fromswitch)
return transitionfunc