Bug 1328421 - Replace MessageId with ID in the IPDL parser. r=billm
authorAndrew McCreight <continuation@gmail.com>
Tue, 14 Feb 2017 09:53:25 -0800
changeset 343146 9906e1364f049e794a741ca7ff93d16ded5bdff9
parent 343145 145410f30206db4b6254b812c1a2a52fb90748e5
child 343147 5cc18343abddfcd0700378a89b656374a732e407
push id31371
push usercbook@mozilla.com
push dateThu, 16 Feb 2017 12:15:11 +0000
treeherdermozilla-central@8c8b54b13be7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs1328421
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1328421 - Replace MessageId with ID in the IPDL parser. r=billm MozReview-Commit-ID: YHfxmB1McY
ipc/ipdl/ipdl/parser.py
--- a/ipc/ipdl/ipdl/parser.py
+++ b/ipc/ipdl/ipdl/parser.py
@@ -106,18 +106,16 @@ def locFromTok(p, num):
 
 reserved = set((
         'async',
         'both',
         'child',
         'class',
         'compress',
         'compressall',
-        '__delete__',
-        'delete',                       # reserve 'delete' to prevent its use
         'from',
         'include',
         'intr',
         'manager',
         'manages',
         'namespace',
         'nested',
         'nullable',
@@ -435,36 +433,27 @@ def p_MessageDecl(p):
 
     if Parser.current.direction is None:
         _error(msg.loc, 'missing message direction')
     msg.direction = Parser.current.direction
 
     p[0] = msg
 
 def p_MessageBody(p):
-    """MessageBody : MessageId MessageInParams MessageOutParams OptionalMessageModifiers"""
+    """MessageBody : ID MessageInParams MessageOutParams OptionalMessageModifiers"""
     # FIXME/cjones: need better loc info: use one of the quals
-    loc, name = p[1]
-    msg = MessageDecl(loc)
+    name = p[1]
+    msg = MessageDecl(locFromTok(p, 1))
     msg.name = name
     msg.addInParams(p[2])
     msg.addOutParams(p[3])
     msg.addModifiers(p[4])
 
     p[0] = msg
 
-def p_MessageId(p):
-    """MessageId : ID
-                 | __DELETE__
-                 | DELETE"""
-    loc = locFromTok(p, 1)
-    if 'delete' == p[1]:
-        _error(loc, "`delete' is a reserved identifier")
-    p[0] = [ loc, p[1] ]
-
 def p_MessageInParams(p):
     """MessageInParams : '(' ParamList ')'"""
     p[0] = p[2]
 
 def p_MessageOutParams(p):
     """MessageOutParams : RETURNS '(' ParamList ')'
                         | """
     if 1 == len(p):