Author: Ronan Lamy <[email protected]>
Branch: translation-cleanup
Changeset: r58101:f802420c39a7
Date: 2012-10-12 18:47 +0100
http://bitbucket.org/pypy/pypy/changeset/f802420c39a7/
Log: Flowspacify unrollstack() and kill .frame_finished_execution
diff --git a/pypy/objspace/flow/flowcontext.py
b/pypy/objspace/flow/flowcontext.py
--- a/pypy/objspace/flow/flowcontext.py
+++ b/pypy/objspace/flow/flowcontext.py
@@ -278,6 +278,20 @@
def set_blocklist(self, lst):
self.blockstack = list(lst)
+ def unrollstack(self, unroller_kind):
+ while self.blockstack_non_empty():
+ block = self.pop_block()
+ if (block.handling_mask & unroller_kind) != 0:
+ return block
+ block.cleanupstack(self)
+ return None
+
+ def unrollstack_and_jump(self, unroller):
+ block = self.unrollstack(unroller.kind)
+ if block is None:
+ raise BytecodeCorruption("misplaced bytecode - should not return")
+ return block.handle(self, unroller)
+
def getstate(self):
# getfastscope() can return real None, for undefined locals
data = self.save_locals_stack()
@@ -352,7 +366,6 @@
block = self.pendingblocks.popleft()
try:
self.recorder = self.recording(block)
- self.frame_finished_execution = False
while True:
self.last_instr = self.handle_bytecode(self.last_instr)
self.recorder.final_state = self.getstate()
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit