[pypy-commit] pypy translation-cleanup: Remove unused cache_building_mode from flow space
rlamy
noreply at buildbot.pypy.org
Thu Aug 30 18:38:37 CEST 2012
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: translation-cleanup
Changeset: r57015:79877d70f566
Date: 2012-08-23 19:10 +0100
http://bitbucket.org/pypy/pypy/changeset/79877d70f566/
Log: Remove unused cache_building_mode from flow space
and kill flowcontext.ConcreteNoOp as well.
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
@@ -155,14 +155,6 @@
ec.recorder = self.nextreplayer
return self.booloutcome
-
-class ConcreteNoOp(Recorder):
- # In "concrete mode", no SpaceOperations between Variables are allowed.
- # Concrete mode is used to precompute lazily-initialized caches,
- # when we don't want this precomputation to show up on the flow graph.
- def append(self, operation):
- raise AssertionError, "concrete mode: cannot perform %s" % operation
-
# ____________________________________________________________
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
@@ -83,18 +83,9 @@
# objects which should keep their SomeObjectness
self.not_really_const = NOT_REALLY_CONST
- def enter_cache_building_mode(self):
- # when populating the caches, the flow space switches to
- # "concrete mode". In this mode, only Constants are allowed
- # and no SpaceOperation is recorded.
- previous_recorder = self.executioncontext.recorder
- self.executioncontext.recorder = flowcontext.ConcreteNoOp()
- self.concrete_mode += 1
- return previous_recorder
-
- def leave_cache_building_mode(self, previous_recorder):
- self.executioncontext.recorder = previous_recorder
- self.concrete_mode -= 1
+ # disable superclass methods
+ enter_cache_building_mode = None
+ leave_cache_building_mode = None
def is_w(self, w_one, w_two):
return self.is_true(self.is_(w_one, w_two))
More information about the pypy-commit
mailing list