def __init__(self, config=None): "NOT_RPYTHON: Basic initialization of objects." self.fromcache = InternalSpaceCache(self).getorbuild self.threadlocals = ThreadLocals() # set recursion limit # sets all the internal descriptors if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(translating=False) self.config = config # import extra modules for side-effects import pypy.interpreter.nestedscope # register *_DEREF bytecodes self.interned_strings = {} self.actionflag = ActionFlag() # changed by the signal module self.user_del_action = UserDelAction(self) self.frame_trace_action = FrameTraceAction(self) self.actionflag.register_action(self.user_del_action) self.actionflag.register_action(self.frame_trace_action) from pypy.interpreter.pyframe import PyFrame self.FrameClass = PyFrame # can be overridden to a subclass # if self.config.objspace.logbytecodes: # self.bytecodecounts = {} self.initialize()
def __init__(self, config=None): """NOT_RPYTHON""" self.fromcache = InternalSpaceCache(self).getorbuild self.w_Ellipsis = special.Ellipsis() self.w_NotImplemented = special.NotImplemented() if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(translating=False) self.config = config self.interned_strings = make_weak_value_dictionary(self, str, W_Root) self.builtin = DictObject({}) self.FrameClass = PyFrame self.threadlocals = ThreadLocals() self.actionflag = ActionFlag() # changed by the signal module self.check_signal_action = None # changed by the signal module
def __init__(self, config=None, **kw): "NOT_RPYTHON: Basic initialization of objects." self.fromcache = InternalSpaceCache(self).getorbuild self.threadlocals = ThreadLocals() # set recursion limit # sets all the internal descriptors if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(translating=False) self.config = config # import extra modules for side-effects import pypy.interpreter.nestedscope # register *_DEREF bytecodes self.interned_strings = {} self.pending_actions = [] self.setoptions(**kw) # if self.config.objspace.logbytecodes: # self.bytecodecounts = {} self.initialize()