Commits

Antonio Cuni committed 5ecd8a0

bah, actually fix rpython

  • Participants
  • Parent commits 8789a7c
  • Branches core-only-tracing

Comments (0)

Files changed (3)

File pypy/jit/metainterp/warmspot.py

             funcname = op.args[2].value
             key = jd, funcname
             if key not in closures:
+                is_string = funcname in ('enable_opts', 'jitmode')
                 closures[key] = make_closure(jd, 'set_param_' + funcname,
-                                             funcname == 'enable_opts')
+                                             is_string)
             op.opname = 'direct_call'
             op.args[:3] = [closures[key]]
 

File pypy/module/pypyjit/interp_jit.py

     for key, w_value in kwds_w.items():
         if key == 'enable_opts':
             jit.set_param(None, 'enable_opts', space.str_w(w_value))
+        elif key == 'jitmode':
+            jit.set_param(None, 'jitmode', space.str_w(w_value))        
         else:
             intval = space.int_w(w_value)
             for name, _ in unroll_parameters:
-                if name == key and name != 'enable_opts':
+                if name == key and name != 'enable_opts' and name != 'jitmode':
                     jit.set_param(None, name, intval)
                     break
             else:

File pypy/rlib/jit.py

             raise ValueError
         name = parts[0]
         value = parts[1]
-        if name == 'enable_opts' or name == 'jitmode':
-            set_param(driver, name, value)
+        if name == 'enable_opts':
+            set_param(driver, 'enable_opts', value)
+        elif name == 'jitmode':
+            set_param(driver, 'jitmode', value)
         else:
             for name1, _ in unroll_parameters:
-                if name1 == name and name1 != 'enable_opts':
+                if name1 == name and name1 != 'enable_opts' and name1 != 'jitmode':
                     try:
                         set_param(driver, name1, int(value))
                     except ValueError:
         from pypy.annotation import model as annmodel
         assert s_name.is_constant()
         if not self.bookkeeper.immutablevalue(DEFAULT).contains(s_value):
-            if s_name.const == 'enable_opts':
+            if s_name.const in ('enable_opts', 'jitmode'):
                 assert annmodel.SomeString(can_be_None=True).contains(s_value)
             else:
                 assert annmodel.SomeInteger().contains(s_value)
         hop.exception_cannot_occur()
         driver = hop.inputarg(lltype.Void, arg=0)
         name = hop.args_s[1].const
-        if name == 'enable_opts':
+        if name in ('enable_opts', 'jitmode'):
             repr = string_repr
         else:
             repr = lltype.Signed