Commit 66acd12d by Stefan Marr

Need to make sure is_invokable is consistently a static method for RPython

Signed-off-by: Stefan Marr <git@stefan-marr.de>
1 parent 8e079882
......@@ -48,7 +48,8 @@ class AbstractObject(object):
def get_class(self, universe):
raise NotImplementedError("Subclasses need to implement get_class(universe).")
def is_invokable(self):
@staticmethod
def is_invokable():
return False
def __str__(self):
......
......@@ -67,8 +67,10 @@ class Method(AbstractObject):
# Make sure all nested invokables have the same holder
for i in range(0, len(self._literals)):
if self._literals[i].is_invokable():
self._literals[i].set_holder(value)
obj = self._literals[i]
assert isinstance(obj, AbstractObject)
if obj.is_invokable():
obj.set_holder(value)
# XXX this means that the JIT doesn't see changes to the constants
@jit.elidable_promote('all')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!