mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Auto merge of #8993 - nox:small-codegen-slimming, r=Ms2ger
Slightly reduce the output of codegen Interfaces which we know are never instantiated can generate less code. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8993) <!-- Reviewable:end -->
This commit is contained in:
commit
8dc4b8dcb9
3 changed files with 6 additions and 4 deletions
|
@ -2577,7 +2577,7 @@ class CGGetProtoObjectMethod(CGGetPerInterfaceObject):
|
|||
"""
|
||||
def __init__(self, descriptor):
|
||||
CGGetPerInterfaceObject.__init__(self, descriptor, "GetProtoObject",
|
||||
"PrototypeList::", pub=True)
|
||||
"PrototypeList::", pub=descriptor.hasDescendants())
|
||||
|
||||
def definition_body(self):
|
||||
return CGList([
|
||||
|
@ -2594,7 +2594,7 @@ class CGGetConstructorObjectMethod(CGGetPerInterfaceObject):
|
|||
"""
|
||||
def __init__(self, descriptor):
|
||||
CGGetPerInterfaceObject.__init__(self, descriptor, "GetConstructorObject",
|
||||
"constructors::")
|
||||
"constructors::", pub=descriptor.hasDescendants())
|
||||
|
||||
def definition_body(self):
|
||||
return CGList([
|
||||
|
@ -4964,7 +4964,8 @@ class CGDescriptor(CGThing):
|
|||
cgThings.append(CGWrapMethod(descriptor))
|
||||
|
||||
if not descriptor.interface.isCallback():
|
||||
cgThings.append(CGIDLInterface(descriptor))
|
||||
if descriptor.concrete or descriptor.hasDescendants():
|
||||
cgThings.append(CGIDLInterface(descriptor))
|
||||
cgThings.append(CGInterfaceTrait(descriptor))
|
||||
if descriptor.weakReferenceable:
|
||||
cgThings.append(CGWeakReferenceableTrait(descriptor))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue