Commits

Armin Rigo committed 0524190

Yay, the first example of RPython program that runs successfully
on multiple threads.

  • Participants
  • Parent commits 65eb6e4
  • Branches stm

Comments (0)

Files changed (2)

File pypy/translator/stm/test/targetdemo.py

 
 
 NUM_THREADS = 4
-LENGTH      = 10000
+LENGTH      = 5000
 
 
 class Node:

File pypy/translator/stm/transform.py

 from pypy.annotation import model as annmodel
 from pypy.translator.stm import _rffi_stm
 from pypy.translator.unsimplify import varoftype, copyvar
-from pypy.rpython.lltypesystem import lltype
+from pypy.rpython.lltypesystem import lltype, lloperation
 
 
 ALWAYS_ALLOW_OPERATIONS = set([
-    'int_*', 'uint_*', 'llong_*', 'ullong_*', 'float_*',
-    'same_as', 'cast_*',
     'direct_call',
     'debug_print', 'debug_assert',
     ])
+ALWAYS_ALLOW_OPERATIONS |= set(lloperation.enum_foldable_ops())
 
 def op_in_set(opname, set):
-    if opname in set:
-        return True
-    for i in range(len(opname)-1, -1, -1):
-        if (opname[:i] + '*') in set:
-            return True
-    return False
+    return opname in set
 
 # ____________________________________________________________