Author: Ronan Lamy <[email protected]>
Branch: framestate
Changeset: r74660:67c6cf446c89
Date: 2014-11-21 15:30 +0000
http://bitbucket.org/pypy/pypy/changeset/67c6cf446c89/
Log: cache FrameState.mergeable
diff --git a/rpython/flowspace/framestate.py b/rpython/flowspace/framestate.py
--- a/rpython/flowspace/framestate.py
+++ b/rpython/flowspace/framestate.py
@@ -22,10 +22,13 @@
self.last_exception = last_exception
self.blocklist = blocklist
self.next_offset = next_offset
+ self._mergeable = None
@property
def mergeable(self):
- data = self.locals_w + self.stack
+ if self._mergeable is not None:
+ return self._mergeable
+ self._mergeable = data = self.locals_w + self.stack
if self.last_exception is None:
data.append(Constant(None))
data.append(Constant(None))
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit