Ejemplo n.º 1
0
 def fillin(self, space, g_self):
     W_AbstractObjectWithIdentityHash.fillin(self, space, g_self)
     # Recursive fillin required to enable specialized storage strategies.
     pointers_w = g_self.pointers
     assert len(pointers_w) == 1
     pointers_w[0].fillin(space)
     self.value = space.unwrap_int(pointers_w[0].w_object)
Ejemplo n.º 2
0
 def fillin(self, space, g_self):
     W_AbstractObjectWithIdentityHash.fillin(self, space, g_self)
     self.lookup_selector = "unknown%d" % self.gethash()
     self.bytes = [] # make sure the attribute is defined
     # Implicitly sets the header, including self.literalsize
     for i, w_object in enumerate(g_self.get_pointers()):
         self.literalatput0(space, i, w_object, initializing=True)
     self.setbytes(g_self.get_bytes()[self.bytecodeoffset():])
     self.post_init()
Ejemplo n.º 3
0
 def fillin(self, space, g_self):
     W_AbstractObjectWithIdentityHash.fillin(self, space, g_self)
     # Recursive fillin required to enable specialized storage strategies.
     for g_obj in g_self.pointers:
         g_obj.fillin(space)
     pointers = g_self.get_pointers()
     storage_type = space.strategy_factory.strategy_type_for(pointers, weak=False)  # do not fill in weak lists, yet
     space.strategy_factory.set_initial_strategy(self, storage_type,
                                                 g_self.get_class(),
                                                 len(pointers), pointers)
Ejemplo n.º 4
0
 def fillin(self, space, g_self):
     W_AbstractObjectWithIdentityHash.fillin(self, space, g_self)
     # Recursive fillin required to enable specialized storage strategies.
     for g_obj in g_self.pointers:
         g_obj.fillin(space)
     pointers = g_self.get_pointers()
     storage_type = space.strategy_factory.strategy_type_for(
         pointers, weak=False)  # do not fill in weak lists, yet
     space.strategy_factory.set_initial_strategy(self, storage_type,
                                                 g_self.get_class(),
                                                 len(pointers), pointers)
Ejemplo n.º 5
0
 def fillin(self, space, g_self):
     W_AbstractObjectWithIdentityHash.fillin(self, space, g_self)
     self._startpc_stacklen_args = r_uint(0)
     self.set_stack([space.w_nil] * len(g_self.pointers))
     for i, g_obj in enumerate(g_self.pointers):
         g_obj.fillin(space)
         if i >= constants.BLKCLSR_SIZE:
             self.atput0(space, i - constants.BLKCLSR_SIZE, g_obj.w_object)
         elif i == constants.BLKCLSR_OUTER_CONTEXT:
             self._w_outerContext = g_obj.w_object
         elif i == constants.BLKCLSR_STARTPC:
             self.set_startpc(space.unwrap_int(g_obj.w_object))
         elif i == constants.BLKCLSR_NUMARGS:
             self.set_numArgs(space.unwrap_int(g_obj.w_object))
         else:
             assert False
Ejemplo n.º 6
0
 def fillin(self, space, g_self):
     W_AbstractObjectWithIdentityHash.fillin(self, space, g_self)
     self._startpc_stacklen_args = r_uint(0)
     self.set_stack([space.w_nil] * len(g_self.pointers))
     for i, g_obj in enumerate(g_self.pointers):
         g_obj.fillin(space)
         if i >= constants.BLKCLSR_SIZE:
             self.atput0(space, i - constants.BLKCLSR_SIZE, g_obj.w_object)
         elif i == constants.BLKCLSR_OUTER_CONTEXT:
             self._w_outerContext = g_obj.w_object
         elif i == constants.BLKCLSR_STARTPC:
             self.set_startpc(space.unwrap_int(g_obj.w_object))
         elif i == constants.BLKCLSR_NUMARGS:
             self.set_numArgs(space.unwrap_int(g_obj.w_object))
         else:
             assert False
Ejemplo n.º 7
0
 def fillin(self, space, g_self):
     W_AbstractObjectWithIdentityHash.fillin(self, space, g_self)
     high, low = g_self.get_ruints(required_len=2)
     if g_self.reader.version.has_floats_reversed:
         low, high = high, low
     self.fillin_fromwords(space, high, low)
Ejemplo n.º 8
0
 def fillin(self, space, g_self):
     W_AbstractObjectWithIdentityHash.fillin(self, space, g_self)
     high, low = g_self.get_ruints(required_len=2)
     if g_self.reader.version.has_floats_reversed:
         low, high = high, low
     self.fillin_fromwords(space, high, low)