Author: Antonio Cuni <[email protected]>
Branch: core-only-tracing
Changeset: r51536:54d6ea8b9249
Date: 2012-01-20 15:16 +0100
http://bitbucket.org/pypy/pypy/changeset/54d6ea8b9249/
Log: (antocuni, arigo): use a boolean instead of a string to store the
value of core-only-mode, and don't disable inlining automatically
(for now at least)
diff --git a/pypy/jit/metainterp/pyjitpl.py b/pypy/jit/metainterp/pyjitpl.py
--- a/pypy/jit/metainterp/pyjitpl.py
+++ b/pypy/jit/metainterp/pyjitpl.py
@@ -779,7 +779,7 @@
return ConstInt(result)
def perform_call_maybe(self, jitcode, argboxes):
- core_only_mode = (self.metainterp.jitdriver_sd.warmstate.jitmode ==
'core-only')
+ core_only_mode =
(self.metainterp.jitdriver_sd.warmstate.jitmode_core_only)
# in core_only_mode, don't inline calls from core to non-core graphs
if core_only_mode and not jitcode.is_core:
assert self.jitcode.is_core
diff --git a/pypy/jit/metainterp/test/support.py
b/pypy/jit/metainterp/test/support.py
--- a/pypy/jit/metainterp/test/support.py
+++ b/pypy/jit/metainterp/test/support.py
@@ -40,7 +40,7 @@
_cell = FakeJitCell()
trace_limit = sys.maxint
- jitmode = 'full'
+ jitmode_core_only = False
enable_opts = ALL_OPTS_DICT
func._jit_unroll_safe_ = True
diff --git a/pypy/jit/metainterp/test/test_warmstate.py
b/pypy/jit/metainterp/test/test_warmstate.py
--- a/pypy/jit/metainterp/test/test_warmstate.py
+++ b/pypy/jit/metainterp/test/test_warmstate.py
@@ -324,12 +324,3 @@
cell = get_jitcell(True, i)
cell.counter = -2
assert len(warmstate._jitcell_dict) == i + 1
-
-def test_set_params():
- warmstate = WarmEnterState(None, None)
- assert warmstate.inlining == 1
- assert warmstate.jitmode == 'full'
- warmstate.set_param_jitmode('core-only')
- assert warmstate.inlining == 0
- assert warmstate.jitmode == 'core-only'
-
diff --git a/pypy/jit/metainterp/warmstate.py b/pypy/jit/metainterp/warmstate.py
--- a/pypy/jit/metainterp/warmstate.py
+++ b/pypy/jit/metainterp/warmstate.py
@@ -214,9 +214,7 @@
self.inlining = value
def set_param_jitmode(self, value):
- self.jitmode = value
- if value == 'core-only':
- self.set_param_inlining(0)
+ self.jitmode_core_only = (value == 'core-only')
def set_param_enable_opts(self, value):
from pypy.jit.metainterp.optimizeopt import ALL_OPTS_DICT,
ALL_OPTS_NAMES
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit