mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +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):
|
def __init__(self, descriptor):
|
||||||
CGGetPerInterfaceObject.__init__(self, descriptor, "GetProtoObject",
|
CGGetPerInterfaceObject.__init__(self, descriptor, "GetProtoObject",
|
||||||
"PrototypeList::", pub=True)
|
"PrototypeList::", pub=descriptor.hasDescendants())
|
||||||
|
|
||||||
def definition_body(self):
|
def definition_body(self):
|
||||||
return CGList([
|
return CGList([
|
||||||
|
@ -2594,7 +2594,7 @@ class CGGetConstructorObjectMethod(CGGetPerInterfaceObject):
|
||||||
"""
|
"""
|
||||||
def __init__(self, descriptor):
|
def __init__(self, descriptor):
|
||||||
CGGetPerInterfaceObject.__init__(self, descriptor, "GetConstructorObject",
|
CGGetPerInterfaceObject.__init__(self, descriptor, "GetConstructorObject",
|
||||||
"constructors::")
|
"constructors::", pub=descriptor.hasDescendants())
|
||||||
|
|
||||||
def definition_body(self):
|
def definition_body(self):
|
||||||
return CGList([
|
return CGList([
|
||||||
|
@ -4964,6 +4964,7 @@ class CGDescriptor(CGThing):
|
||||||
cgThings.append(CGWrapMethod(descriptor))
|
cgThings.append(CGWrapMethod(descriptor))
|
||||||
|
|
||||||
if not descriptor.interface.isCallback():
|
if not descriptor.interface.isCallback():
|
||||||
|
if descriptor.concrete or descriptor.hasDescendants():
|
||||||
cgThings.append(CGIDLInterface(descriptor))
|
cgThings.append(CGIDLInterface(descriptor))
|
||||||
cgThings.append(CGInterfaceTrait(descriptor))
|
cgThings.append(CGInterfaceTrait(descriptor))
|
||||||
if descriptor.weakReferenceable:
|
if descriptor.weakReferenceable:
|
||||||
|
|
|
@ -185,7 +185,7 @@ class Descriptor(DescriptorProvider):
|
||||||
# If we're concrete, we need to crawl our ancestor interfaces and mark
|
# If we're concrete, we need to crawl our ancestor interfaces and mark
|
||||||
# them as having a concrete descendant.
|
# them as having a concrete descendant.
|
||||||
self.concrete = (not self.interface.isCallback() and
|
self.concrete = (not self.interface.isCallback() and
|
||||||
desc.get('concrete', True))
|
not self.interface.getExtendedAttribute("Abstract"))
|
||||||
self.hasUnforgeableMembers = (self.concrete and
|
self.hasUnforgeableMembers = (self.concrete and
|
||||||
any(MemberIsUnforgeable(m, self) for m in
|
any(MemberIsUnforgeable(m, self) for m in
|
||||||
self.interface.members))
|
self.interface.members))
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
* http://dev.w3.org/csswg/cssom/#the-css-interface
|
* http://dev.w3.org/csswg/cssom/#the-css-interface
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
[Abstract]
|
||||||
interface CSS {
|
interface CSS {
|
||||||
[Throws]
|
[Throws]
|
||||||
static DOMString escape(DOMString ident);
|
static DOMString escape(DOMString ident);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue