1. Pypy
  2. Untitled project
  3. lang-smalltalk


An...@Anton-Vaio  committed 69ec95f

Added TODO and small consistency fix.

  • Participants
  • Parent commits eb37fcf
  • Branches strategies

Comments (0)

Files changed (2)

File spyvm/fieldtypes.py

View file
         # This is a weird and rare special case for w_nil
         return ListStorageStrategy.singleton
     if s_containing_class.isvariable():
+        if only_list_storage:
+            return ListStorageStrategy.singleton
         # A newly allocated var-sized object contains only nils.
         return AllNilStorageStrategy.singleton

File spyvm/model.py

View file
         from spyvm.fieldtypes import strategy_of_size
         """Create new object with size = fixed + variable size."""
         W_AbstractPointersObject.__init__(self, space, w_class, size)
+        # TODO - setting strategy/storage is useless if fillin() will be called afterwards.
         self.strategy = strategy_of_size(self.s_class, size)
         self.set_storage(self.strategy.initial_storage(space, size), self.strategy)