Author: Lars Wassermann <[email protected]>
Branch:
Changeset: r424:6d0d72844d3e
Date: 2013-05-29 23:23 +0200
http://bitbucket.org/pypy/lang-smalltalk/changeset/6d0d72844d3e/
Log: added clone method to W_CompiledMethod to avoid falling back onto
W_Object (NotImplemented) Implementation.
diff --git a/spyvm/model.py b/spyvm/model.py
--- a/spyvm/model.py
+++ b/spyvm/model.py
@@ -1006,6 +1006,12 @@
W_AbstractObjectWithIdentityHash._become(self, w_other)
return True
+ def clone(self, space):
+ copy = W_CompiledMethod(0, self.getheader())
+ copy.bytes = list(self.bytes)
+ copy.literals = list(self.literals)
+ return copy
+
def getclass(self, space):
return space.w_CompiledMethod
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit