[pypy-commit] pypy translation-cleanup: Remove dependency of FlowEC on ExecutionContext
rlamy
noreply at buildbot.pypy.org
Thu Sep 20 19:39:04 CEST 2012
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: translation-cleanup
Changeset: r57420:cce3fadfe641
Date: 2012-09-14 02:08 +0100
http://bitbucket.org/pypy/pypy/changeset/cce3fadfe641/
Log: Remove dependency of FlowEC on ExecutionContext
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
@@ -1,7 +1,6 @@
import collections
import sys
from pypy.tool.error import FlowingError
-from pypy.interpreter.executioncontext import ExecutionContext
from pypy.interpreter.error import OperationError
from pypy.interpreter.pytraceback import PyTraceback
from pypy.interpreter import pyframe
@@ -208,10 +207,9 @@
# ____________________________________________________________
-class FlowExecutionContext(ExecutionContext):
-
- # disable superclass method
- bytecode_trace = None
+class FlowExecutionContext(object):
+ def __init__(self, space):
+ self.space = space
def guessbool(self, w_condition, **kwds):
return self.recorder.guessbool(self, w_condition, **kwds)
diff --git a/pypy/objspace/flow/objspace.py b/pypy/objspace/flow/objspace.py
--- a/pypy/objspace/flow/objspace.py
+++ b/pypy/objspace/flow/objspace.py
@@ -78,6 +78,7 @@
# disable superclass methods
enter_cache_building_mode = None
leave_cache_building_mode = None
+ createcompiler = None
def is_w(self, w_one, w_two):
return self.is_true(self.is_(w_one, w_two))
@@ -183,11 +184,6 @@
def getexecutioncontext(self):
return getattr(self, 'executioncontext', None)
- def createcompiler(self):
- # no parser/compiler needed - don't build one, it takes too much time
- # because it is done each time a FlowExecutionContext is built
- return None
-
def exception_match(self, w_exc_type, w_check_class):
try:
check_class = self.unwrap(w_check_class)
More information about the pypy-commit
mailing list