Commits

Antonio Cuni committed 54d6ea8

(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)

Comments (0)

Files changed (4)

pypy/jit/metainterp/pyjitpl.py

         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

pypy/jit/metainterp/test/support.py

         _cell = FakeJitCell()
 
         trace_limit = sys.maxint
-        jitmode = 'full'
+        jitmode_core_only = False
         enable_opts = ALL_OPTS_DICT
 
     func._jit_unroll_safe_ = True

pypy/jit/metainterp/test/test_warmstate.py

         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'
-    

pypy/jit/metainterp/warmstate.py

         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