示例#1
0
 def __init__(self, space, size, depth):
     W_AbstractObjectWithIdentityHash.__init__(self)
     self._squeak_pixel_buffer = lltype.malloc(rffi.CArray(rffi.UINT),
                                               size,
                                               flavor='raw')
     self._realsize = size
     self._depth = depth
     self._display = space.display()
     self.relinquish_display()
示例#2
0
    def __init__(self, space, w_cls):
        """
        Initialize immutable pointers object, but avoid initializing storage
        by calling `W_AbstractObjectWithIdentityHash.__init__(self)` instead of
        `W_PointersObject.__init__(self)`.
        Additionally, reuse `self.strategy` slot to store class shadow.

        """
        W_AbstractObjectWithIdentityHash.__init__(self)
        self.strategy = w_cls.as_class_get_shadow(space)
示例#3
0
    def __init__(self, space, w_cls):
        """
        Initialize immutable pointers object, but avoid initializing storage
        by calling `W_AbstractObjectWithIdentityHash.__init__(self)` instead of
        `W_PointersObject.__init__(self)`.
        Additionally, reuse `self.strategy` slot to store class shadow.

        """
        W_AbstractObjectWithIdentityHash.__init__(self)
        self.strategy = w_cls.as_class_get_shadow(space)
示例#4
0
 def __init__(self, space, w_rcvr=None, method_name='', args_w=None,
              is_send=False, break_on_exceptions=False):
     W_AbstractObjectWithIdentityHash.__init__(self)
     self._space = space
     self.w_rcvr = w_rcvr
     self.method_name = method_name
     self.args_w = args_w or []
     self._done = False
     self.w_result = None
     self.w_error = None
     self._is_send = is_send
     self._break_on_exceptions = break_on_exceptions
示例#5
0
 def __init__(self, space, w_outerctxt, startpc, numArgs, size, stack=None):
     W_AbstractObjectWithIdentityHash.__init__(self)
     self._startpc_stacklen_args = r_uint(0)
     self._w_outerContext = w_outerctxt
     self.set_startpc(startpc)
     self.set_numArgs(numArgs)
     if stack:
         self.set_stack(stack)
     elif size == 0:
         self.set_stack(self.empty_stack)
     else:
         self.set_stack([space.w_nil] * size)
     self._fillin_w_method(space)
     self._fillin_w_receiver(space)
示例#6
0
 def __init__(self, space, w_outerctxt, startpc, numArgs, size, stack=None):
     W_AbstractObjectWithIdentityHash.__init__(self)
     self._startpc_stacklen_args = r_uint(0)
     self._w_outerContext = w_outerctxt
     self.set_startpc(startpc)
     self.set_numArgs(numArgs)
     if stack:
         self.set_stack(stack)
     elif size == 0:
         self.set_stack(self.empty_stack)
     else:
         self.set_stack([space.w_nil] * size)
     self._fillin_w_method(space)
     self._fillin_w_receiver(space)
示例#7
0
 def __init__(self,
              space,
              w_rcvr=None,
              method_name='',
              args_w=None,
              is_send=False,
              break_on_exceptions=False):
     W_AbstractObjectWithIdentityHash.__init__(self)
     self._space = space
     self.w_rcvr = w_rcvr
     self.method_name = method_name
     self.args_w = args_w or []
     self._done = False
     self.w_result = None
     self.w_error = None
     self._is_send = is_send
     self._break_on_exceptions = break_on_exceptions
示例#8
0
 def __init__(self, space, bytecount=0, header=0):
     W_AbstractObjectWithIdentityHash.__init__(self)
     self.lookup_selector = "unknown%d" % self.gethash()
     self.bytes = ["\x00"] * bytecount
     self.setheader(space, header, initializing=True)
     self.post_init()
示例#9
0
 def __init__(self, space, w_class, size, weak=False):
     """Create new object with size = fixed + variable size."""
     W_AbstractObjectWithIdentityHash.__init__(self)
     self._initialize_storage(space, w_class, size, weak)
示例#10
0
 def __init__(self):
     W_AbstractObjectWithIdentityHash.__init__(self)
     self.w_class = None
示例#11
0
 def __init__(self, space, w_class, size, weak=False):
     """Create new object with size = fixed + variable size."""
     W_AbstractObjectWithIdentityHash.__init__(self)
     self._initialize_storage(space, w_class, size, weak)
示例#12
0
 def __init__(self):
     W_AbstractObjectWithIdentityHash.__init__(self)
     self.w_class = None