Commits

Armin Rigo committed 53aa7dd

Found out the magic incantation that makes ll2ctypes happy.

  • Participants
  • Parent commits cebc974
  • Branches remove-globals-in-jit

Comments (0)

Files changed (4)

File pypy/jit/metainterp/compile.py

         return res
 
 class AllVirtuals:
+    llopaque = True
     list = [resume.ResumeDataDirectReader.virtual_default]   # annotation hack
     def __init__(self, list):
         self.list = list

File pypy/jit/metainterp/test/test_recursive.py

         res = self.meta_interp(main, [0], inline=True)
         assert res == main(0)
 
-    def _skip_if_untranslated_on_a_real_backend(self):
-        if not hasattr(self.CPUClass, 'is_llgraph'):
-            py.test.skip("xxx only works on the llgraph backend, or "
-                         "fully translated")
-
     def test_directly_call_assembler_virtualizable_force1(self):
-        self._skip_if_untranslated_on_a_real_backend()
         class Thing(object):
             def __init__(self, val):
                 self.val = val
         assert res == main(0, 10, 1)
 
     def test_directly_call_assembler_virtualizable_force_blackhole(self):
-        self._skip_if_untranslated_on_a_real_backend()
         class Thing(object):
             def __init__(self, val):
                 self.val = val

File pypy/jit/metainterp/test/test_virtualizable.py

         self.check_aborted_count(3)
         self.check_jitcell_token_count(0)
 
-    def _skip_if_untranslated_on_a_real_backend(self):
-        if not hasattr(self.CPUClass, 'is_llgraph'):
-            py.test.skip("xxx only works on the llgraph backend, or "
-                         "fully translated")
-
     def test_external_read_sometimes(self):
-        self._skip_if_untranslated_on_a_real_backend()
         jitdriver = JitDriver(greens = [], reds = ['frame'],
                               virtualizables = ['frame'])
         
         assert res == f(123)
 
     def test_external_read_sometimes_with_virtuals(self):
-        self._skip_if_untranslated_on_a_real_backend()
         jitdriver = JitDriver(greens = [], reds = ['frame'],
                               virtualizables = ['frame'])
         
         assert res == f(123)
 
     def test_external_read_sometimes_changing_virtuals(self):
-        self._skip_if_untranslated_on_a_real_backend()
         jitdriver = JitDriver(greens = [], reds = ['frame'],
                               virtualizables = ['frame'])
         
         assert res == f(123)
 
     def test_external_read_sometimes_with_exception(self):
-        self._skip_if_untranslated_on_a_real_backend()
         jitdriver = JitDriver(greens = [], reds = ['frame'],
                               virtualizables = ['frame'])
         
         assert res == f(123)
 
     def test_external_read_sometimes_dont_compile_guard(self):
-        self._skip_if_untranslated_on_a_real_backend()
         jitdriver = JitDriver(greens = [], reds = ['frame'],
                               virtualizables = ['frame'])
         
         assert res == f(123)
 
     def test_external_read_sometimes_recursive(self):
-        self._skip_if_untranslated_on_a_real_backend()
         jitdriver = JitDriver(greens = [], reds = ['rec', 'frame'],
                               virtualizables = ['frame'])
         
         assert res == main(123)
 
     def test_external_write_sometimes(self):
-        self._skip_if_untranslated_on_a_real_backend()
         jitdriver = JitDriver(greens = [], reds = ['frame'],
                               virtualizables = ['frame'])
         

File pypy/jit/metainterp/test/test_virtualref.py

                           new_array=6)         # next1/2/3
         self.check_aborted_count(0)
 
-    def _skip_if_untranslated_on_a_real_backend(self):
-        if not hasattr(self.CPUClass, 'is_llgraph'):
-            py.test.skip("xxx only works on the llgraph backend, or "
-                         "fully translated")
-
     def test_simple_force_sometimes(self):
-        self._skip_if_untranslated_on_a_real_backend()
         myjitdriver = JitDriver(greens = [], reds = ['n'])
         #
         A = lltype.GcArray(lltype.Signed)
         self.check_aborted_count(0)
 
     def test_alloc_virtualref_and_then_alloc_structure(self):
-        self._skip_if_untranslated_on_a_real_backend()
         myjitdriver = JitDriver(greens = [], reds = ['n'])
         #
         class XY:
         py.test.raises(UnknownException, "self.meta_interp(fn, [10])")
 
     def test_call_virtualref_already_forced(self):
-        self._skip_if_untranslated_on_a_real_backend()
         myjitdriver = JitDriver(greens = [], reds = ['n', 'res'])
         #
         class XY: