mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 908208 - part 1 - add support for MOZ_NEVER_INLINE to MethodDecl; r=bent
This commit is contained in:
parent
dccf049cdc
commit
6f0d0a5670
@ -447,7 +447,7 @@ class FriendClassDecl(Node):
|
||||
class MethodDecl(Node):
|
||||
def __init__(self, name, params=[ ], ret=Type('void'),
|
||||
virtual=0, const=0, pure=0, static=0, warn_unused=0,
|
||||
inline=0, force_inline=0,
|
||||
inline=0, force_inline=0, never_inline=0,
|
||||
typeop=None,
|
||||
T=None):
|
||||
assert not (virtual and static)
|
||||
@ -458,6 +458,8 @@ class MethodDecl(Node):
|
||||
assert not isinstance(ret, list)
|
||||
for decl in params: assert not isinstance(decl, str)
|
||||
assert not isinstance(T, int)
|
||||
assert not (inline and never_inline)
|
||||
assert not (force_inline and never_inline)
|
||||
|
||||
if typeop is not None:
|
||||
ret = None
|
||||
@ -473,6 +475,7 @@ class MethodDecl(Node):
|
||||
self.warn_unused = warn_unused # bool
|
||||
self.force_inline = (force_inline or T) # bool
|
||||
self.inline = inline # bool
|
||||
self.never_inline = never_inline # bool
|
||||
self.typeop = typeop # Type or None
|
||||
self.T = T # Type or None
|
||||
|
||||
@ -488,6 +491,7 @@ class MethodDecl(Node):
|
||||
warn_unused=self.warn_unused,
|
||||
inline=self.inline,
|
||||
force_inline=self.force_inline,
|
||||
never_inline=self.never_inline,
|
||||
typeop=copy.deepcopy(self.typeop, memo),
|
||||
T=copy.deepcopy(self.T, memo))
|
||||
|
||||
|
@ -182,6 +182,8 @@ class CxxCodeGen(CodePrinter, Visitor):
|
||||
|
||||
if md.inline:
|
||||
self.write('inline ')
|
||||
if md.inline:
|
||||
self.write('MOZ_NEVER_INLINE ')
|
||||
if md.static:
|
||||
self.write('static ')
|
||||
if md.virtual:
|
||||
|
@ -5192,6 +5192,7 @@ def _splitMethodDefn(md, clsname):
|
||||
md.decl.virtual = 0
|
||||
md.decl.static = 0
|
||||
md.decl.warn_unused = 0
|
||||
md.decl.never_inline = 0
|
||||
for param in md.decl.params:
|
||||
if isinstance(param, Param):
|
||||
param.default = None
|
||||
|
Loading…
Reference in New Issue
Block a user