Example #1
0
File: node.py Project: ieure/pypy
 def forward_declaration(self):
     if llgroup.member_of_group(self.obj):
         return
     type, name = self.get_declaration()
     yield '%s;' % (
         forward_cdecl(type, name, self.db.standalone,
                       self.is_thread_local()))
Example #2
0
 def forward_declaration(self):
     hash_typename = self.get_hash_typename()
     hash_offset = self.db.gctransformer.get_hash_offset(self.T)
     yield '%s {' % cdecl(hash_typename, '')
     yield '\tunion {'
     yield '\t\t%s;' % cdecl(self.implementationtypename, 'head')
     yield '\t\tchar pad[%s];' % name_signed(hash_offset, self.db)
     yield '\t} u;'
     yield '\tlong hash;'
     yield '};'
     yield '%s;' % (
         forward_cdecl(hash_typename, '_hash_' + self.name,
                       self.db.standalone, self.is_thread_local()),)
     yield '#define %s _hash_%s.u.head' % (self.name, self.name)
Example #3
0
 def forward_declaration(self):
     T = self.getTYPE()
     assert self.typename == self.implementationtypename  # no array part
     hash_typename = self.get_hash_typename()
     hash_offset = self.db.gctransformer.get_hash_offset(T)
     yield "%s {" % cdecl(hash_typename, "")
     yield "\tunion {"
     yield "\t\t%s;" % cdecl(self.implementationtypename, "head")
     yield "\t\tchar pad[%s];" % name_signed(hash_offset, self.db)
     yield "\t} u;"
     yield "\tlong hash;"
     yield "};"
     yield "%s;" % (forward_cdecl(hash_typename, "_hash_" + self.name, self.db.standalone, self.is_thread_local()),)
     yield "#define %s _hash_%s.u.head" % (self.name, self.name)
Example #4
0
 def forward_declaration(self):
     self._fix_members()
     yield ""
     ctype = ["%s {" % cdecl(self.implementationtypename, "")]
     for i, member in enumerate(self.obj.members):
         structtypename = self.db.gettype(typeOf(member))
         ctype.append("\t%s;" % cdecl(structtypename, "member%d" % i))
     ctype.append("} @")
     ctype = "\n".join(ctype)
     yield "%s;" % (forward_cdecl(ctype, self.name, self.db.standalone, self.is_thread_local()))
     yield '#include "src/llgroup.h"'
     yield "PYPY_GROUP_CHECK_SIZE(%s)" % (self.name,)
     for i, member in enumerate(self.obj.members):
         structnode = self.db.getcontainernode(member)
         yield "#define %s %s.member%d" % (structnode.name, self.name, i)
     yield ""
Example #5
0
File: node.py Project: njues/Sypy
 def forward_declaration(self):
     self._fix_members()
     yield ''
     ctype = ['%s {' % cdecl(self.implementationtypename, '')]
     for i, member in enumerate(self.obj.members):
         structtypename = self.db.gettype(typeOf(member))
         ctype.append('\t%s;' % cdecl(structtypename, 'member%d' % i))
     ctype.append('} @')
     ctype = '\n'.join(ctype)
     yield '%s;' % (forward_cdecl(ctype, self.name, self.db.standalone,
                                  self.is_thread_local()))
     yield '#include "src/llgroup.h"'
     yield 'PYPY_GROUP_CHECK_SIZE(%s)' % (self.name, )
     for i, member in enumerate(self.obj.members):
         structnode = self.db.getcontainernode(member)
         yield '#define %s %s.member%d' % (structnode.name, self.name, i)
     yield ''
Example #6
0
 def forward_declaration(self):
     self._fix_members()
     yield ''
     ctype = ['%s {' % cdecl(self.implementationtypename, '')]
     for i, member in enumerate(self.obj.members):
         structtypename = self.db.gettype(typeOf(member))
         ctype.append('\t%s;' % cdecl(structtypename, 'member%d' % i))
     ctype.append('} @')
     ctype = '\n'.join(ctype)
     yield '%s;' % (
         forward_cdecl(ctype, self.name, self.db.standalone,
                       self.is_thread_local()))
     yield '#include "src/llgroup.h"'
     yield 'PYPY_GROUP_CHECK_SIZE(%s);' % self.name
     for i, member in enumerate(self.obj.members):
         structnode = self.db.getcontainernode(member)
         yield '#define %s %s.member%d' % (structnode.name,
                                           self.name, i)
     yield ''
Example #7
0
 def forward_declaration(self):
     for funcgen in self.funcgens:
         yield '%s;' % (forward_cdecl(self.implementationtypename,
                                      funcgen.name(self.name),
                                      self.db.standalone))
Example #8
0
 def forward_declaration(self):
     yield '%s;' % (forward_cdecl(self.implementationtypename,
                                  self.name, self.db.standalone,
                                  self.is_thread_local()))
Example #9
0
File: node.py Project: njues/Sypy
 def forward_declaration(self):
     if llgroup.member_of_group(self.obj):
         return
     type, name = self.get_declaration()
     yield '%s;' % (forward_cdecl(type, name, self.db.standalone,
                                  self.is_thread_local()))
Example #10
0
 def forward_declaration(self):
     for funcgen in self.funcgens:
         yield '%s;' % (
             forward_cdecl(self.implementationtypename,
                 funcgen.name(self.name), self.db.standalone))
Example #11
0
 def forward_declaration(self):
     if llgroup.member_of_group(self.obj):
         return
     yield '%s;' % (
         forward_cdecl(self.implementationtypename,
             self.name, self.db.standalone, self.is_thread_local()))
Example #12
0
 def forward_declaration(self):
     yield '%s;' % (
         forward_cdecl(self.implementationtypename,
             self.name, self.db.standalone, self.is_thread_local()))
Example #13
0
    def forward_declaration(self):
        hard_tls = self.name == self.EXC_DATA_VARNAME

        yield '%s;' % (forward_cdecl(self.implementationtypename, self.name,
                                     self.db.standalone, hard_tls
                                     or self.is_thread_local()))