Author: Richard Plangger <[email protected]>
Branch: vecopt-merge
Changeset: r80074:ef6dda7a8060
Date: 2015-10-09 10:49 +0200
http://bitbucket.org/pypy/pypy/changeset/ef6dda7a8060/
Log: removed call to __class__ but inlined the object names
diff --git a/rpython/jit/metainterp/compile.py
b/rpython/jit/metainterp/compile.py
--- a/rpython/jit/metainterp/compile.py
+++ b/rpython/jit/metainterp/compile.py
@@ -685,9 +685,7 @@
_attrs_ = ()
def clone(self):
- cloned = self.__class__()
- cloned.copy_all_attributes_from(self)
- return cloned
+ return self
def exits_early(self):
return False
@@ -847,6 +845,12 @@
assert isinstance(other, ResumeGuardCopiedDescr)
self.prev = other.prev
+ def clone(self):
+ cloned = ResumeGuardCopiedDescr()
+ cloned.copy_all_attributes_from(self)
+ return cloned
+
+
class ResumeGuardDescr(AbstractResumeGuardDescr):
_attrs_ = ('rd_numb', 'rd_count', 'rd_consts', 'rd_virtuals',
'rd_frame_info_list', 'rd_pendingfields', 'status')
@@ -879,6 +883,11 @@
self.rd_count = len(boxes)
self.store_hash(metainterp_sd)
+ def clone(self):
+ cloned = ResumeGuardDescr()
+ cloned.copy_all_attributes_from(self)
+ return cloned
+
class ResumeGuardExcDescr(ResumeGuardDescr):
pass
@@ -1015,12 +1024,6 @@
self.original_greenkey, jitcell_token)
metainterp_sd.stats.add_jitcell_token(jitcell_token)
- def clone(self):
- cloned = ResumeFromInterpDescr(self.original_greenkey)
- cloned.copy_all_attributes_from(self)
- return cloned
-
-
def compile_trace(metainterp, resumekey):
"""Try to compile a new bridge leading from the beginning of the history
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit