Commits

Antonio Cuni committed 730dac0

always disable inlining when setting the jitmode to core-only

Comments (0)

Files changed (2)

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

 
     def set_param_jitmode(self, value):
         self.jitmode = value
+        if value == 'core-only':
+            self.set_param_inlining(0)
 
     def set_param_enable_opts(self, value):
         from pypy.jit.metainterp.optimizeopt import ALL_OPTS_DICT, ALL_OPTS_NAMES