def __init__(self, genoo): OODatabase.__init__(self, genoo) self.classes = {} # INSTANCE --> class_name self.classnames = set() # (namespace, name) self.recordnames = {} # RECORD --> name self.functions = {} # graph --> function_name self.methods = {} # graph --> method_name self.consts = {} # value --> AbstractConst self.delegates = {} # StaticMethod --> type_name self.const_count = Counter() # store statistics about constants
def __init__(self, genoo): OODatabase.__init__(self, genoo) # Private attributes: self._jasmin_files = [] # list of strings --- .j files we made self._classes = {} # Maps ootype class objects to node.Class objects, # and JvmType objects as well self._functions = {} # graph -> jvmgen.Method # (jargtypes, jrettype) -> node.StaticMethodInterface self._delegates = {} # (INSTANCE, method_name) -> node.StaticMethodImplementation self._bound_methods = {} self._function_names = {} # graph --> function_name self._constants = {} # flowmodel.Variable --> jvmgen.Const # Special fields for the Object class, see _translate_Object self._object_interf = None self._object_impl = None self._object_exc_impl = None # Create information about the Main class we will build: # # It will have two static fields, 'ilink' and 'pypy'. The # first points to an instance of the interface pypy.Interlink # which we will be generated. The second points to an instance # of pypy.PyPy which was created with this Interlink instance. # # The Interlink class provides the bridge between static helper # code and dynamically generated classes. Since there is one # Main per set of translated code, this also allows multiple # PyPy interpreters to overlap with one another. # # These are public attributes that are referenced from # elsewhere in the code using # jvmgen.Generator.push_interlink() and .push_pypy(). self.jPyPyMain = JvmClassType(self._pkg('Main')) self.pypy_field = jvmgen.Field.s(self.jPyPyMain, 'pypy', jPyPy) self.interlink_field = jvmgen.Field.s(self.jPyPyMain, 'ilink', jvmtype.jPyPyInterlink)
def __init__(self, genoo): OODatabase.__init__(self, genoo) # Private attributes: self._jasmin_files = [] # list of strings --- .j files we made self._classes = {} # Maps ootype class objects to node.Class objects, # and JvmType objects as well self._functions = {} # graph -> jvmgen.Method # (jargtypes, jrettype) -> node.StaticMethodInterface self._delegates = {} # (INSTANCE, method_name) -> node.StaticMethodImplementation self._bound_methods = {} self._function_names = {} # graph --> function_name self._constants = {} # flowmodel.Variable --> jvmgen.Const # Special fields for the Object class, see _translate_Object self._object_interf = None self._object_impl = None self._object_exc_impl = None