mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Use CGIndenter for CGSpecialized{Method, Getter, Setter}.definition_body.
This commit is contained in:
parent
437c025e99
commit
5affa73aa1
1 changed files with 12 additions and 12 deletions
|
@ -2384,10 +2384,10 @@ class CGSpecializedMethod(CGAbstractExternMethod):
|
||||||
|
|
||||||
def definition_body(self):
|
def definition_body(self):
|
||||||
name = self.method.identifier.name
|
name = self.method.identifier.name
|
||||||
return CGWrapper(CGIndenter(CGMethodCall([], MakeNativeName(name), self.method.isStatic(),
|
return CGIndenter(CGWrapper(CGMethodCall([], MakeNativeName(name), self.method.isStatic(),
|
||||||
self.descriptor, self.method)),
|
self.descriptor, self.method),
|
||||||
pre=" let this = JS::from_raw(this);\n" +
|
pre="let this = JS::from_raw(this);\n"
|
||||||
" let mut this = this.root();\n")
|
"let mut this = this.root();\n"))
|
||||||
|
|
||||||
class CGGenericGetter(CGAbstractBindingMethod):
|
class CGGenericGetter(CGAbstractBindingMethod):
|
||||||
"""
|
"""
|
||||||
|
@ -2435,10 +2435,10 @@ class CGSpecializedGetter(CGAbstractExternMethod):
|
||||||
getter=True))
|
getter=True))
|
||||||
if self.attr.type.nullable() or not infallible:
|
if self.attr.type.nullable() or not infallible:
|
||||||
nativeName = "Get" + nativeName
|
nativeName = "Get" + nativeName
|
||||||
return CGWrapper(CGIndenter(CGGetterCall([], self.attr.type, nativeName,
|
return CGIndenter(CGWrapper(CGGetterCall([], self.attr.type, nativeName,
|
||||||
self.descriptor, self.attr)),
|
self.descriptor, self.attr),
|
||||||
pre=" let this = JS::from_raw(this);\n" +
|
pre="let this = JS::from_raw(this);\n"
|
||||||
" let mut this = this.root();\n")
|
"let mut this = this.root();\n"))
|
||||||
|
|
||||||
class CGGenericSetter(CGAbstractBindingMethod):
|
class CGGenericSetter(CGAbstractBindingMethod):
|
||||||
"""
|
"""
|
||||||
|
@ -2485,11 +2485,11 @@ class CGSpecializedSetter(CGAbstractExternMethod):
|
||||||
|
|
||||||
def definition_body(self):
|
def definition_body(self):
|
||||||
name = self.attr.identifier.name
|
name = self.attr.identifier.name
|
||||||
return CGWrapper(CGIndenter(CGSetterCall([], self.attr.type,
|
return CGIndenter(CGWrapper(CGSetterCall([], self.attr.type,
|
||||||
"Set" + MakeNativeName(name),
|
"Set" + MakeNativeName(name),
|
||||||
self.descriptor, self.attr)),
|
self.descriptor, self.attr),
|
||||||
pre=" let this = JS::from_raw(this);\n" +
|
pre="let this = JS::from_raw(this);\n"
|
||||||
" let mut this = this.root();\n")
|
"let mut this = this.root();\n"))
|
||||||
|
|
||||||
|
|
||||||
class CGMemberJITInfo(CGThing):
|
class CGMemberJITInfo(CGThing):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue