Commits

Armin Rigo committed d3957e5

fix: the JIT doesn't support for now 'with stm_ignored:'

Comments (0)

Files changed (1)

rpython/rtyper/lltypesystem/rstr.py

         # special non-computed-yet value.
         if not s:
             return 0
-        with stm_ignored:
-            x = s.hash
+        x = s.hash
         if x == 0:
             x = LLHelpers._ll_compute_strhash(s)
         return x
 
+    @jit.dont_look_inside
     def _ll_compute_strhash(s):
         x = _hash_string(s.chars)
         if x == 0:
 
     def ll_strfasthash(s):
         if rgc.stm_is_enabled():
-            # due to "with stm_ignored" in _ll_strhash(), it is possible
-            # that just returning 's.hash' from here would rarely return
-            # the old value, which is 0.  We need to check.
-            with stm_ignored:
-                x = s.hash
+            # due to "with stm_ignored" in _ll_compute_strhash(), it is
+            # possible that just returning 's.hash' from here would rarely
+            # return the old value, which is 0.  We need to check.
+            x = s.hash
             if x == 0:
                 x = LLHelpers._ll_compute_strhash(s)
             return x