Bug 1430183 - ClassTypedef from CodeGen.py is unused. r=qDot draft
authorAndrew McCreight <continuation@gmail.com>
Fri, 12 Jan 2018 10:43:39 -0800
changeset 719714 789597f4a4444ece1c5bee86e8e46195630cc43f
parent 719297 fe77befa5210fbd680660abe617145bc821f98c1
child 745892 6d95620593597845c5a9b5464557b0215748362e
push id95358
push userbmo:continuation@gmail.com
push dateFri, 12 Jan 2018 18:53:42 +0000
reviewersqDot
bugs1430183
milestone59.0a1
Bug 1430183 - ClassTypedef from CodeGen.py is unused. r=qDot This was used in CGPrototypeTraitsClass, but that usage was removed at some point. MozReview-Commit-ID: G3bGMma5XTw
dom/bindings/Codegen.py
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -11047,29 +11047,16 @@ class ClassMember(ClassItem):
         if self.body:
             body = " = " + self.body
         else:
             body = ""
         return '%s %s::%s%s;\n' % (self.type, cgClass.getNameString(),
                                    self.name, body)
 
 
-class ClassTypedef(ClassItem):
-    def __init__(self, name, type, visibility="public"):
-        self.type = type
-        ClassItem.__init__(self, name, visibility)
-
-    def declare(self, cgClass):
-        return 'typedef %s %s;\n' % (self.type, self.name)
-
-    def define(self, cgClass):
-        # Only goes in the header
-        return ''
-
-
 class ClassEnum(ClassItem):
     def __init__(self, name, entries, values=None, visibility="public"):
         self.entries = entries
         self.values = values
         ClassItem.__init__(self, name, visibility)
 
     def declare(self, cgClass):
         entries = []
@@ -11098,32 +11085,31 @@ class ClassUnion(ClassItem):
     def define(self, cgClass):
         # Only goes in the header
         return ''
 
 
 class CGClass(CGThing):
     def __init__(self, name, bases=[], members=[], constructors=[],
                  destructor=None, methods=[],
-                 typedefs=[], enums=[], unions=[], templateArgs=[],
+                 enums=[], unions=[], templateArgs=[],
                  templateSpecialization=[], isStruct=False,
                  disallowCopyConstruction=False, indent='',
                  decorators='',
                  extradeclarations='',
                  extradefinitions=''):
         CGThing.__init__(self)
         self.name = name
         self.bases = bases
         self.members = members
         self.constructors = constructors
         # We store our single destructor in a list, since all of our
         # code wants lists of members.
         self.destructors = [destructor] if destructor else []
         self.methods = methods
-        self.typedefs = typedefs
         self.enums = enums
         self.unions = unions
         self.templateArgs = templateArgs
         self.templateSpecialization = templateSpecialization
         self.isStruct = isStruct
         self.disallowCopyConstruction = disallowCopyConstruction
         self.indent = indent
         self.defaultVisibility = 'public' if isStruct else 'private'
@@ -11208,17 +11194,17 @@ class CGClass(CGThing):
                     return ("%s(const %s&) = delete;\n"
                             "%s& operator=(const %s&) = delete;\n" % (name, name, name, name))
 
             disallowedCopyConstructors = [DisallowedCopyConstructor()]
         else:
             disallowedCopyConstructors = []
 
         order = [self.enums, self.unions,
-                 self.typedefs, self.members,
+                 self.members,
                  self.constructors + disallowedCopyConstructors,
                  self.destructors, self.methods]
 
         lastVisibility = self.defaultVisibility
         pieces = []
         for memberList in order:
             code, lastVisibility = declareMembers(self, memberList, lastVisibility)