def store(self, w_self, n0, w_value):
     AbstractGenericShadow.store(self, w_self, n0, w_value)
     if n0 == constants.METHODDICT_VALUES_INDEX:
         self.setup_notification()
     if n0 >= constants.METHODDICT_NAMES_INDEX:
         # the caller / user cannot be expected to add the compiledMethod to the observee next (as indicated above)
         # in case of clone / copyFrom the compiledMethod is already contained, so a sync is necessary here too
         self.sync_method_cache()
Example #2
0
 def store(self, w_self, n0, w_value):
     AbstractGenericShadow.store(self, w_self, n0, w_value)
     if n0 == constants.METHODDICT_VALUES_INDEX:
         self.setup_notification()
     if n0 >= constants.METHODDICT_NAMES_INDEX:
         # the caller / user cannot be expected to add the compiledMethod to the observee next (as indicated above)
         # in case of clone / copyFrom the compiledMethod is already contained, so a sync is necessary here too
         self.sync_method_cache()
 def become(self, w_other):
     # Force other to become a methoddict
     s_other = w_other.as_methoddict_get_shadow(self.space)
     # Do normal self ptr swap
     AbstractGenericShadow.become(self, w_other)
     # Swap class pointers
     self.s_class, s_other.s_class = s_other.s_class, self.s_class
     # Conditionally inform the class about the swap
     if self.s_class: self.s_class.store_s_methoddict(self)
     if s_other.s_class: s_other.s_class.store_s_methoddict(s_other)
Example #4
0
 def become(self, w_other):
     # Force other to become a methoddict
     s_other = w_other.as_methoddict_get_shadow(self.space)
     # Do normal self ptr swap
     AbstractGenericShadow.become(self, w_other)
     # Swap class pointers
     self.s_class, s_other.s_class = s_other.s_class, self.s_class
     # Conditionally inform the class about the swap
     if self.s_class: self.s_class.store_s_methoddict(self)
     if s_other.s_class: s_other.s_class.store_s_methoddict(s_other)
 def __init__(self, space, w_self, size):
     self.s_class = None
     self.methoddict = {}
     AbstractGenericShadow.__init__(self, space, w_self, size)
Example #6
0
 def __init__(self, space, w_self, size):
     self.s_class = None
     self.methoddict = {}
     AbstractGenericShadow.__init__(self, space, w_self, size)