Bug 1430183 - ClassTypedef from CodeGen.py is unused. r=qdot
authorAndrew McCreight <continuation@gmail.com>
Fri, 12 Jan 2018 10:43:39 -0800
changeset 450933 89a919eaef108beff2f54951e69b15249d28c24e
parent 450932 c58bce6abcf268f0d707302d58f42ccf50aab452
child 450934 19bda1338749c0d771cb2ac749f7dbf80cc3815c
push id8543
push userryanvm@gmail.com
push dateTue, 16 Jan 2018 14:33:22 +0000
treeherdermozilla-beta@a6525ed16a32 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersqdot
bugs1430183
milestone59.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 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
@@ -11081,29 +11081,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 = []
@@ -11132,32 +11119,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'
@@ -11242,17 +11228,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)