[pypy-svn] r44103 - pypy/branch/prolog-bytecode/pypy/lang/prolog/interpreter
cfbolz at codespeak.net
cfbolz at codespeak.net
Thu Jun 7 19:12:49 CEST 2007
Author: cfbolz
Date: Thu Jun 7 19:12:49 2007
New Revision: 44103
Modified:
pypy/branch/prolog-bytecode/pypy/lang/prolog/interpreter/interpreter.py
Log:
share the code after the bytecodes between the bytecodes to make the
interpreter loop smaller
Modified: pypy/branch/prolog-bytecode/pypy/lang/prolog/interpreter/interpreter.py
==============================================================================
--- pypy/branch/prolog-bytecode/pypy/lang/prolog/interpreter/interpreter.py (original)
+++ pypy/branch/prolog-bytecode/pypy/lang/prolog/interpreter/interpreter.py Thu Jun 7 19:12:49 2007
@@ -110,22 +110,21 @@
res = meth(stack, oparg)
else:
res = meth(stack)
- if res is not None:
- continuation = res
- while continuation is not DONOTHING:
- if isinstance(continuation, FrameContinuation):
- self = continuation.frame
- pc = continuation.pc
- bytecode = self.code.opcode
- continuation = continuation.continuation
- stack = []
- break
- else:
- print continuation
- continuation = continuation._call(self.engine)
break
else:
- assert 0, "missing opcode"
+ raise error.UncatchableError("bytecode corruption")
+ if res is not None:
+ continuation = res
+ while continuation is not DONOTHING:
+ if isinstance(continuation, FrameContinuation):
+ self = continuation.frame
+ pc = continuation.pc
+ bytecode = self.code.opcode
+ continuation = continuation.continuation
+ stack = []
+ break
+ else:
+ continuation = continuation._call(self.engine)
if len(stack) != 0:
self.stack = stack
return continuation
More information about the pypy-svn
mailing list